blob: 0f058b031553fe8a87cb39eb2fe9c8aa4f6060d5 [file] [log] [blame]
<!doctype html>
<html>
<head>
<title>audio events - readyState property during canplay</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#mediaevents">spec reference</a></p>
<audio id="a" autoplay controls>
</audio>
<div id="log"></div>
<script>
var t = async_test("audio.readyState should be >= HAVE_FUTURE_DATA during canplay event", {timeout:30000});
var a = document.getElementById("a");
a.addEventListener("canplay", function() {
t.step(function() {
assert_true(a.readyState >= a.HAVE_FUTURE_DATA);
});
t.done();
a.pause();
});
a.src = getAudioURI("http://media.w3.org/2010/05/sound/sound_5") + "?" + new Date() + Math.random();
</script>
</body>
</html>