Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Video.js youtube video

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

like image 490
Rémy DAVID Avatar asked Jan 07 '13 10:01

Rémy DAVID


2 Answers

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

like image 68
Cameron Tangney Avatar answered Sep 28 '22 06:09

Cameron Tangney


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 :(

like image 40
Aurélien Thieriot Avatar answered Sep 28 '22 06:09

Aurélien Thieriot