-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.html
87 lines (68 loc) · 2.44 KB
/
index.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>um-video-player.js test</title>
<!-- Dependancies -->
<script src="./js/jquery-2.1.0.min.js"></script>
<script src="./js/video.js"></script>
<link rel="stylesheet" href="./css/video-js.css" />
<!-- Actual um-video-player.js -->
<script src="./js/um-video-player.js"></script>
<!-- Custom Style Sheets -->
<link rel="stylesheet" href="css/style.css" />
<!-- Basic Usage of um-video-player.js-->
<script>
var renderObjects = {
rID: 1,
rtitle: 'Ultimate Media Remix',
rthumbnail: 'moon_thumb.png',
contentURLs: [{
url: "http://um-static.media.mit.edu/UU-0MrczERAe4/UU-0MrczERAe4_low.mp4",
startTime: 2.0,
endTime: 5.0,
}, {
url: "http://um-static.media.mit.edu/UU-2QqLqnxXJc/UU-2QqLqnxXJc_low.mp4",
startTime: 2.0,
endTime: 10.0,
}, {
url: "http://um-static.media.mit.edu/UU-0MrczERAe4/UU-0MrczERAe4_low.mp4",
startTime: 54.0,
endTime: 59.0,
}, {
url: "http://um-static.media.mit.edu/UU-2QqLqnxXJc/UU-2QqLqnxXJc_low.mp4",
startTime: 10.0,
endTime: 15.0,
}, {
url: "http://um-static.media.mit.edu/UU-0MrczERAe4/UU-0MrczERAe4_low.mp4",
startTime: 34.0,
endTime: 37.0,
}],
pub_date: [2013,07,30],
};
$(document).ready(function(){
var player;
function onReady() {
console.log("READY");
player.play();
}
function onLoadError(e) {
console.log("ERROR", e);
}
function onTimeUpdate() {
console.log("ON TIME UPDATE", "Current Time is:", this.currentTime());
}
function onFinish() {
console.log("ON FINISH");
}
player = new UMVideoPlayer("#um_video_player_wrapper", onReady, onLoadError, onTimeUpdate, onFinish);
player.setRenderObject(renderObjects);
});
</script>
</head>
<body>
<!-- Placeholder for video player -->
<div id="um_video_player_wrapper"></div>
</body>
</html>