blob: 75c84876fc0970a7073019bee2f1ddaa0cec9b1d [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>video events - canplay, then canplaythrough</title>
<script src="../../w3cwrapper.js"></script>
<script src="../../../Microsoft/common/media.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#mediaevents">spec reference</a></p>
<video id="a" autoplay controls>
</video>
<div id="log"></div>
<script>
var t = async_test("setting src attribute on autoplay video should trigger canplay then canplaythrough event", {timeout:60000});
var a = document.getElementById("a");
var found_canplay = false;
a.addEventListener("canplay", function() {
found_canplay = true;
});
a.addEventListener("canplaythrough", function() {
t.step(function() {
assert_true(found_canplay);
});
t.done();
a.pause();
});
a.src = getAudioURI("http://media.w3.org/2010/05/sound/sound_5") + "?" + new Date() + Math.random();
</script>
</body>
</html>