test_ChangeWhileWaitingOnMissingData_mp4.html (1293B)
1 <!DOCTYPE html> 2 <html><head> 3 <meta http-equiv="content-type" content="text/html; charset=windows-1252"> 4 <title>MSE: resume from waiting even after format change occurred</title> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <script type="text/javascript" src="mediasource.js"></script> 7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 8 </head> 9 <body> 10 <pre id="test"><script class="testbody" type="text/javascript"> 11 12 SimpleTest.waitForExplicitFinish(); 13 14 runWithMSE(async (ms, el) => { 15 el.controls = true; 16 await once(ms, "sourceopen"); 17 ok(true, "Receive a sourceopen event"); 18 const sb = ms.addSourceBuffer("video/mp4"); 19 await fetchAndLoad(sb, "bipbop/bipbop_480_624kbps-video", ["init"], ".mp4"); 20 await fetchAndLoad(sb, "bipbop/bipbop_480_624kbps-video", range(1, 3), ".m4s"); 21 el.play(); 22 // let seek to the last audio frame. 23 // The seek will complete and then playback will stall. 24 el.currentTime = 1.532517; 25 await Promise.all([once(el, "seeked"), once(el, "waiting")]); 26 info("seek completed"); 27 await fetchAndLoad(sb, "bipbop/bipbop", ["init"], ".mp4"); 28 await fetchAndLoad(sb, "bipbop/bipbop", range(1, 4), ".m4s"); 29 ms.endOfStream(); 30 await once(el, "ended"); 31 SimpleTest.finish(); 32 }); 33 34 </script> 35 </pre> 36 </body> 37 </html>