forked from marisademeglio/media-overlays-js
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmo.html
44 lines (38 loc) · 1.3 KB
/
mo.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
<!doctype html>
<html>
<head>
<title>Media Overlays Experiments</title>
<script src="jquery-1.7.1.min.js"></script>
<script src="underscore.js"></script>
<script src="backbone.js"></script>
<script src="mo-player.js"></script>
<script src="audio-clip-player.js"></script>
<script>
$(document).ready(function() {
var moplayer = new MediaOverlaysPlayer();
var SMIL = "http://localhost:4000/testdata/moby/chapter_001_overlay.smil";
var loaded = false;
moplayer.setHtmlBody($("body")[0]);
var audioplayer = moplayer.getAudioPlayer();
$("#playpause").click(function() {
if (audioplayer.isPlaying()) {
audioplayer.pause();
}
else {
if (loaded == false) {
loaded = true;
moplayer.playFile(SMIL);
}
else {
audioplayer.resume();
}
}
});
});
</script>
</head>
<body>
<h1>Media Overlays Playback Simulation</h1>
<button id="playpause">Play/Pause</button>
</body>
</html>