Video.js youtube video

Rémy DAVID picture Rémy DAVID · Jan 7, 2013 · Viewed 25.4k times · Source

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

Answer

Cameron Tangney picture Cameron Tangney · Jul 11, 2013

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