-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
436 lines (431 loc) · 17.9 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
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
<!-- Copyright © 2015 Infrared5, Inc. All rights reserved.
The accompanying code comprising examples for use solely in conjunction with Red5 Pro (the "Example Code")
is licensed to you by Infrared5 Inc. in consideration of your agreement to the following
license terms and conditions. Access, use, modification, or redistribution of the accompanying
code constitutes your acceptance of the following license terms and conditions.
Permission is hereby granted, free of charge, to you to use the Example Code and associated documentation
files (collectively, the "Software") without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
persons to whom the Software is furnished to do so, subject to the following conditions:
The Software shall be used solely in conjunction with Red5 Pro. Red5 Pro is licensed under a separate end
user license agreement (the "EULA"), which must be executed with Infrared5, Inc.
An example of the EULA can be found on our website at: https://account.red5.net/assets/LICENSE.txt.
The above copyright notice and this license shall be included in all copies or portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL INFRARED5, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Red5 Pro TrueTime MultiView</title>
<link rel="stylesheet" href="css/main.css" />
<link rel="stylesheet" href="lib/red5pro/red5pro-media.css" />
<!-- SDK controls style override. -->
<link rel="stylesheet" href="css/ttmv-controls.css" />
<link rel="stylesheet" href="css/embed.css" />
<link rel="stylesheet" href="css/demo.css" />
<script src="//webrtchacks.github.io/adapter/adapter-latest.js"></script>
<script src="//cdn.jsdelivr.net/npm/hls.js@latest"></script>
<script>
;(function () {
console.log('------- USAGE --------')
console.log('')
console.log(
'This page is designed to establish a TrueTime MultiView webapp using query params. You can provide query params in the URL in order to configure the webapp.'
)
console.log('The following query params are available:')
console.log(
'%c [host] ' +
'%c : hostname or IP. Default: `window.location.hostname`',
'background: #222; color: #ebefd0',
'background: #fff; color: #222'
)
console.log('')
console.log(
'%c [app] ' + '%c : app context. Default: `live`',
'background: #222; color: #ebefd0',
'background: #fff; color: #222'
)
console.log('')
console.log(
'%c [url] ' +
'%c : The optional service URL (including protocol and possible port) that `GET` requests will be made on to retrieve the current list of live streams. Default: `undefined`',
'background: #222; color: #ebefd0',
'background: #fff; color: #222'
)
console.log('')
console.log(
'%c [sm] ' +
'%c : The optional flag to notify the client that it will be connecting over a Stream Manager deployment. Default: `false`',
'background: #222; color: #ebefd0',
'background: #fff; color: #222'
)
console.log('')
console.log(
'%c [nodegroup] ' +
'%c : The optional node group name to be used in a Stream Manager deployment. Default: `undefined`',
'background: #222; color: #ebefd0',
'background: #fff; color: #222'
)
console.log('')
console.log(
'%c [vod] ' +
'%c : The option to allow for live seek controls of the main stream. Default: `true`',
'background: #222; color: #ebefd0',
'background: #fff; color: #222'
)
console.log('')
console.log(
'%c [abr] ' +
'%c : Flag to notify the application that the server uses Adaptive Bitrate control to provide different variants of the live streams. Default: `false`',
'background: #222; color: #ebefd0',
'background: #fff; color: #222'
)
console.log('')
console.log(
'%c [abrlow] ' +
'%c : When `abr=true`, the specified ladder suffix/index at which the lowest ABR variant resides. This is used in accessing the live stream by name. All the non "main feed" subscribe will then load and playback the lowest ABR variant. Default: `3`',
'background: #222; color: #ebefd0',
'background: #fff; color: #222'
)
console.log('')
console.log(
'%c [abrhigh] ' +
'%c : When `abr=true`, the specified ladder suffic/index at which the highest ABR variant resides. This is used in accessing the live stream by name. Only the "main feed" playback will load the highest ABR variant. Default: `1`',
'background: #222; color: #ebefd0',
'background: #fff; color: #222'
)
console.log('')
console.log(
'%c [vodbase] ' +
'%c : The base URL in which the VOD files for the live streams are located. By default it will look on the `host` for the VOD files. Using this query param you can specify a specific remote base location where the VOD files can be found - such as a CDN or NFS. Default: `undefined`',
'background: #222; color: #ebefd0',
'background: #fff; color: #222'
)
console.log('')
console.log(
'%c [embed] ' +
'%c : Flag to enable the ability for users to access the embed options to host their own TrueTime MultiView web application. Default: `false`',
'background: #222; color: #ebefd0',
'background: #fff; color: #222'
)
console.log('')
console.log(
'%c [debug] ' +
'%c : Flag to enable debug logging in the browser Dev Console. Default: `false`',
'background: #222; color: #ebefd0',
'background: #fff; color: #222'
)
console.log('')
console.log('------- /USAGE --------')
})()
</script>
</head>
<body>
<!-- Main UI-->
<div id="app">
<div id="logo-holder">
<img
class="logo-holder_img"
src="assets/Red5_Truetime_White_Horz.png"
alt="Red5 TrueTime DataSync"
/>
</div>
<!-- Holds the Main Live Seek enabled playback stream. -->
<div class="main-video-container"></div>
<!-- Holds the tray of secondary playback streams. -->
<div class="secondary-video-container"></div>
</div>
<!-- Tools for when demo mode and embed mode are turned on. -->
<div id="tools">
<div id="embedder" class="hidden">
<p>
<img src="icons/gear-solid.svg" alt="Embed" width="22" height="22" />
</p>
</div>
<p id="flip" class="hidden">
<button id="flip-button">Flip</button>
</p>
</div>
<!-- Intro Modal -->
<div id="intro" class="intro-container hidden">
<div class="intro-container_info">
<p>
The Red5 Pro TrueTime MultiView™ is a web-based application that
allows for viewing multiple live streams while providing the ability
to switch between a "main feed" which has <em>optional</em> live seek
integration. Additionally, it provides embedding options to easily add
a TrueTime MultiView to your own website!
</p>
<p>
More information about query parameters and configuration can be seen
by opening the Dev Console of your browser.
</p>
<p class="intro-container_buttons">
<button id="intro-submit">Got it!</button>
</p>
</div>
</div>
<!-- Embed Mode Dialog -->
<dialog id="embed-dialog">
<div class="embed-dialog_container">
<h3 class="embed-dialog_title">Embed TrueTime MultiView</h3>
<div class="embed-dialog_options">
<p class="embed-dialog_message">
Copy and paste the following code to embed this video on your
website.
</p>
<textarea class="embed-dialog_code" readonly></textarea>
<div class="embed-dialog_controls">
<button class="embed-dialog_close">Copy & Close</button>
</div>
<hr style="width: 100%" />
<p>
<strong>Embed Options</strong>
</p>
<div class="embed-options">
<div class="embed-options_option">
<label class="embed-options_option_label" for="embed-options_host"
>Host:</label
>
<input
id="embed-options_host"
class="embed-options_option_input"
placeholder="Red5 Pro Server host FQDN"
/>
</div>
<div class="embed-options_option">
<label class="embed-options_option_label" for="embed-options_app"
>App:</label
>
<input
id="embed-options_app"
class="embed-options_option_input"
placeholder="App Context Name"
/>
</div>
<div class="embed-options_option">
<p class="embed-options_option_label">
<input
type="checkbox"
id="embed-options_abr"
style="margin-right: 10px"
/>
<label for="embed-options_abr">ABR:</label>
</p>
<span>Variant Levels:</span>
</div>
<div id="embed-options_variants">
High:
<input
type="number"
id="embed-options_abrhigh"
value="1"
min="1"
max="6"
/>
Low:
<input
type="number"
id="embed-options_abrlow"
value="3"
min="1"
max="6"
/>
</div>
<div class="embed-options_option">
<p class="embed-options_option_label">
<label for="embed-options_vod">Enable Live VOD:</label>
</p>
<input
id="embed-options_vod"
type="checkbox"
class="embed-options_option_input"
style="flex-grow: 0 !important"
/>
<div style="flex-grow: 1; text-align: right">
<img
aria-describedby="vod"
src="icons/circle-info-solid.svg"
class="embed-options_option_info"
width="14px"
height="14px"
/>
<p id="vod" role="tooltip" style="text-align: left">
By default, the TrueTime MultiView allows for live seek of the
main stream.
<br />
<br />
When enabled, live seek controls will be provided for the main
stream to allow you to seek back and forth in time on a live
stream.
<br />
<br />
Note:
<strong
>Live seek requires some server configuration changes.
Please refer to the
<a
href="https://github.com/red5pro/truetime-multiview#enabling-live-seek-on-server"
target="_blank"
>README</a
>.</strong
>
</p>
</div>
</div>
<div class="embed-options_option">
<p class="embed-options_option_label">
<input
type="checkbox"
id="embed-options_vod_base"
style="margin-right: 10px"
/>
<label for="embed-options_vod_base">VOD Base:</label>
</p>
<input
id="embed-options_vod_url"
class="embed-options_option_input"
placeholder="Base URL for VOD files"
/>
<img
aria-describedby="vodinfo"
src="icons/circle-info-solid.svg"
class="embed-options_option_info"
width="14px"
height="14px"
/>
<p id="vodinfo" role="tooltip">
By enabling and providing a VOD base URL, the TrueTime MultiView
will use the URL to locate any remotely held VOD files for live
seek capability.
<br />
<br />
The provided URL must be the full remote URL to the base URL of
VOD storage, including protocol.
<br />
<br />
Example:
<strong>https://mynfs.com</strong>
</p>
</div>
<div class="embed-options_option">
<p class="embed-options_option_label">
<input
type="checkbox"
id="embed-options_service"
style="margin-right: 10px"
/>
<label for="embed-options_service_url">Service:</label>
</p>
<input
id="embed-options_service_url"
class="embed-options_option_input"
/>
<img
aria-describedby="serviceinfo"
src="icons/circle-info-solid.svg"
class="embed-options_option_info"
width="14px"
height="14px"
/>
<p id="serviceinfo" role="tooltip">
By enabling and providing a service URL, the TrueTime MultiView
will use the service to request a list of available streams to
load and playback.
<br />
<br />
The provided URL must be the full remote URL to the service,
including protocol. Example:
<strong>https://mydomain.com/my-service</strong>
<br />
<br />
By setting the service URL, any <strong>Streams</strong> defined
below will be ignored.
</p>
</div>
<div class="embed-options_option">
<p class="embed-options_option_label">
<input
type="checkbox"
id="embed-options_params"
style="margin-right: 10px"
/>
<label for="embed-options_params">Streams:</label>
</p>
<button id="add-stream-button">Add Stream</button>
<img
aria-describedby="streamsinfo"
src="icons/circle-info-solid.svg"
class="embed-options_option_info"
width="14px"
height="14px"
style="position: absolute; margin-left: 0px; right: 14px"
/>
<p id="streamsinfo" role="tooltip">
By providing a list of streams, the TrueTime MultiView will
parse the added query params and load the streams for playback.
<br />
<br />
The <strong>Label</strong> value will be display textually, and
the <strong>Stream</strong> value will be used to load the
stream for playback.
<br />
<br />
If the <strong>Service</strong> option above is enabled, any
streams defined here will be ignored.
</p>
</div>
<div id="embed-options_stream-list"></div>
</div>
<hr />
<div class="embed-dialog_api">
<p class="embed-dialog_api_link">
<strong
><a href="README.md" target="_blank" class="embed-dialog_link"
>API Reference</a
></strong
>
</p>
<p class="embed-dialog_api_terms">
By using the embedding options you agree to the
<a href="LICENSE" target="_blank" class="embed-dialog_link"
>License and Terms of Service</a
>.
</p>
</div>
<hr />
<div class="embed-dialog_controls">
<button class="embed-dialog_close">Copy & Close</button>
</div>
</div>
</div>
</dialog>
<!-- Error Dialog -->
<dialog id="error-modal">
<div class="dialog_container">
<h3 class="error-modal_title"></h3>
<p class="error-modal_message"></p>
<button class="error-modal_close">OK</button>
</div>
</dialog>
<!-- Warning Dialog -->
<dialog id="warning-modal">
<div class="dialog_container">
<h3 class="warning-modal_title"></h3>
<p class="warning-modal_message"></p>
<button class="warning-modal_close">Got It</button>
</div>
</dialog>
<!-- scripts -->
<!-- <script src="lib/red5pro/red5pro-sdk.min.js"></script> -->
<script src="https://unpkg.com/red5pro-webrtc-sdk@latest/red5pro-sdk.min.js"></script>
<script type="module" src="script/embed-mode.js"></script>
<script type="module" src="script/demo-mode.js"></script>
<script type="module" src="script/main.js"></script>
</body>
</html>