Bug 1548858 - don't expect av1 decoding for Android. r=bwc
authorMichael Froman <mfroman@mozilla.com>
Tue, 07 May 2019 15:14:15 +0000
changeset 534793 2996e082682ca6418ea92337eb2d12b6b86fd95b
parent 534792 19907c1f0f10b740510ae828b6db2d1891e9d7a8
child 534794 62fc447687045c79c227f40e5ee3c7b2ecd12f7e
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbwc
bugs1548858
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1548858 - don't expect av1 decoding for Android. r=bwc RDD/AV1 isn't enabled by default yet for Android. Differential Revision: https://phabricator.services.mozilla.com/D30206
dom/media/test/test_can_play_type_mpeg.html
--- a/dom/media/test/test_can_play_type_mpeg.html
+++ b/dom/media/test/test_can_play_type_mpeg.html
@@ -91,17 +91,22 @@ function check_mp4(v, enabled) {
   [ "video/mp4; codecs=vp9",
     "video/mp4; codecs=\"vp9\"",
     "video/mp4; codecs=\"vp9.0\""
   ].forEach((codec) => {
     // canPlayType should support VP9 in MP4...
     check(codec, "probably");
     ok(MediaSource.isTypeSupported(codec), "VP9 in MP4 should be supported in MSE");
   });
-  check("video/mp4; codecs=\"av1\"", "probably");
+
+  if (IsAndroid()) {
+    check("video/mp4; codecs=\"av1\"", "");
+  } else {
+    check("video/mp4; codecs=\"av1\"", "probably");
+  }
 }
 
 function check_mp3(v, enabled) {
   function check(type, expected) {
     var ex = enabled ? expected : "";
     is(v.canPlayType(type), ex, type + "='" + ex + "'");
   }
 
@@ -133,16 +138,20 @@ function IsLinux() {
 function getPref(name) {
   var pref = false;
   try {
     pref = SpecialPowers.getBoolPref(name);
   } catch(ex) { }
   return pref;
 }
 
+function IsAndroid() {
+  return getAndroidVersion() >= 0;
+}
+
 function IsSupportedAndroid() {
   return getAndroidVersion() >= 14;
 }
 
 function IsJellyBeanOrLater() {
   return getAndroidVersion() >= 16;
 }