OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="/media-resources/video-test.js"></script> | 4 <script src="/media-resources/video-test.js"></script> |
5 <script src="/media/resources/media-source/webm/segment-info.js"></scrip
t> | 5 <script src="/media/resources/media-source/webm/segment-info.js"></scrip
t> |
6 <script src="webkitmediasource-util.js"></script> | 6 <script src="webkitmediasource-util.js"></script> |
7 <script> | 7 <script> |
8 var segmentHelper = new MediaSourceTest.SegmentHelper(WebMSegmentInf
o.testWebM); | 8 var segmentHelper = new MediaSourceTest.SegmentHelper(WebMSegmentInf
o.testWebM); |
9 | 9 |
10 function onSourceOpen(event) | 10 function onSourceOpen(event) |
(...skipping 10 matching lines...) Expand all Loading... |
21 try | 21 try |
22 { | 22 { |
23 consoleWrite("Appending first media segment."); | 23 consoleWrite("Appending first media segment."); |
24 segmentHelper.appendMediaSegment(0); | 24 segmentHelper.appendMediaSegment(0); |
25 | 25 |
26 consoleWrite("Calling endOfStream()."); | 26 consoleWrite("Calling endOfStream()."); |
27 mediaSource.endOfStream(); | 27 mediaSource.endOfStream(); |
28 | 28 |
29 MediaSourceTest.expectSourceState(mediaSource, "ended"); | 29 MediaSourceTest.expectSourceState(mediaSource, "ended"); |
30 | 30 |
31 MediaSourceTest.expectBufferedRange(mediaSource.sourceBu
ffers[0], [[0, 0.399]]); | 31 MediaSourceTest.expectBufferedRange(mediaSource.sourceBu
ffers[0], [[0, 0.398]]); |
32 | 32 |
33 consoleWrite("Appending second media segment."); | 33 consoleWrite("Appending second media segment."); |
34 segmentHelper.sourceBuffer.append(segmentHelper.mediaSeg
ments[1]); | 34 segmentHelper.sourceBuffer.append(segmentHelper.mediaSeg
ments[1]); |
35 | 35 |
36 MediaSourceTest.expectBufferedRange(mediaSource.sourceBu
ffers[0], [[0, 0.780]]); | 36 MediaSourceTest.expectBufferedRange(mediaSource.sourceBu
ffers[0], [[0, 0.780]]); |
37 | 37 |
38 MediaSourceTest.expectSourceState(mediaSource, "open"); | 38 MediaSourceTest.expectSourceState(mediaSource, "open"); |
39 } | 39 } |
40 catch (e) | 40 catch (e) |
41 { | 41 { |
(...skipping 21 matching lines...) Expand all Loading... |
63 MediaSourceTest.setSrcToMediaSourceTestURL(video); | 63 MediaSourceTest.setSrcToMediaSourceTestURL(video); |
64 }); | 64 }); |
65 } | 65 } |
66 </script> | 66 </script> |
67 </head> | 67 </head> |
68 <body onload="onLoad()"> | 68 <body onload="onLoad()"> |
69 <video> </video> | 69 <video> </video> |
70 <p>Tests calling append() after the MediaSource has transitioned to the
"ended" state.</p> | 70 <p>Tests calling append() after the MediaSource has transitioned to the
"ended" state.</p> |
71 </body> | 71 </body> |
72 </html> | 72 </html> |
OLD | NEW |