Video.js youtube video

不想你离开。 提交于 2019-12-09 03:33:02

问题


I can't get youtube video to work with video.js

I added in the head :

<link href="http://vjs.zencdn.net/c/video-js.css" rel="stylesheet">
<script src="http://vjs.zencdn.net/c/video.js"></script>

Then in the body :

<video id="example_video_1" class="video-js vjs-default-skin" controls preload="none" width="640" height="360"
  data-setup='{"techOrder":["youtube","html5"],"ytcontrols":false}'>
<source src="http://www.youtube.com/watch?v=qWjzVHG9T1I" type='video/youtube' />

But I have a black div (tested in latest Chrome & FF). Am I missing something ?

Thanks


回答1:


The pull request referenced above was closed, and somebody else took it over and made it a plugin, available from the video.js plugins wiki

You'll need that (or a similar) plugin to play youtube videos. There's an example of this working for the latest API here: enabling youtube playback with video.js wrapper




回答2:


It appears that the Pull Request which add the Youtube Tech feature has not been merged yet.

Though it's getting old now: https://github.com/zencoder/video-js/pull/157 I wonder if we could have this soon or not at all :(



来源:https://stackoverflow.com/questions/14194379/video-js-youtube-video

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!