如何使用 HTML 5 仅播放 Youtube 视频的音频? [英] How to play only the audio of a Youtube video using HTML 5?

查看:23
本文介绍了如何使用 HTML 5 仅播放 Youtube 视频的音频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用 HTML 5 和 Javascript 仅播放来自 YouTube 视频的音频?

Is it possible to play only the audio from a YouTube video using HTML 5 and Javascript?

推荐答案

嵌入视频播放器并使用 CSS 隐藏视频.如果操作得当,您甚至可以只隐藏视频而不隐藏视频下方的控件.

Embed the video player and use CSS to hide the video. If you do it properly you may even be able to hide only the video and not the controls below it.

但是,我建议不要这样做,因为它会违反 YouTube TOS强>.如果您真的只想播放音频,请改用您自己的服务器.

However, I'd recommend against it, because it will be a violation of YouTube TOS. Use your own server instead if you really want to play only audio.

这篇关于如何使用 HTML 5 仅播放 Youtube 视频的音频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆