-
Notifications
You must be signed in to change notification settings - Fork 5
/
dash-drm-4.html
65 lines (62 loc) · 1.97 KB
/
dash-drm-4.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<title>DASH DRM - 8 Byte IV (Verizon - Widevine)</title>
<link rel="stylesheet" type="text/css" href="css/player.css">
<meta name="robots" content="noindex">
</head>
<body>
<script src="https://cdn.radiantmediatechs.com/rmp/8.4.10/js/rmp.min.js"></script>
<div id="rmp"></div>
<script>
let lastUplynkPrefix = '';
var shakaCustomResponseFilter = function (type, response) {
if (type == shaka.net.NetworkingEngine.RequestType.MANIFEST) {
// Parse a custom header that contains a value needed to build a proper
// license server URL.
if (response.headers['x-uplynk-prefix']) {
lastUplynkPrefix = response.headers['x-uplynk-prefix'];
} else {
lastUplynkPrefix = '';
}
}
};
var shakaCustomRequestFilter = function (type, request) {
if (type == shaka.net.NetworkingEngine.RequestType.LICENSE) {
// Modify the license request URL based on our cookie.
if (request.uris[0].includes('wv') && lastUplynkPrefix) {
request.uris[0] = lastUplynkPrefix.concat('/wv');
}
}
};
var src = {
dash: 'https://content.uplynk.com/847859273a4b4a81959d8fea181672a4.mpd?pr.version=2&pr.playenabler=B621D91F-EDCC-4035-8D4B-DC71760D43E9&pr.securitylevel=150'
};
var settings = {
licenseKey: 'your-license-key',
src: src,
autoplay: true,
capLevelToPlayerSize: false,
ignoreDevicePixelRatio: false,
disableKeyboardControl: true,
delayToFade: 5000,
shakaCustomRequestFilter: shakaCustomRequestFilter,
shakaCustomResponseFilter: shakaCustomResponseFilter,
contentMetadata: {
title: 'DASH DRM - 8 Byte IV (Verizon - Widevine)',
},
shakaDrm: {
servers: {
'com.widevine.alpha': 'https://content.uplynk.com/wv'
}
},
skin: 'tv'
};
window.rmp = new RadiantMP('rmp');
window.rmp.init(settings);
</script>
<script src="js/player.js"></script>
</body>
</html>