4 <title>Media Source Player
</title>
6 <body onload=
"runTest();">
7 <video controls
></video>
8 <script src=
"media_utils.js" type=
"text/javascript"></script>
9 <script src=
"media_source_utils.js" type=
"text/javascript"></script>
10 <script type=
"text/javascript">
11 var video
= document
.querySelector('video');
13 function onTimeUpdate() {
14 video
.removeEventListener('timeupdate', onTimeUpdate
);
15 video
.currentTime
= 0.9 * video
.duration
;
19 video
.removeEventListener('ended', failTest
);
20 installTitleEventHandler(video
, 'ended');
23 // The test completes after media starts playing, seeks to 0.9 of
24 // duration and fires the ended event.
25 // The test stops when an error or ended event fire unexpectedly.
27 loadMediaFromURL(video
);
28 video
.addEventListener('ended', failTest
);
29 video
.addEventListener('seeked', onSeeked
);
30 video
.addEventListener('timeupdate', onTimeUpdate
);