-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
79 lines (72 loc) · 3.59 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>THEOplayer 2.X: Getting Started</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<!-- THEOplayer library and css -->
<script
type="text/javascript"
src="https://cdn.myth.theoplayer.com/02196505-e486-4b75-b1da-fca6d688215b/THEOplayer.js"
></script>
<script type='text/javascript' src='latencymanager.js'></script> <!-- adds the Latency manager JS file -->
<link
rel="stylesheet"
type="text/css"
href="https://cdn.myth.theoplayer.com/02196505-e486-4b75-b1da-fca6d688215b/ui.css"
/>
</head>
<body>
<div
class="theoplayer-container video-js theoplayer-skin vjs-16-9"
></div>
<script>
var element = document.querySelector('.theoplayer-container');
var player = new THEOplayer.Player(element, {
libraryLocation:
'https://cdn.myth.theoplayer.com/02196505-e486-4b75-b1da-fca6d688215b',
license:
'sZP7IYe6T6fk0Lat3uhk36zZTSxeFSacIua-TufcC6ztISeo0oBzIlAeCKa6FOPlUY3zWokgbgjNIOf9fK0zCLAe3L5oFDxg3Le-3ub_TOzr3LaLFSCiISao0D410LIeCmfVfK4_bQgZCYxNWoryIQXzImf90SCL0L5_0lai0u5i0Oi6Io4pIYP1UQgqWgjeCYxgflEc3lftTu5k0ufiTu0oFOPeWok1dDrLYtA1Ioh6TgV6v6fVfKcqCoXVdQjLUOfVfGxEIDjiWQXrIYfpCoj-fgzVfKxqWDXNWG3ybojkbK3gflNWf6E6FOPVWo31WQ1qbta6FOPzdQ4qbQc1sD4ZFK3qWmPUFOPLIQ-LflNWfK1zWDikfgzVfG3gWKxydDkibK4LbogqW6f9UwPkIYz'
});
// OPTIONAL CONFIGURATION
// Customized video player parameters
player.source = {
sources: [
{
src:
'https://fp-streaming-257318123.b-cdn.net/streams/4b51da388de0f10a418b3ebff33812c9/4b51da388de0f10a418b3ebff33812c9.mpd',
type: 'application/dash+xml',
lowLatency: true,
liveOffset : 1.0 //The offset in seconds used to determine the live point. This live point is the end of the manifest minus the provided offset.
},
{
src:
'https://fp-streaming-257318123.b-cdn.net/streams/4b51da388de0f10a418b3ebff33812c9_adaptive.m3u8',
type: 'application/x-mpegurl',
//lowLatency: true,
//liveOffset : 1.0 //The offset in seconds used to determine the live point. This live point is the end of the manifest minus the provided offset.
}
]
};
player.autoplay = true;
player.muted = true;
player.preload = 'auto';
// using JSON syntax, create an array with the stated objects, and initialise the appConfig variable
var appConfig = {
"targetlatency" : 2000,
"seekwindow" : 1000,
"latencywindow" : 100,
"encoderlatency" : 0,
"useencodertime" : false,
"interval" : 40,
"fireupdate" : false,
"ratechange" : 0.08,
"sync" : true,
"disableonpause" : false,
"timeserver": "https://time.akamai.com/?iso&ms"
};
// initialise the latency manager
THEOplayer.initializeLatencyManager(player, appConfig);
</script>
</body>
</html>