Bug 1355252 - Backed out changeset ddb3969de046. r=backout
authorChris Pearce <cpearce@mozilla.com>
Tue, 30 May 2017 10:33:30 +1200
changeset 586212 8a95271d11806957ebd8d842227e0227353b6ec3
parent 586211 8c149fcc52964640c3c5f0e278939ab97aaf2def
child 586213 8f1c4b1bac37df93eaeff4c6407d414ed7459f3f
push id61331
push userbmo:cpearce@mozilla.com
push dateMon, 29 May 2017 23:54:26 +0000
reviewersbackout
bugs1355252
milestone55.0a1
Bug 1355252 - Backed out changeset ddb3969de046. r=backout MozReview-Commit-ID: cdH0WSFOaz
dom/media/eme/MediaKeySystemAccess.cpp
dom/media/test/test_eme_missing_pssh.html
dom/media/test/test_eme_requestKeySystemAccess.html
--- a/dom/media/eme/MediaKeySystemAccess.cpp
+++ b/dom/media/eme/MediaKeySystemAccess.cpp
@@ -921,23 +921,18 @@ GetSupportedConfig(const KeySystemConfig
       config.mPersistentState = MediaKeysRequirement::Required;
     }
   }
   // Set the sessionTypes member of accumulated configuration to session types.
   config.mSessionTypes.Construct(Move(sessionTypes));
 
   // If the videoCapabilities and audioCapabilities members in candidate
   // configuration are both empty, return NotSupported.
-  if (aCandidate.mAudioCapabilities.IsEmpty() &&
-      aCandidate.mVideoCapabilities.IsEmpty()) {
-    EME_LOG("MediaKeySystemConfiguration (label='%s') rejected; "
-            "no supported audio or video capabilities specified",
-            NS_ConvertUTF16toUTF8(aCandidate.mLabel).get());
-    return false;
-  }
+  // TODO: Most sites using EME still don't pass capabilities, so we
+  // can't reject on it yet without breaking them. So add this later.
 
   // If the videoCapabilities member in candidate configuration is non-empty:
   if (!aCandidate.mVideoCapabilities.IsEmpty()) {
     // Let video capabilities be the result of executing the Get Supported
     // Capabilities for Audio/Video Type algorithm on Video, candidate
     // configuration's videoCapabilities member, accumulated configuration,
     // and restrictions.
     Sequence<MediaKeySystemMediaCapability> caps =
--- a/dom/media/test/test_eme_missing_pssh.html
+++ b/dom/media/test/test_eme_missing_pssh.html
@@ -30,18 +30,18 @@
         0x83, 0xe9, 0xbf, 0x6e, 0x5e, 0x49, 0x3e, 0x53,
         0x00, 0x00, 0x00, 0x00                         // Size of Data (0)
       ];
 
       var audio = document.getElementById("audio");
 
       function LoadEME() {
         var options = [{
-          initDataTypes: ['cenc'],
-          audioCapabilities: [{ contentType: 'audio/mp4; codecs="mp4a.40.2"' }],
+          initDataType: 'cenc',
+          audioType: 'audio/mp4; codecs="mp4a.40.2"',
         }];
         navigator.requestMediaKeySystemAccess("org.w3.clearkey", options)
           .then((keySystemAccess) => {
             return keySystemAccess.createMediaKeys();
           }, bail("Failed to request key system access."))
 
           .then((mediaKeys) => {
             audio.setMediaKeys(mediaKeys);
--- a/dom/media/test/test_eme_requestKeySystemAccess.html
+++ b/dom/media/test/test_eme_requestKeySystemAccess.html
@@ -467,25 +467,16 @@ var tests = [
     options: [
       {
         initDataTypes: ['webm'],
         videoCapabilities: [{contentType: 'video/webm;codecs="bogus"'}],
       }
     ],
     shouldPass: false,
   },
-  {
-    name: 'Unspecified capabilities',
-    options: [
-      {
-        initDataTypes: ['cenc'],
-      }
-    ],
-    shouldPass: false,
-  },
 ];
 
 function beginTest() {
   Promise.all(tests.map(Test)).then(function() { SimpleTest.finish(); });
 }
 
 if (!IsMacOSSnowLeopardOrEarlier()) {
   SimpleTest.waitForExplicitFinish();