forked from polimediaupv/paella
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index-custom.html
71 lines (63 loc) · 2.96 KB
/
index-custom.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
66
67
68
69
70
71
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8;">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name = "viewport" content = "user-scalable=no, initial-scale=1.0, maximum-scale=1.0, width=device-width">
<title>Paella Engage Example</title>
<script type="text/javascript" src="javascript/polyfill.min.js"></script>
<script type="text/javascript" src="javascript/swfobject.js"></script>
<script type="text/javascript" src="javascript/base.js"></script>
<script type="text/javascript" src="javascript/jquery.js"></script>
<script type="text/javascript" src="javascript/lunr.min.js"></script>
<script type="text/javascript" src="javascript/require.js"></script>
<script type="text/javascript" src="javascript/paella_player.js"></script>
<link rel="stylesheet" href="resources/bootstrap/css/bootstrap.min.css" type="text/css" media="screen" charset="utf-8">
<script>
function doLoad() {
paella.load('playerContainer',{
config:null, // You can put here your configuration file
// Custom configuration load: this function is called only if the
// previous parameter is null or undefined
loadConfig: function(defaultConfigUrl) {
return new Promise((resolve) => {
base.ajax.get({ url:defaultConfigUrl }, (data,type,returnCode) => {
resolve(data);
})
});
},
// paella.player.repoUrl
url:'../repository/',
// paella.player.videoUrl
videoUrl:function () {
return paella.player.repoUrl + paella.player.videoId + '/';
},
// paella.player.dataUrl
dataUrl:function () {
return paella.player.videoUrl + 'data.json'
},
loadVideo: function() {
return new Promise((resolve) => {
let url = paella.player.dataUrl;
base.ajax.get({ url:url },
function(data,type,err) {
if (typeof(data)=="string") {
try {
data = JSON.parse(data);
}
catch(e) {}
}
resolve(data);
}
);
})
}
})
}
</script>
</head>
<body id="body" onload="doLoad()">
<div id="playerContainer" style="display:block;width:100%">
</div>
</body>
</html>