UNPKG

969 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 width="640" height="264"
11 data-setup='{ "techOrder": ["youtube"], "sources": [{ "type": "video/youtube", "src": "https://www.youtube.com/watch?v=xjS6SftYQaQ"}] }'
12 >
13 </video>
14
15 <script src="../node_modules/video.js/dist/video.js"></script>
16 <script src="../dist/Youtube.js"></script>
17 <script>
18 // You can use any YouTube player parameters
19 // https://developers.google.com/youtube/player_parameters?playerVersion=HTML5#Parameters
20 // To use YouTube controls, you must use ytControls instead
21 // To use the loop or autoplay, use the video.js settings
22 // The language is set to the same as video.js by default
23 videojs.setGlobalOptions({
24 youtube: {
25 ytControls: 2,
26 rel: 1,
27 autohide: 0
28 }
29 });
30 </script>
31</body>
32</html>