4 <script src=media-file.js></script>
5 <script src=video-test.js></script>
9 var canplaythroughCount = 0;
14 audio = document.querySelector("audio");
15 waitForEvent("ended", ended);
17 audio.src = findMediaFile("audio", "content/silence")
25 testExpected("audio.ended", true);
27 // Change src but don't seek so that internal state isn't reset.
28 audio.src = findMediaFile("audio", "content/silence")
29 testExpected("audio.ended", false);
34 testExpected("audio.ended", true);
41 <body onload="start()">
42 <audio controls autoplay></audio>
43 <p><b>Test ended by:</b>
45 <li>Play to the end.</li>
46 <li>When 'ended' event fires, change the source.</li>
47 <li>Verify that 'ended' event fires again on different source.</li>