Bug 1264832 - Delay resolution of navigator.requestMediaKeySystemAccess promise until Widevine CDM is downloaded. r?gerald draft
authorChris Pearce <cpearce@mozilla.com>
Fri, 15 Apr 2016 14:20:33 +1200
changeset 351826 b4f23ebefbe43cc67b61005700196e1e7301615d
parent 350969 10f66b3164570b2183333262fa91a16004cbb908
child 518505 6cc7dcb4ad0881e9194cc569e7968ba838718d93
push id15532
push usercpearce@mozilla.com
push dateFri, 15 Apr 2016 02:20:52 +0000
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 &&