Bug 1264832 - Delay resolution of navigator.requestMediaKeySystemAccess promise until Widevine CDM is downloaded. r=gerald
authorChris Pearce <cpearce@mozilla.com>
Fri, 15 Apr 2016 14:20:33 +1200
changeset 317323 dccef94b90f5e5ab50ca77f1e814c1df4f3a2e59
parent 317322 f50694e2aa7c3685a53943e5732156789b31ef67
child 317324 474de3dea4ab62ce2173be7658acc8b34a74bb9c
push id9480
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 17:12:58 +0000
treeherdermozilla-aurora@0d6a91c76a9e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1264832
milestone48.0a1
Bug 1264832 - Delay resolution of navigator.requestMediaKeySystemAccess promise until Widevine CDM is downloaded. r=gerald MozReview-Commit-ID: I6OMiKUj9ot
dom/media/eme/MediaKeySystemAccessManager.cpp
--- a/dom/media/eme/MediaKeySystemAccessManager.cpp
+++ b/dom/media/eme/MediaKeySystemAccessManager.cpp
@@ -113,17 +113,18 @@ MediaKeySystemAccessManager::Request(Det
                       minCdmVersion,
                       MediaKeySystemStatusValues::strings[(size_t)status].value,
                       cdmVersion.get(),
                       message.get());
   LogToBrowserConsole(NS_ConvertUTF8toUTF16(msg));
 
   if ((status == MediaKeySystemStatus::Cdm_not_installed ||
        status == MediaKeySystemStatus::Cdm_insufficient_version) &&
-      keySystem.EqualsLiteral("com.adobe.primetime")) {
+      (keySystem.EqualsLiteral("com.adobe.primetime") ||
+       keySystem.EqualsLiteral("com.widevine.alpha"))) {
     // These are cases which could be resolved by downloading a new(er) CDM.
     // When we send the status to chrome, chrome's GMPProvider will attempt to
     // download or update the CDM. In AwaitInstall() we add listeners to wait
     // for the update to complete, and we'll call this function again with
     // aType==Subsequent once the download has completed and the GMPService
     // has had a new plugin added. AwaitInstall() sets a timer to fail if the
     // update/download takes too long or fails.
     if (aType == RequestType::Initial &&