-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.html
40 lines (40 loc) · 1.31 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>videojs-responsive-layout Demo</title>
<link href="/node_modules/video.js/dist/video-js.css" rel="stylesheet">
</head>
<body>
<input type="range" id="player_size" min="10" max="960" value="960" step="10" style="width:960px;"/>
<video id="videojs-responsive-layout-player" class="video-js vjs-default-skin" controls width="960">
<source src="//vjs.zencdn.net/v/oceans.mp4" type='video/mp4'>
<source src="//vjs.zencdn.net/v/oceans.webm" type='video/webm'>
</video>
<ul>
<li><a href="/test/">Run unit tests in browser.</a></li>
</ul>
<script src="/node_modules/video.js/dist/video.js"></script>
<script src="/dist/videojs-responsive-layout.js"></script>
<script>
(function(window, videojs) {
var player = window.player = videojs('videojs-responsive-layout-player', {
controlBar: {
volumeMenuButton: {
vertical: true,
inline: false
}
},
plugins: {
responsiveLayout: {}
}
});
//player.responsiveLayout();
document.getElementById( 'player_size').addEventListener( 'change', function (e) {
player.width( e.target.value );
player.trigger( 'resize' );
});
}(window, window.videojs));
</script>
</body>
</html>