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