-
Notifications
You must be signed in to change notification settings - Fork 5
/
shakaplayer-wrapper.html
46 lines (39 loc) · 1.58 KB
/
shakaplayer-wrapper.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
<!doctype html>
<html>
<head>
<title>Shaka Player DNA Wrapper</title>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<style>
body {
font-family: 'Roboto', sans-serif;
}
</style>
<link rel="stylesheet" href="//samples.streamroot.io/web/assets/demo-pages.css">
<!-- Makes the header -->
<script src="//samples.streamroot.io/web/assets/header.js"></script>
<!-- Builds -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/shaka-player/2.3.7/shaka-player.compiled.js"></script>
<script src="//cdn.streamroot.io/shakaplayer-dna-wrapper/1/stable/shakaplayer-dna-wrapper.js"></script>
<!-- Graphs -->
<script src="//tools.streamroot.io/usage-graphs/stable/graphs.js"></script>
<body>
<header></header>
<center>
<video controls autoplay muted id="demoplayer" width="512" height="288"></video>
</center>
<script>
var videoElement = document.getElementById('demoplayer');
var shakaplayer = new shaka.Player(videoElement);
var playerConfig = {
streaming: {
bufferingGoal: 30,
},
};
var dnaConfig = {};
var wrapper = new ShakaPlayerDnaWrapper(shakaplayer, 'demoswebsiteandpartners', dnaConfig);
shakaplayer.configure(playerConfig);
shakaplayer.load('https://wowza-test-cloudfront.streamroot.io/vodOrigin/tos1500.mp4/manifest.mpd');
</script>
<div id="streamroot-graphs"></div>
</body>
</html>