Bug 1325332 - [EME][Fennec] Pref on EME API and only support it for M+ android version. draft
authorJames Cheng <jacheng@mozilla.com>
Fri, 23 Dec 2016 15:50:13 +0800
changeset 457595 4c2c0eef14f4964a907b98ba9a8b5e1a353268f5
parent 457446 d192a99be4b436f2dc839435319f7630d5d8f4b0
child 457596 ff5653338b57a690ea51f363a8c1ceb0d993109b
push id40825
push userbmo:jacheng@mozilla.com
push dateMon, 09 Jan 2017 08:52:35 +0000
bugs1325332
milestone53.0a1
Bug 1325332 - [EME][Fennec] Pref on EME API and only support it for M+ android version. MozReview-Commit-ID: Bi5pRhIFsxB
mobile/android/app/mobile.js
mobile/android/base/java/org/mozilla/gecko/media/MediaDrmProxy.java
--- a/mobile/android/app/mobile.js
+++ b/mobile/android/app/mobile.js
@@ -632,16 +632,22 @@ pref("media.android-remote-codec.enabled
 pref("media.android-remote-codec.enabled", false);
 #endif
 
 // Enable MSE
 pref("media.mediasource.enabled", true);
 
 pref("media.mediadrm-widevinecdm.visible", true);
 
+#ifdef NIGHTLY_BUILD
+// Enable EME(Encrypted media extensions)
+pref("media.eme.enabled", true);
+pref("media.eme.apiVisible", true);
+#endif
+
 // optimize images memory usage
 pref("image.downscale-during-decode.enabled", true);
 
 pref("browser.safebrowsing.downloads.enabled", false);
 
 pref("browser.safebrowsing.id", @MOZ_APP_UA_NAME@);
 
 // True if this is the first time we are showing about:firstrun
--- a/mobile/android/base/java/org/mozilla/gecko/media/MediaDrmProxy.java
+++ b/mobile/android/base/java/org/mozilla/gecko/media/MediaDrmProxy.java
@@ -42,18 +42,18 @@ public final class MediaDrmProxy {
     public static final ArrayList<MediaDrmProxy> sProxyList = new ArrayList<MediaDrmProxy>();
 
     // A flag to avoid using the native object that has been destroyed.
     private boolean mDestroyed;
     private GeckoMediaDrm mImpl;
     private String mDrmStubId;
 
     private static boolean isSystemSupported() {
-        // Support versions >= LOLLIPOP
-        if (AppConstants.Versions.preLollipop) {
+        // Support versions >= Marshmallow
+        if (AppConstants.Versions.preMarshmallow) {
             if (DEBUG) Log.d(LOGTAG, "System Not supported !!, current SDK version is " + Build.VERSION.SDK_INT);
             return false;
         }
         return true;
     }
 
     @WrapForJNI
     public static boolean isSchemeSupported(String keySystem) {