-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex-dashjs.html
38 lines (36 loc) · 1.65 KB
/
index-dashjs.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
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<script src="https://cdn.dashjs.org/latest/dash.all.min.js"></script>
<link rel="stylesheet" href="css/style.css">
<script>
function initApp() {
var url = "https://demo.cf.castlabs.com/media/bbb_abr/Manifest.mpd";
const protData = {
"com.widevine.alpha": {
"serverURL": "https://lic.staging.drmtoday.com/license-proxy-widevine/cenc/?specConform=true",
"httpRequestHeaders": {
// "x-dt-auth-token": "your upfront token goes here"
"x-dt-custom-data" : "eyJ1c2VySWQiOiAicHVyY2hhc2UiLCAibWVyY2hhbnQiOiAiY2xpZW50X2RldiIsICJzZXNzaW9uSWQiOiAiZGVmYXVsdCJ9"
}
},
"com.microsoft.playready": {
"serverURL": "https://lic.staging.drmtoday.com/license-proxy-headerauth/drmtoday/RightsManager.asmx",
"httpRequestHeaders": {
// "x-dt-auth-token": "your upfront token goes here"
"x-dt-custom-data" : "eyJ1c2VySWQiOiAicHVyY2hhc2UiLCAibWVyY2hhbnQiOiAiY2xpZW50X2RldiIsICJzZXNzaW9uSWQiOiAiZGVmYXVsdCJ9"
}
}
};
var player = dashjs.MediaPlayer().create();
player.initialize(document.querySelector("#video"), url, true);
player.setProtectionData(protData);
};
document.addEventListener('DOMContentLoaded', initApp);
</script>
</head>
<body>
<video id="video" height="1080" controls></video>
</body>
</html>