UNPKG

858 BHTMLView Raw
1<!DOCTYPE html>
2<html>
3<head>
4 <link type="text/css" rel="stylesheet" href="../node_modules/video.js/dist/video-js.min.css" />
5</head>
6<body>
7 <video
8 id="vid1"
9 class="video-js vjs-default-skin"
10 controls
11 width="640" height="264"
12 data-setup='{ "techOrder": ["youtube"], "sources": [{ "type": "video/youtube", "src": "https://www.youtube.com/watch?v=xjS6SftYQaQ"}] }'
13 >
14 </video>
15
16 <script src="../node_modules/video.js/dist/video.js"></script>
17 <script src="../dist/Youtube.js"></script>
18 <script>
19 // An example of playing with the Video.js javascript API
20 // You can look at the doc there: http://docs.videojs.com/docs/guides/api.html
21 videojs('vid1').ready(function() {
22 var myPlayer = this;
23 myPlayer.src({ type: 'video/youtube', src: 'https://www.youtube.com/watch?v=y6Sxv-sUYtM' });
24 });
25 </script>
26</body>
27</html>