1 | <!DOCTYPE html>
|
2 | <html>
|
3 | <head>
|
4 | <meta charset="utf-8">
|
5 | <title>videojs-http-streaming Demo</title>
|
6 | <link rel="icon" href="logo.svg">
|
7 | <link href="node_modules/bootstrap/dist/css/bootstrap.css" rel="stylesheet">
|
8 | <link href="node_modules/video.js/dist/video-js.css" rel="stylesheet">
|
9 | <link href="node_modules/videojs-http-source-selector/dist/videojs-http-source-selector.css" rel="stylesheet">
|
10 | <style>
|
11 | .form-check {
|
12 | background-color: hsl(0, 0%, 90%);
|
13 | margin-block: 0.5rem;
|
14 | padding: 0.25em 0.25em 0.25em 1.75em;
|
15 | width: 700px;
|
16 | width: fit-content;
|
17 | }
|
18 | #player-fixture {
|
19 | min-height: 250px;
|
20 | }
|
21 | #segment-metadata {
|
22 | list-style: none;
|
23 | }
|
24 | #segment-metadata pre {
|
25 | overflow: scroll;
|
26 | }
|
27 | </style>
|
28 | </head>
|
29 | <body class="m-4">
|
30 | <script>
|
31 |
|
32 | var result = (/MSIE\s(\d+)\.\d/).exec(navigator.userAgent);
|
33 | var version = result && parseFloat(result[1]);
|
34 |
|
35 | if (!version && (/Trident\/7.0/i).test(navigator.userAgent) && (/rv:11.0/).test(navigator.userAgent)) {
|
36 |
|
37 | version = 11.0;
|
38 | }
|
39 |
|
40 | if (version) {
|
41 | window.location.href = './old-index.html';
|
42 | }
|
43 | </script>
|
44 |
|
45 | <header class="container-fluid">
|
46 | <a href="https://github.com/videojs/http-streaming" class="d-flex align-items-center pb-3 mb-5 border-bottom" style="height: 4em">
|
47 | <img src="./logo.svg" alt="VHS logo showcasing a VHS tape with the Video.js logo on the label" class="rounded mh-100">
|
48 | <span class="fs-1 ps-2">VHS: videojs-http-streaming</span>
|
49 | </a>
|
50 | </header>
|
51 |
|
52 | <div id="player-fixture" class="container-fluid pb-3 mb-3"></div>
|
53 |
|
54 | <ul class="nav nav-tabs container-fluid mb-3" id="myTab" role="tablist">
|
55 | <li class="nav-item" role="presentation">
|
56 | <button class="nav-link active" id="home-tab" data-bs-toggle="tab" data-bs-target="#sources" type="button" role="tab" aria-selected="true">Sources</button>
|
57 | </li>
|
58 | <li class="nav-item" role="presentation">
|
59 | <button class="nav-link" id="contact-tab" data-bs-toggle="tab" data-bs-target="#options" type="button" role="tab" aria-selected="false">Options</button>
|
60 | </li>
|
61 | <li class="nav-item" role="presentation">
|
62 | <button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#levels" type="button" role="tab" aria-selected="false">Representations</button>
|
63 | </li>
|
64 | <li class="nav-item" role="presentation">
|
65 | <button class="nav-link" id="profile-tab" data-bs-toggle="tab" data-bs-target="#player-stats" type="button" role="tab" aria-selected="false">Player Stats</button>
|
66 | </li>
|
67 | </ul>
|
68 |
|
69 | <div class="tab-content container-fluid">
|
70 |
|
71 | <div class="tab-pane active" id="sources" role="tabpanel">
|
72 | <div class="input-group mb-2">
|
73 | <span class="input-group-text"><label for=load-source>Preloaded Sources</label></span>
|
74 | <select id=load-source class="form-select">
|
75 | <optgroup label="hls">
|
76 | </optgroup>
|
77 | <optgroup label="dash">
|
78 | </optgroup>
|
79 | <optgroup label="drm">
|
80 | </optgroup>
|
81 | <optgroup label="live">
|
82 | </optgroup>
|
83 | <optgroup label="low latency live">
|
84 | </optgroup>
|
85 | <optgroup label="json manifest object">
|
86 | </optgroup>
|
87 | </select>
|
88 | </div>
|
89 |
|
90 | <label for=url class="form-label">Source URL</label>
|
91 | <div class="input-group">
|
92 | <span class="input-group-text"><label for=url>Url</label></span>
|
93 | <input id=url type=url class="form-control">
|
94 | </div>
|
95 |
|
96 | <label for=type class="form-label">Source Type (uses url extension if blank, usually application/x-mpegURL or application/dash+xml)</label>
|
97 | <div class="input-group">
|
98 | <span class="input-group-text"><label for=type>Type</label></span>
|
99 | <input id=type type=text class="form-control">
|
100 | </div>
|
101 |
|
102 | <label for="keysystems" class="form-label">Optional Keystems JSON:</label>
|
103 | <div class="input-group">
|
104 | <span class="input-group-text"><label for=keysystems>keySystems JSON</label></span>
|
105 | <textarea id=keysystems cols=100 rows=5 class="form-control"></textarea>
|
106 | </div>
|
107 |
|
108 | <button id=load-url type=button class="btn btn-primary my-2">Load</button>
|
109 |
|
110 | </div>
|
111 |
|
112 | <div class="tab-pane" id="options" role="tabpanel">
|
113 | <div class="options">
|
114 | <div class="form-check">
|
115 | <input id=minified type="checkbox" class="form-check-input">
|
116 | <label class="form-check-label" for="minified">Minified VHS (reloads player)</label>
|
117 | </div>
|
118 |
|
119 | <div class="form-check">
|
120 | <input id=sync-workers type="checkbox" class="form-check-input">
|
121 | <label class="form-check-label" for="sync-workers">Synchronous Web Workers (reloads player)</label>
|
122 | </div>
|
123 |
|
124 | <div class="form-check">
|
125 | <input id=liveui type="checkbox" class="form-check-input" checked>
|
126 | <label class="form-check-label" for="liveui">Enable the live UI (reloads player)</label>
|
127 | </div>
|
128 |
|
129 | <div class="form-check">
|
130 | <input id=fluid type="checkbox" class="form-check-input">
|
131 | <label class="form-check-label" for="fluid">Fluid mode</label>
|
132 | </div>
|
133 |
|
134 | <div class="form-check">
|
135 | <input id=debug type="checkbox" class="form-check-input">
|
136 | <label class="form-check-label" for="debug">Debug Logging</label>
|
137 | </div>
|
138 |
|
139 | <div class="form-check">
|
140 | <input id=muted type="checkbox" class="form-check-input">
|
141 | <label class="form-check-label" for="muted">Muted</label>
|
142 | </div>
|
143 |
|
144 | <div class="form-check">
|
145 | <input id=autoplay type="checkbox" class="form-check-input">
|
146 | <label class="form-check-label" for="autoplay">Autoplay</label>
|
147 | </div>
|
148 |
|
149 | <div class="form-check">
|
150 | <input id=network-info type="checkbox" class="form-check-input">
|
151 | <label class="form-check-label" for="network-info">Use networkInfo API for bandwidth estimations (reloads player)</label>
|
152 | </div>
|
153 |
|
154 | <div class="form-check">
|
155 | <input id=dts-offset type="checkbox" class="form-check-input">
|
156 | <label class="form-check-label" for="dts-offset">Use DTS instead of PTS for Timestamp Offset calculation (reloads player)</label>
|
157 | </div>
|
158 |
|
159 | <div class="form-check">
|
160 | <input id=llhls type="checkbox" class="form-check-input">
|
161 | <label class="form-check-label" for="llhls">[EXPERIMENTAL] Enables support for ll-hls (reloads player)</label>
|
162 | </div>
|
163 |
|
164 | <div class="form-check">
|
165 | <input id=buffer-water type="checkbox" class="form-check-input">
|
166 | <label class="form-check-label" for="buffer-water">[EXPERIMENTAL] Use Buffer Level for ABR (reloads player)</label>
|
167 | </div>
|
168 |
|
169 | <div class="form-check">
|
170 | <input id=exact-manifest-timings type="checkbox" class="form-check-input">
|
171 | <label class="form-check-label" for="exact-manifest-timings">[EXPERIMENTAL] Use exact manifest timings for segment choices (reloads player)</label>
|
172 | </div>
|
173 |
|
174 | <div class="form-check">
|
175 | <input id=pixel-diff-selector type="checkbox" class="form-check-input">
|
176 | <label class="form-check-label" for="pixel-diff-selector">[EXPERIMENTAL] Use the Pixel difference resolution selector (reloads player)</label>
|
177 | </div>
|
178 |
|
179 | <div class="form-check">
|
180 | <input id=override-native type="checkbox" class="form-check-input" checked>
|
181 | <label class="form-check-label" for="override-native">Override Native (reloads player)</label>
|
182 | </div>
|
183 |
|
184 | <div class="form-check">
|
185 | <input id=mirror-source type="checkbox" class="form-check-input" checked>
|
186 | <label class="form-check-label" for="mirror-source">Mirror sources from player.src (reloads player, uses EXPERIMENTAL sourceset option)</label>
|
187 | </div>
|
188 |
|
189 | <div class="input-group">
|
190 | <span class="input-group-text"><label for=preload>Preload (reloads player)</label></span>
|
191 | <select id=preload class="form-select">
|
192 | <option selected>auto</option>
|
193 | <option>none</option>
|
194 | <option>metadata</option>
|
195 | </select>
|
196 | </div>
|
197 | </div>
|
198 | </div>
|
199 |
|
200 | <div class="tab-pane" id="levels" role="tabpanel">
|
201 | <div class="input-group">
|
202 | <span class="input-group-text"><label for=representations>Representations</label></span>
|
203 | <select id='representations' class="form-select"></select>
|
204 | </div>
|
205 | </div>
|
206 |
|
207 | <div class="tab-pane" id="player-stats" role="tabpanel">
|
208 | <div class="row">
|
209 | <div class="player-stats col-4">
|
210 | <dl>
|
211 | <dt>Current Time:</dt>
|
212 | <dd class="current-time-stat">0</dd>
|
213 | <dt>Buffered:</dt>
|
214 | <dd class="buffered-stat">-</dd>
|
215 | <dt>Video Buffered:</dt>
|
216 | <dd class="video-buffered-stat">-</dd>
|
217 | <dt>Audio Buffered:</dt>
|
218 | <dd class="audio-buffered-stat">-</dd>
|
219 | <dt>Seekable:</dt>
|
220 | <dd><span class="seekable-start-stat">-</span> - <span class="seekable-end-stat">-</span></dd>
|
221 | <dt>Video Bitrate:</dt>
|
222 | <dd class="video-bitrate-stat">0 kbps</dd>
|
223 | <dt>Measured Bitrate:</dt>
|
224 | <dd class="measured-bitrate-stat">0 kbps</dd>
|
225 | <dt>Video Timestamp Offset</dt>
|
226 | <dd class="video-timestampoffset">0</dd>
|
227 | <dt>Audio Timestamp Offset</dt>
|
228 | <dd class="audio-timestampoffset">0</dd>
|
229 | </dl>
|
230 | </div>
|
231 | <ul id="segment-metadata" class="col-8"></ul>
|
232 | </div>
|
233 | </div>
|
234 | </div>
|
235 |
|
236 | <footer class="text-center p-3" id=unit-test-link>
|
237 | <a href="test/debug.html">Run unit tests</a>
|
238 | </footer>
|
239 |
|
240 | <script>
|
241 | var unitTestLink = document.getElementById('unit-test-link');
|
242 |
|
243 |
|
244 | if ((/netlify.app/).test(window.location.host)) {
|
245 | unitTestLink.remove();
|
246 | }
|
247 | </script>
|
248 | <script src="node_modules/bootstrap/dist/js/bootstrap.js"></script>
|
249 | <script src="scripts/index.js"></script>
|
250 | <script>
|
251 | window.startDemo(function(player) {
|
252 |
|
253 | });
|
254 | </script>
|
255 | </body>
|
256 | </html>
|