blob: 590bb00abd5366b2ff17f755d775736901dac013 [file] [log] [blame]
<html>
<head>
<script src=video-test.js></script>
<script>
var ratechangeCount = 0;
var playingCount = 0;
function eventHandler()
{
consoleWrite("EVENT(" + event.type + ")");
switch (event.type)
{
case "load":
consoleWrite("");
run("video.play()");
break;
case "playing":
if (++playingCount == 1) {
consoleWrite("");
run("video.playbackRate = 2");
}
break;
case "ratechange":
if (++ratechangeCount == 1) {
consoleWrite("");
run("video.volume = 0.5");
}
break;
case "volumechange":
consoleWrite("");
run("video.pause()");
break;
case "pause":
consoleWrite("");
run("video.currentTime = 5.6");
break;
case "seeked":
consoleWrite("");
run("video.play()");
break;
case "ended":
consoleWrite("");
run("video.src = 'content/garbage.mp4'");
run("video.load()");
break;
case "error":
endTest();
break;
default:
break;
}
}
function start()
{
findMediaElement();
}
</script>
</head>
<body onload="start()">
<video controls src="content/test.mp4"
onabort="eventHandler()"
oncanplay="eventHandler()"
oncanplaythrough="eventHandler()"
ondurationchange="eventHandler()"
onemptied="eventHandler()"
onended="eventHandler()"
onerror="eventHandler()"
onload="eventHandler()"
onloadeddata="eventHandler()"
onloadedmetadata="eventHandler()"
onloadstart="eventHandler()"
onpause="eventHandler()"
onplay="eventHandler()"
onplaying="eventHandler()"
onprogress="eventHandler()"
onratechange="eventHandler()"
onseeked="eventHandler()"
onseeking="eventHandler()"
onstalled="eventHandler()"
onsuspend="eventHandler()"
onvolumechange="eventHandler()"
onwaiting="eventHandler()"
>
</video>
</body>
</html>