Bug 1325543 - Avoid unnecessarily awaiting procedure for Widevine CDM installation. draft
authorKilik Kuo <kikuo@mozilla.com>
Thu, 29 Dec 2016 20:30:31 +0800
changeset 454477 933a1d2d1723e2ae3ec9976b6c7befc0a1888c4d
parent 454351 143bb4b9249e528e658f6ccc449991794b8675f8
child 540719 2f639332b15435471cb5db7087cd7322f44b1159
push id39942
push userbmo:kikuo@mozilla.com
push dateThu, 29 Dec 2016 12:30:59 +0000
bugs1325543
milestone53.0a1
Bug 1325543 - Avoid unnecessarily awaiting procedure for Widevine CDM installation. Currently, gecko doesn't support download and installation for Widevine CDM on Android. Returning Cdm_not_supported avoids the subsequent call to AwaitInstall() while requesting MediaKeySystemAccess. MozReview-Commit-ID: 3mOEf9iWE1G
dom/media/eme/MediaKeySystemAccess.cpp
--- a/dom/media/eme/MediaKeySystemAccess.cpp
+++ b/dom/media/eme/MediaKeySystemAccess.cpp
@@ -165,18 +165,18 @@ MediaKeySystemAccess::GetKeySystemStatus
         return MediaKeySystemStatus::Cdm_disabled;
       }
       return EnsureCDMInstalled(aKeySystem, aOutMessage);
 #ifdef MOZ_WIDGET_ANDROID
     } else if (Preferences::GetBool("media.mediadrm-widevinecdm.visible", false)) {
         nsCString keySystem = NS_ConvertUTF16toUTF8(aKeySystem);
         bool supported = mozilla::java::MediaDrmProxy::IsSchemeSupported(keySystem);
         if (!supported) {
-          aOutMessage = NS_LITERAL_CSTRING("Widevine CDM is not available");
-          return MediaKeySystemStatus::Cdm_not_installed;
+          aOutMessage = NS_LITERAL_CSTRING("KeySystem or Minimum API level not met for Widevine EME");
+          return MediaKeySystemStatus::Cdm_not_supported;
         }
         return MediaKeySystemStatus::Available;
 #endif
     }
   }
 
   return MediaKeySystemStatus::Cdm_not_supported;
 }