-
Notifications
You must be signed in to change notification settings - Fork 20
/
index.html
57 lines (49 loc) · 1.98 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>
<head>
<meta charset="utf-8" />
<title>bigscreen-player</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<script type="module">
import { BigscreenPlayer } from "./dist-local/esm/main.js"
window.bigscreenPlayer = { playbackStrategy: "msestrategy" }
let player = BigscreenPlayer()
let playbackElement = document.createElement("div")
window.bsp_player = player
document.body.appendChild(playbackElement)
playbackElement.style.position = "absolute"
playbackElement.style.height = "720px"
playbackElement.style.width = "1280px"
let windowType = "staticWindow"
let enableSubtitles = false
let minimalData = {
initialPlaybackTime: 30,
media: {
captions: [],
type: "application/dash+xml",
mimeType: "video/mp4",
kind: "video",
urls: [
{
// Content from DASH IF testing assests (used in their reference player)
// https://reference.dashif.org/dash.js/v2.9.2/samples/dash-if-reference-player/index.htm
url: "https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd",
cdn: "dash.akamaized.net",
},
],
},
}
player.init(playbackElement, minimalData, windowType, enableSubtitles, {
onSuccess: function () {
player.toggleDebug()
},
onError: function (error) {
player.toggleDebug()
throw new Error("Initialisation failed.", { cause: error })
},
})
</script>
</body>
</html>