-
Notifications
You must be signed in to change notification settings - Fork 0
/
astro.html
47 lines (46 loc) · 1.72 KB
/
astro.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
<!doctype html>
<html>
<head>
<meta http-equiv="Permissions-Policy" content="interest-cohort=()">
<title>Dash.js Rocks</title>
<style>
video {
width: 640px;
height: 360px;
}
</style>
</head>
<body>
<div>
<video id="videoPlayer" controls></video>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/dashjs/4.7.4/dash.mediaplayer.debug.min.js"></script>
<script>
function init() {
const protData = {
"org.w3.clearkey": {
"clearkeys": {
"03c2e0af2f8159f9f0ce9b5dbc865f10": "cd84ed136b0cc71f8ab8cd4d4f6a2e4c"
}
}
};
var video,
player,
url = "https://linearjitp-playback.astro.com.my/dash-wv/linear/2504/default.mpd";
video = document.querySelector("video");
player = dashjs.MediaPlayer().create();
player.initialize(video, url, true);
player.setProtectionData(protData);
}
function check() {
if (location.protocol === 'http:' && location.hostname !== 'localhost') {
var out = 'This page has been loaded under http. This might result in the EME APIs not being available to the player and any DRM-protected content will fail to play. ' +
'If you wish to test manifest URLs that require EME support, then <a href=\'https:' + window.location.href.substring(window.location.protocol.length) + '\'>reload this page under https</a>.'
var div = document.getElementById('http-warning');
div.innerHTML = out;
div.style.display = ''
}
}
</script>
</body>
</html>