-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
57 lines (44 loc) · 1.63 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>VideoJS Concurrency Plugin</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="apple-touch-icon" href="apple-touch-icon.png">
<!-- Place favicon.ico in the root directory -->
<link href="node_modules/video.js/dist/video-js.css" rel="stylesheet">
</head>
<body>
<video id="player" class="video-js vjs-default-skin vjs-big-play-centered" height="250" width="600" controls>
<source src="http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_60fps_normal.mp4" type="video/mp4" />
<p class="vjs-no-js">
To view this video please enable JavaScript, and consider upgrading to a web browser that
<a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
</p>
</video>
<script src="node_modules/video.js/dist/video.js"></script>
<script src="videojs.concurrency.js"></script>
<script>
// initialize the plugin
videojs('player').ready(function() {
this.concurrency({
url: '/package.json?_token=12345',
data: {
id: '54321'
},
idleDelay: 5000,
pollDelay: 2000,
success: function (response) {
this.options.url = '/package.json?_token=' + Math.floor(Math.random() * 10000);
this.options.data.id = Math.floor(Math.random() * 10000);
this.poll();
},
error: function (error) {},
debug: true
});
});
</script>
</body>
</html>