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

查看:130
本文介绍了如何仅使用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服务条款 。如果您真的只想播放音频,请使用您自己的服务器。

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天全站免登陆