test_LoadedMetadataFired_mp4.html (873B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>MSE: append initialization only</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"> 11 <script class="testbody" type="text/javascript"> 12 13 SimpleTest.waitForExplicitFinish(); 14 15 runWithMSE(async (ms, v) => { 16 await once(ms, "sourceopen"); 17 const sb = ms.addSourceBuffer("video/mp4"); 18 19 sb.appendBuffer(new Uint8Array(await fetchWithXHR("bipbop/bipbop2s.mp4"), 0, 1395)); 20 v.play(); 21 await once(v, "loadedmetadata"); 22 ok(true, "Got loadedmetadata event"); 23 is(v.videoWidth, 400, "videoWidth has correct initial value"); 24 is(v.videoHeight, 300, "videoHeight has correct initial value"); 25 SimpleTest.finish(); 26 }); 27 28 </script> 29 </pre> 30 </body> 31 </html>