-
Notifications
You must be signed in to change notification settings - Fork 4
/
local_index.html
86 lines (70 loc) · 2.15 KB
/
local_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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Local Player</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="//vjs.zencdn.net/7.8.4/video-js.min.css">
<style>
.pageTitle {
text-align: center;
}
.playerBlock {
margin-bottom: 1em;
}
.playerTitleDiv {
border: 5px outset red;
background-color: lightcoral;
text-align: center;
}
</style>
</head>
<body>
<script src="https://vjs.zencdn.net/7.8.4/video.js"></script>
<!-- Dash.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/dashjs/3.1.3/dash.all.min.js"></script>
<!-- videojs-contrib-dash script -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-dash/4.0.0/videojs-dash.js"></script>
<!-- HLS.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.15.0/videojs-contrib-hls.min.js"></script>
<div class="pageTitle">
<h1>Local Folder</h1>
</div>
<div class="playerBlock">
<div class="playerTitleDiv">
<h2>Dash Player</h2>
</div>
<video id=dash-video width=600 height=300 class="video-js vjs-default-skin" muted="muted" controls></video>
</div>
<div class="playerBlock"></div>
<div class="playerTitleDiv">
<h2>HLS Player</h2>
</div>
<video id=hls-video width=600 height=300 class="video-js vjs-default-skin" controls></video>
</div>
<script>
var dashPlayer = videojs('dash-video');
dashPlayer.ready(function() {
dashPlayer.src({
src: './local_playout_output/dash.mpd',
type: 'application/dash+xml'
});
dashPlayer.play();
});
videojs.Hls.xhr.beforeRequest = function(options) {
/*
* Modifications to requests that will affect every player.
*/
return options;
};
var hlsPlayer = videojs('hls-video');
hlsPlayer.ready(function() {
this.src({
src: './local_playout_output/hls.m3u8',
type: 'application/x-mpegURL',
});
});
</script>
</body>
</html>