test_non_8bit_video.html (978B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>Test 10/12-bit video files</title> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 7 <script type="application/javascript"> 8 9 /** This test checks if 10- and 12-bit video plays. */ 10 const videos = ["av1-yuv444p10.webm", "av1-yuv422p10.webm", "av1-yuv444p12.webm", 11 "vp9-yuv420p10.webm"]; 12 // Windows HW decoder doesn't support 12-bit VP9. TODO: fallback to SW decoder. 13 if (SpecialPowers.Services.appinfo.OS != "WINNT") { 14 videos.push("vp9-yuv420p12.webm"); 15 } 16 add_task(async function testPlayAll() { 17 await Promise.all(videos.map( 18 (f) => { 19 let v = document.createElement("video"); 20 document.body.appendChild(v); 21 v.src = f; 22 return v; 23 }).map( 24 (v) => v.play())).then( 25 () => ok(true, "All video played."), 26 (e) => ok(false, "Play video error: " + e)); 27 }); 28 29 </script> 30 </head> 31 <body> 32 </body> 33 </html>