-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdash-vod-multiple-cc.html
More file actions
55 lines (52 loc) · 1.55 KB
/
Copy pathdash-vod-multiple-cc.html
File metadata and controls
55 lines (52 loc) · 1.55 KB
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
<!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 Multiple CC</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/10.1.2/js/rmp.min.js"></script>
<div id="rmp"></div>
<script>
const ccFiles = [
['en', 'English', 'https://www.radiantmediaplayer.com/media/vtt/captions/cc.vtt'],
['fr', 'Français', 'https://www.radiantmediaplayer.com/media/vtt/captions/cc-fr.vtt']
];
const src = {
dash: 'https://5b44cf20b0388.streamlock.net:8443/vod/smil:bbb.smil/manifest.mpd'
};
const settings = {
licenseKey: 'your-license-key',
src,
autoplay: true,
capLevelToPlayerSize: false,
disableKeyboardControl: true,
ccFiles,
delayToFade: 5000,
ccFontSize: 3,
contentMetadata: {
title: 'DASH Multiple CC',
},
skin: 'tv'
};
const elementID = 'rmp';
// Create an object based on RadiantMP constructor
window.rmp = new RadiantMP(elementID);
// Initialization ... and done!
async function initRmpPlayer() {
try {
await window.rmp.init(settings);
} catch (error) {
// This should not happen often, but when it happens it could be due to:
// invalid license key|cannot find container element (or PARENT)|no playback support
console.error('Radiant Media Player failed to initialize', error);
}
}
initRmpPlayer();
</script>
<script src="js/player-cc.js"></script>
</body>
</html>