-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.html
80 lines (70 loc) · 2.69 KB
/
test.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
<!DOCTYPE html>
<html>
<head>
<title>Combination Test</title>
<script src="soundmanager2.js"></script>
<script src="html5flash.js"></script>
</head>
<body onload="">
<audio src="media/audio.mp3" autobuffer="true" controls="true"></audio>
<div id="test1">
</div>
<audio id="soundauto" autobuffer="false">
<source type="audio/x-aac" ></source>
<source src="media/audio.aac" type="audio/x-aac" ></source>
<source src="media/audio.flac" type="audio/x-flac"></source>
<source src="media/audio.ogg" type="audio/ogg" ></source>
<source src="media/audio.wmv" type="audio/wmv" ></source>
<source src="media/audio.mp3" type="audio/mp3" ></source>
<source src="media/audio.wav" type="audio/wav" ></source>
</audio>
<div id="test2">
</div>
<div id="sm2-container"></div>
<video controls="false" autoplay="true" width="640" height="480">
<source src="media/video.flv" type="video/flv" ></source>
</video>
<script type="text/javascript">
function runTests() {
console.log("starting tests");
var html5tags = getHTML5Tags();
out = "";
out += "<br/>src: " + html5tags[0].src;
out += "<br/>autobuffer: " + html5tags[0].autobuffer;
out += "<br/>autoplay: " + html5tags[0].autoplay;
out += "<br/>loop: " + html5tags[0].loop;
out += "<br/>controls: " + html5tags[0].controls;
out += "<br/>played: " + (html5tags[0].played instanceof TimeRanges);
document.getElementById("test1").innerHTML=out;
//html5tags[0].play();
html5tags[0].addCueRange("test", "test", 13, 15, true, function() {console.log("entering")}, function() {console.log("exiting")});
window.setTimeout(function() {
html5tags[0].play();
},1000);
window.setTimeout(function() {
html5tags[0].pause();
},3000);
window.setTimeout(function() {
html5tags[0].volume = 0.5;
html5tags[0].play();
},5000);
window.setTimeout(function() {
html5tags[0].muted = true;
html5tags[0].play();
},7000);
window.setTimeout(function() {
html5tags[0].muted = false;
html5tags[0].play();
},9000);
out = "";
out += "<br/>currentSrc: " + html5tags[1].currentSrc;
out += "<br/>autobuffer: " + html5tags[1].autobuffer;
out += "<br/>autoplay: " + html5tags[1].autoplay;
out += "<br/>loop: " + html5tags[1].loop;
out += "<br/>controls: " + html5tags[1].controls;
out += "<br/>played: " + (html5tags[1].played instanceof TimeRanges);
document.getElementById("test2").innerHTML=out;
}
</script>
</body>
</html>