Bug 1485875 - Expect Android to not play AV1 in MP4. r=jya

Differential Revision: https://phabricator.services.mozilla.com/D4258

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Thomas Daede 2018-08-24 21:29:00 +00:00
parent b07c177c38
commit c02103611a
3 changed files with 10 additions and 11 deletions

View file

@ -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");

View file

@ -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")) {

View file

@ -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\"", "");