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 zero length Uint8Array."); | 33 consoleWrite("Appending zero length Uint8Array."); |
34 segmentHelper.sourceBuffer.append(new Uint8Array(0)); | 34 segmentHelper.sourceBuffer.append(new Uint8Array(0)); |
35 | 35 |
36 MediaSourceTest.expectSourceState(mediaSource, "open"); | 36 MediaSourceTest.expectSourceState(mediaSource, "open"); |
37 } | 37 } |
38 catch (e) | 38 catch (e) |
39 { | 39 { |
40 failTest("Unexpected exception: " + e); | 40 failTest("Unexpected exception: " + e); |
41 } | 41 } |
(...skipping 19 matching lines...) Expand all Loading... |
61 MediaSourceTest.setSrcToMediaSourceTestURL(video); | 61 MediaSourceTest.setSrcToMediaSourceTestURL(video); |
62 }); | 62 }); |
63 } | 63 } |
64 </script> | 64 </script> |
65 </head> | 65 </head> |
66 <body onload="onLoad()"> | 66 <body onload="onLoad()"> |
67 <video> </video> | 67 <video> </video> |
68 <p>Tests calling append() with an empty Uint8Array after the MediaSource
has transitioned to the "ended" state.</p> | 68 <p>Tests calling append() with an empty Uint8Array after the MediaSource
has transitioned to the "ended" state.</p> |
69 </body> | 69 </body> |
70 </html> | 70 </html> |
OLD | NEW |