How to play Youtube videos using Video.js?

2019-07-20 07:15发布

问题:

Is there a way to play Youtube videos using video.js? I followed the steps here but can't seem to make it work. Please help! Thanks a lot!

回答1:

You can try https://github.com/eXon/videojs-youtube . Before using, I recommend you to read trough the bug reports. In particular, do not follow the advice to use the provided video.js version with the script. It seems to contain a vulnerability. The new version of video.js works fine.



回答2:

If anyone is still interested, it worked like a charm. Could hardly believe it. Just need to include the script vjs.youtube.js. You can style the player as you please.

====================

Gee, this got downvoted as "not useful". What can I add? See here:

http://www.casedasole.it/video/YT.html

Look at the source. Video-js + vjs.youtube.js. It works.