| Index: content/test/data/media/mse_config_change.html
|
| diff --git a/content/test/data/media/mse_config_change.html b/content/test/data/media/mse_config_change.html
|
| index 7a44859790e176aa48d804d6e8e9163a843b1846..eabac5edd45e3fa464fe35d572cb6aeec67c9300 100644
|
| --- a/content/test/data/media/mse_config_change.html
|
| +++ b/content/test/data/media/mse_config_change.html
|
| @@ -40,18 +40,24 @@
|
| xhr.open("GET", MEDIA_2);
|
| xhr.responseType = 'arraybuffer';
|
| xhr.addEventListener('load', function(e) {
|
| + var eventHandler = function(e) {
|
| + console.log('Second buffer append ended.');
|
| + srcBuffer.removeEventListener('updateend', eventHandler);
|
| + mediaSource.endOfStream();
|
| + if (!mediaSource.duration ||
|
| + Math.abs(mediaSource.duration - TOTAL_DURATION) > DELTA) {
|
| + failTest('Unexpected mediaSource.duration = ' +
|
| + mediaSource.duration + ', expected duration = ' +
|
| + TOTAL_DURATION);
|
| + return;
|
| + }
|
| + video.play();
|
| + };
|
| + console.log('Appending next media source at ' + APPEND_TIME + 'sec.');
|
| var srcBuffer = mediaSource.sourceBuffers[0];
|
| + srcBuffer.addEventListener('updateend', eventHandler);
|
| srcBuffer.timestampOffset = APPEND_TIME;
|
| - srcBuffer.append(new Uint8Array(e.target.response));
|
| - mediaSource.endOfStream();
|
| - if (!mediaSource.duration ||
|
| - Math.abs(mediaSource.duration - TOTAL_DURATION) > DELTA) {
|
| - failTest('Unexpected mediaSource.duration = ' +
|
| - mediaSource.duration + ', expected duration = ' +
|
| - TOTAL_DURATION);
|
| - return;
|
| - }
|
| - video.play();
|
| + srcBuffer.appendBuffer(new Uint8Array(e.target.response));
|
| });
|
| xhr.send();
|
| }
|
|
|