diff --git a/dom/media/test/can_play_type_webm.js b/dom/media/test/can_play_type_webm.js index 7c8b42f10729..75b6c1e7c2c1 100644 --- a/dom/media/test/can_play_type_webm.js +++ b/dom/media/test/can_play_type_webm.js @@ -35,15 +35,6 @@ async function check_webm(v, enabled) { return pref; } - function isWindows32() { - return navigator.userAgent.includes("Windows") && - !navigator.userAgent.includes("Win64"); - } - - function isAndroid() { - return navigator.userAgent.includes("Android"); - } - await SpecialPowers.pushPrefEnv({"set": [["media.av1.enabled", true]]}); // AV1 is disabled on Windows 32 bits (bug 1475564) and Android (bug 1368843) check("video/webm; codecs=\"av1\"", (isWindows32() || isAndroid()) ? "" : "probably"); diff --git a/dom/media/test/manifest.js b/dom/media/test/manifest.js index 88b5a4d0feec..8a9d9d5b8494 100644 --- a/dom/media/test/manifest.js +++ b/dom/media/test/manifest.js @@ -633,6 +633,15 @@ var gUnseekableTests = [ { name:"bogus.duh", type:"bogus/duh"} ]; +function isWindows32() { + return navigator.userAgent.includes("Windows") && + !navigator.userAgent.includes("Win64"); +} + +function isAndroid() { + return navigator.userAgent.includes("Android"); +} + var androidVersion = -1; // non-Android platforms if (manifestNavigator().userAgent.includes("Mobile") || manifestNavigator().userAgent.includes("Tablet")) { diff --git a/dom/media/test/test_can_play_type_mpeg.html b/dom/media/test/test_can_play_type_mpeg.html index 37a9526566be..1a5d4f2551ce 100644 --- a/dom/media/test/test_can_play_type_mpeg.html +++ b/dom/media/test/test_can_play_type_mpeg.html @@ -98,8 +98,7 @@ function check_mp4(v, enabled) { }); // AV1 is temporarily disabled on Win32 due to linker issues // https://bugzilla.mozilla.org/show_bug.cgi?id=1475564 - if (!(manifestNavigator().userAgent.includes("Windows") && - !manifestNavigator().userAgent.includes("x64"))) { + if (!isWindows32() && !isAndroid()) { check("video/mp4; codecs=\"av1\"", "probably"); } else { check("video/mp4; codecs=\"av1\"", "");