blob: 177acc6b90bcc1f021b228519a7387ba482760d2 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src=media-file.js></script>
<script src=video-test.js></script>
<script>
var controller;
var video;
function start() {
video = document.getElementById('video');
run('controller = video.controller');
controller.addEventListener('canplaythrough', canplaythrough, true);
var src = findMediaFile('video', 'content/test');
video.src = src;
}
function canplaythrough() {
consoleWrite("EVENT(canplaythrough)");
controller.removeEventListener('canplaythrough', canplaythrough, true);
run('video.play()');
controller.addEventListener('playing', playing, true);
run('controller.play()');
}
function playing() {
consoleWrite("EVENT(playing)");
controller.removeEventListener('playing', playing, true);
setTimeout(function () {
testExpected("controller.currentTime", 0, ">");
endTest();
}, 100);
}
</script>
</head>
<body onload="start()">
<video id="video" mediaGroup="group" controls></video>
</body>
</html>