Bug 1189196 - Rename MediaKeySystemOptions to MediaKeySystemConfiguration and update WebIDL. r=bz
authorChris Pearce <cpearce@mozilla.com>
Tue, 27 Oct 2015 14:10:51 +1300
changeset 304821 b4894942822a51bf7d92963a2efc0b67a1f23610
parent 304820 9d49a2527b07a94ac2c64ba91f09877039e9e5dc
child 304822 d4ed3ed1e847188a6243d9b4bc0a32e92195bdf2
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz
bugs1189196
milestone44.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1189196 - Rename MediaKeySystemOptions to MediaKeySystemConfiguration and update WebIDL. r=bz
dom/base/Navigator.cpp
dom/base/Navigator.h
dom/media/eme/MediaKeySystemAccess.cpp
dom/media/eme/MediaKeySystemAccess.h
dom/media/eme/MediaKeySystemAccessManager.cpp
dom/media/eme/MediaKeySystemAccessManager.h
dom/webidl/MediaKeySystemAccess.webidl
dom/webidl/Navigator.webidl
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -2848,77 +2848,34 @@ Navigator::GetUserAgent(nsPIDOMWindow* a
   }
 
   return siteSpecificUA->GetUserAgentForURIAndWindow(aURI, aWindow, aUserAgent);
 }
 
 #ifdef MOZ_EME
 already_AddRefed<Promise>
 Navigator::RequestMediaKeySystemAccess(const nsAString& aKeySystem,
-                                       const Optional<Sequence<MediaKeySystemOptions>>& aOptions,
+                                       const Sequence<MediaKeySystemConfiguration>& aConfigs,
                                        ErrorResult& aRv)
 {
-  nsAutoCString logMsg;
-  logMsg.AppendPrintf("Navigator::RequestMediaKeySystemAccess(keySystem='%s' options=[",
-                      NS_ConvertUTF16toUTF8(aKeySystem).get());
-  if (aOptions.WasPassed()) {
-    const Sequence<MediaKeySystemOptions>& options = aOptions.Value();
-    for (size_t i = 0; i < options.Length(); i++) {
-      const MediaKeySystemOptions& op = options[i];
-      if (i > 0) {
-        logMsg.AppendLiteral(",");
-      }
-      logMsg.AppendLiteral("{");
-      logMsg.AppendPrintf("stateful='%s'",
-        MediaKeysRequirementValues::strings[(size_t)op.mStateful].value);
-
-      logMsg.AppendPrintf(", uniqueIdentifier='%s'",
-        MediaKeysRequirementValues::strings[(size_t)op.mUniqueidentifier].value);
-
-      if (!op.mAudioCapability.IsEmpty()) {
-        logMsg.AppendPrintf(", audioCapability='%s'",
-                            NS_ConvertUTF16toUTF8(op.mAudioCapability).get());
-      }
-      if (!op.mAudioType.IsEmpty()) {
-        logMsg.AppendPrintf(", audioType='%s'",
-          NS_ConvertUTF16toUTF8(op.mAudioType).get());
-      }
-      if (!op.mInitDataType.IsEmpty()) {
-        logMsg.AppendPrintf(", initDataType='%s'",
-          NS_ConvertUTF16toUTF8(op.mInitDataType).get());
-      }
-      if (!op.mVideoCapability.IsEmpty()) {
-        logMsg.AppendPrintf(", videoCapability='%s'",
-          NS_ConvertUTF16toUTF8(op.mVideoCapability).get());
-      }
-      if (!op.mVideoType.IsEmpty()) {
-        logMsg.AppendPrintf(", videoType='%s'",
-          NS_ConvertUTF16toUTF8(op.mVideoType).get());
-      }
-      logMsg.AppendLiteral("}");
-    }
-  }
-  logMsg.AppendPrintf("])");
-  EME_LOG(logMsg.get());
-
   nsCOMPtr<nsIGlobalObject> go = do_QueryInterface(mWindow);
   RefPtr<DetailedPromise> promise =
     DetailedPromise::Create(go, aRv,
       NS_LITERAL_CSTRING("navigator.requestMediaKeySystemAccess"),
       Telemetry::VIDEO_EME_REQUEST_SUCCESS_LATENCY_MS,
       Telemetry::VIDEO_EME_REQUEST_FAILURE_LATENCY_MS);
   if (aRv.Failed()) {
     return nullptr;
   }
 
   if (!mMediaKeySystemAccessManager) {
     mMediaKeySystemAccessManager = new MediaKeySystemAccessManager(mWindow);
   }
 
-  mMediaKeySystemAccessManager->Request(promise, aKeySystem, aOptions);
+  mMediaKeySystemAccessManager->Request(promise, aKeySystem, aConfigs);
   return promise.forget();
 }
 
 #endif
 
 Presentation*
 Navigator::GetPresentation(ErrorResult& aRv)
 {
--- a/dom/base/Navigator.h
+++ b/dom/base/Navigator.h
@@ -348,17 +348,17 @@ public:
 
   // GetWindowFromGlobal returns the inner window for this global, if
   // any, else null.
   static already_AddRefed<nsPIDOMWindow> GetWindowFromGlobal(JSObject* aGlobal);
 
 #ifdef MOZ_EME
   already_AddRefed<Promise>
   RequestMediaKeySystemAccess(const nsAString& aKeySystem,
-                              const Optional<Sequence<MediaKeySystemOptions>>& aOptions,
+                              const Sequence<MediaKeySystemConfiguration>& aConfig,
                               ErrorResult& aRv);
 private:
   RefPtr<MediaKeySystemAccessManager> mMediaKeySystemAccessManager;
 #endif
 
 private:
   virtual ~Navigator();
 
--- a/dom/media/eme/MediaKeySystemAccess.cpp
+++ b/dom/media/eme/MediaKeySystemAccess.cpp
@@ -47,20 +47,22 @@ NS_IMPL_CYCLE_COLLECTING_ADDREF(MediaKey
 NS_IMPL_CYCLE_COLLECTING_RELEASE(MediaKeySystemAccess)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MediaKeySystemAccess)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 MediaKeySystemAccess::MediaKeySystemAccess(nsPIDOMWindow* aParent,
                                            const nsAString& aKeySystem,
-                                           const nsAString& aCDMVersion)
+                                           const nsAString& aCDMVersion,
+                                           const MediaKeySystemConfiguration& aConfig)
   : mParent(aParent)
   , mKeySystem(aKeySystem)
   , mCDMVersion(aCDMVersion)
+  , mConfig(aConfig)
 {
 }
 
 MediaKeySystemAccess::~MediaKeySystemAccess()
 {
 }
 
 JSObject*
@@ -76,16 +78,22 @@ MediaKeySystemAccess::GetParentObject() 
 }
 
 void
 MediaKeySystemAccess::GetKeySystem(nsString& aOutKeySystem) const
 {
   ConstructKeySystem(mKeySystem, mCDMVersion, aOutKeySystem);
 }
 
+void
+MediaKeySystemAccess::GetConfiguration(MediaKeySystemConfiguration& aConfig)
+{
+  aConfig = mConfig;
+}
+
 already_AddRefed<Promise>
 MediaKeySystemAccess::CreateMediaKeys(ErrorResult& aRv)
 {
   RefPtr<MediaKeys> keys(new MediaKeys(mParent, mKeySystem, mCDMVersion));
   return keys->Init(aRv);
 }
 
 static bool
@@ -371,25 +379,21 @@ GMPDecryptsAndGeckoDecodesAAC(mozIGeckoM
     || (aKeySystem.EqualsLiteral("org.w3.clearkey") && !IsVistaOrLater())
 #endif
     ) && MP4Decoder::CanHandleMediaType(aContentType);
 }
 
 static bool
 IsSupported(mozIGeckoMediaPluginService* aGMPService,
             const nsAString& aKeySystem,
-            const MediaKeySystemOptions& aConfig)
+            const MediaKeySystemConfiguration& aConfig)
 {
-  if (!aConfig.mInitDataType.EqualsLiteral("cenc")) {
-    return false;
-  }
-  if (!aConfig.mAudioCapability.IsEmpty() ||
-      !aConfig.mVideoCapability.IsEmpty()) {
-    // Don't support any capabilities until we know we have a CDM with
-    // capabilities...
+  // Backwards compatibility with legacy MediaKeySystemConfiguration method.
+  if (!aConfig.mInitDataType.IsEmpty() &&
+      !aConfig.mInitDataType.EqualsLiteral("cenc")) {
     return false;
   }
   if (!aConfig.mAudioType.IsEmpty() &&
       (!IsAACContentType(aConfig.mAudioType) ||
        (!GMPDecryptsAndDecodesAAC(aGMPService, aKeySystem) &&
         !GMPDecryptsAndGeckoDecodesAAC(aGMPService, aKeySystem, aConfig.mAudioType)))) {
     return false;
   }
@@ -400,31 +404,31 @@ IsSupported(mozIGeckoMediaPluginService*
     return false;
   }
   return true;
 }
 
 /* static */
 bool
 MediaKeySystemAccess::IsSupported(const nsAString& aKeySystem,
-                                  const Sequence<MediaKeySystemOptions>& aOptions)
+                                  const Sequence<MediaKeySystemConfiguration>& aConfigs)
 {
   nsCOMPtr<mozIGeckoMediaPluginService> mps =
     do_GetService("@mozilla.org/gecko-media-plugin-service;1");
   if (NS_WARN_IF(!mps)) {
     return false;
   }
 
   if (!HaveGMPFor(mps,
                   NS_ConvertUTF16toUTF8(aKeySystem),
                   NS_LITERAL_CSTRING(GMP_API_DECRYPTOR))) {
     return false;
   }
 
-  for (const MediaKeySystemOptions& config : aOptions) {
+  for (const MediaKeySystemConfiguration& config : aConfigs) {
     if (mozilla::dom::IsSupported(mps, aKeySystem, config)) {
       return true;
     }
   }
   return false;
 }
 
 /* static */
--- a/dom/media/eme/MediaKeySystemAccess.h
+++ b/dom/media/eme/MediaKeySystemAccess.h
@@ -26,50 +26,54 @@ class MediaKeySystemAccess final : publi
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(MediaKeySystemAccess)
 
 public:
   explicit MediaKeySystemAccess(nsPIDOMWindow* aParent,
                                 const nsAString& aKeySystem,
-                                const nsAString& aCDMVersion);
+                                const nsAString& aCDMVersion,
+                                const MediaKeySystemConfiguration& aConfig);
 
 protected:
   ~MediaKeySystemAccess();
 
 public:
   nsPIDOMWindow* GetParentObject() const;
 
   virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
   void GetKeySystem(nsString& aRetVal) const;
 
+  void GetConfiguration(MediaKeySystemConfiguration& aConfig);
+  
   already_AddRefed<Promise> CreateMediaKeys(ErrorResult& aRv);
 
 
 
   static MediaKeySystemStatus GetKeySystemStatus(const nsAString& aKeySystem,
                                                  int32_t aMinCdmVersion,
                                                  nsACString& aOutExceptionMessage,
                                                  nsACString& aOutCdmVersion);
 
   static bool IsSupported(const nsAString& aKeySystem,
-                          const Sequence<MediaKeySystemOptions>& aOptions);
+                          const Sequence<MediaKeySystemConfiguration>& aConfigs);
 
   static void NotifyObservers(nsIDOMWindow* aWindow,
                               const nsAString& aKeySystem,
                               MediaKeySystemStatus aStatus);
 
   static bool IsGMPPresentOnDisk(const nsAString& aKeySystem,
                                  const nsACString& aVersion,
                                  nsACString& aOutMessage);
 
 private:
   nsCOMPtr<nsPIDOMWindow> mParent;
   const nsString mKeySystem;
   const nsString mCDMVersion;
+  const MediaKeySystemConfiguration mConfig;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_MediaKeySystemAccess_h
--- a/dom/media/eme/MediaKeySystemAccessManager.cpp
+++ b/dom/media/eme/MediaKeySystemAccessManager.cpp
@@ -58,26 +58,24 @@ MediaKeySystemAccessManager::MediaKeySys
 MediaKeySystemAccessManager::~MediaKeySystemAccessManager()
 {
   Shutdown();
 }
 
 void
 MediaKeySystemAccessManager::Request(DetailedPromise* aPromise,
                                      const nsAString& aKeySystem,
-                                     const Optional<Sequence<MediaKeySystemOptions>>& aOptions)
+                                     const Sequence<MediaKeySystemConfiguration>& aConfigs)
 {
-  if (aKeySystem.IsEmpty() || (aOptions.WasPassed() && aOptions.Value().IsEmpty())) {
+  if (aKeySystem.IsEmpty() || aConfigs.IsEmpty()) {
     aPromise->MaybeReject(NS_ERROR_DOM_INVALID_ACCESS_ERR,
                           NS_LITERAL_CSTRING("Invalid keysystem type or invalid options sequence"));
     return;
   }
-  Sequence<MediaKeySystemOptions> optionsNotPassed;
-  const auto& options = aOptions.WasPassed() ? aOptions.Value() : optionsNotPassed;
-  Request(aPromise, aKeySystem, options, RequestType::Initial);
+  Request(aPromise, aKeySystem, aConfigs, RequestType::Initial);
 }
 
 static bool
 ShouldTrialCreateGMP(const nsAString& aKeySystem)
 {
   // Trial create where the CDM has a Windows Media Foundation decoder.
 #ifdef XP_WIN
   return Preferences::GetBool("media.gmp.trial-create.enabled", false) &&
@@ -86,17 +84,17 @@ ShouldTrialCreateGMP(const nsAString& aK
 #else
   return false;
 #endif
 }
 
 void
 MediaKeySystemAccessManager::Request(DetailedPromise* aPromise,
                                      const nsAString& aKeySystem,
-                                     const Sequence<MediaKeySystemOptions>& aOptions,
+                                     const Sequence<MediaKeySystemConfiguration>& aConfigs,
                                      RequestType aType)
 {
   EME_LOG("MediaKeySystemAccessManager::Request %s", NS_ConvertUTF16toUTF8(aKeySystem).get());
   if (!Preferences::GetBool("media.eme.enabled", false)) {
     // EME disabled by user, send notification to chrome so UI can
     // inform user.
     MediaKeySystemAccess::NotifyObservers(mWindow,
                                           aKeySystem,
@@ -140,17 +138,17 @@ MediaKeySystemAccessManager::Request(Det
     // 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 &&
-        AwaitInstall(aPromise, aKeySystem, aOptions)) {
+        AwaitInstall(aPromise, aKeySystem, aConfigs)) {
       // Notify chrome that we're going to wait for the CDM to download/update.
       // Note: If we're re-trying, we don't re-send the notificaiton,
       // as chrome is already displaying the "we can't play, updating"
       // notification.
       MediaKeySystemAccess::NotifyObservers(mWindow, keySystem, status);
     } else {
       // We waited or can't wait for an update and we still can't service
       // the request. Give up. Chrome will still be showing a "I can't play,
@@ -169,20 +167,21 @@ MediaKeySystemAccessManager::Request(Det
       aPromise->MaybeReject(NS_ERROR_DOM_NOT_SUPPORTED_ERR, message);
       return;
     }
     aPromise->MaybeReject(NS_ERROR_DOM_INVALID_STATE_ERR,
                           NS_LITERAL_CSTRING("GetKeySystemAccess failed"));
     return;
   }
 
-  if (aOptions.IsEmpty() ||
-      MediaKeySystemAccess::IsSupported(keySystem, aOptions)) {
+  MediaKeySystemConfiguration config;
+  if (aConfigs.IsEmpty() ||
+      MediaKeySystemAccess::IsSupported(keySystem, aConfigs)) {
     RefPtr<MediaKeySystemAccess> access(
-      new MediaKeySystemAccess(mWindow, keySystem, NS_ConvertUTF8toUTF16(cdmVersion)));
+      new MediaKeySystemAccess(mWindow, keySystem, NS_ConvertUTF8toUTF16(cdmVersion), config));
    if (ShouldTrialCreateGMP(keySystem)) {
       // Ensure we have tried creating a GMPVideoDecoder for this
       // keySystem, and that we can use it to decode. This ensures that we only
       // report that we support this keySystem when the CDM us usable.
       mTrialCreator->MaybeAwaitTrialCreate(keySystem, access, aPromise, mWindow);
       return;
     }
     aPromise->MaybeResolve(access);
@@ -190,30 +189,30 @@ MediaKeySystemAccessManager::Request(Det
   }
 
   aPromise->MaybeReject(NS_ERROR_DOM_NOT_SUPPORTED_ERR,
                         NS_LITERAL_CSTRING("Key system is not supported"));
 }
 
 MediaKeySystemAccessManager::PendingRequest::PendingRequest(DetailedPromise* aPromise,
                                                             const nsAString& aKeySystem,
-                                                            const Sequence<MediaKeySystemOptions>& aOptions,
+                                                            const Sequence<MediaKeySystemConfiguration>& aConfigs,
                                                             nsITimer* aTimer)
   : mPromise(aPromise)
   , mKeySystem(aKeySystem)
-  , mOptions(aOptions)
+  , mConfigs(aConfigs)
   , mTimer(aTimer)
 {
   MOZ_COUNT_CTOR(MediaKeySystemAccessManager::PendingRequest);
 }
 
 MediaKeySystemAccessManager::PendingRequest::PendingRequest(const PendingRequest& aOther)
   : mPromise(aOther.mPromise)
   , mKeySystem(aOther.mKeySystem)
-  , mOptions(aOther.mOptions)
+  , mConfigs(aOther.mConfigs)
   , mTimer(aOther.mTimer)
 {
   MOZ_COUNT_CTOR(MediaKeySystemAccessManager::PendingRequest);
 }
 
 MediaKeySystemAccessManager::PendingRequest::~PendingRequest()
 {
   MOZ_COUNT_DTOR(MediaKeySystemAccessManager::PendingRequest);
@@ -233,40 +232,40 @@ MediaKeySystemAccessManager::PendingRequ
   if (mPromise) {
     mPromise->MaybeReject(NS_ERROR_DOM_INVALID_ACCESS_ERR, aReason);
   }
 }
 
 bool
 MediaKeySystemAccessManager::AwaitInstall(DetailedPromise* aPromise,
                                           const nsAString& aKeySystem,
-                                          const Sequence<MediaKeySystemOptions>& aOptions)
+                                          const Sequence<MediaKeySystemConfiguration>& aConfigs)
 {
   EME_LOG("MediaKeySystemAccessManager::AwaitInstall %s", NS_ConvertUTF16toUTF8(aKeySystem).get());
 
   if (!EnsureObserversAdded()) {
     NS_WARNING("Failed to add pref observer");
     return false;
   }
 
   nsCOMPtr<nsITimer> timer(do_CreateInstance("@mozilla.org/timer;1"));
   if (!timer || NS_FAILED(timer->Init(this, 60 * 1000, nsITimer::TYPE_ONE_SHOT))) {
     NS_WARNING("Failed to create timer to await CDM install.");
     return false;
   }
 
-  mRequests.AppendElement(PendingRequest(aPromise, aKeySystem, aOptions, timer));
+  mRequests.AppendElement(PendingRequest(aPromise, aKeySystem, aConfigs, timer));
   return true;
 }
 
 void
 MediaKeySystemAccessManager::RetryRequest(PendingRequest& aRequest)
 {
   aRequest.CancelTimer();
-  Request(aRequest.mPromise, aRequest.mKeySystem, aRequest.mOptions, RequestType::Subsequent);
+  Request(aRequest.mPromise, aRequest.mKeySystem, aRequest.mConfigs, RequestType::Subsequent);
 }
 
 nsresult
 MediaKeySystemAccessManager::Observe(nsISupports* aSubject,
                                      const char* aTopic,
                                      const char16_t* aData)
 {
   EME_LOG("MediaKeySystemAccessManager::Observe %s", aTopic);
--- a/dom/media/eme/MediaKeySystemAccessManager.h
+++ b/dom/media/eme/MediaKeySystemAccessManager.h
@@ -25,55 +25,55 @@ public:
   explicit MediaKeySystemAccessManager(nsPIDOMWindow* aWindow);
 
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_CLASS_AMBIGUOUS(MediaKeySystemAccessManager, nsIObserver)
   NS_DECL_NSIOBSERVER
 
   void Request(DetailedPromise* aPromise,
                const nsAString& aKeySystem,
-               const Optional<Sequence<MediaKeySystemOptions>>& aOptions);
+               const Sequence<MediaKeySystemConfiguration>& aConfig);
 
   void Shutdown();
 
   struct PendingRequest {
     PendingRequest(DetailedPromise* aPromise,
                    const nsAString& aKeySystem,
-                   const Sequence<MediaKeySystemOptions>& aOptions,
+                   const Sequence<MediaKeySystemConfiguration>& aConfig,
                    nsITimer* aTimer);
     PendingRequest(const PendingRequest& aOther);
     ~PendingRequest();
     void CancelTimer();
     void RejectPromise(const nsCString& aReason);
 
     RefPtr<DetailedPromise> mPromise;
     const nsString mKeySystem;
-    const Sequence<MediaKeySystemOptions> mOptions;
+    const Sequence<MediaKeySystemConfiguration> mConfigs;
     nsCOMPtr<nsITimer> mTimer;
   };
 
 private:
 
   enum RequestType {
     Initial,
     Subsequent
   };
 
   void Request(DetailedPromise* aPromise,
                const nsAString& aKeySystem,
-               const Sequence<MediaKeySystemOptions>& aOptions,
+               const Sequence<MediaKeySystemConfiguration>& aConfig,
                RequestType aType);
 
   ~MediaKeySystemAccessManager();
 
   bool EnsureObserversAdded();
 
   bool AwaitInstall(DetailedPromise* aPromise,
                     const nsAString& aKeySystem,
-                    const Sequence<MediaKeySystemOptions>& aOptions);
+                    const Sequence<MediaKeySystemConfiguration>& aConfig);
 
   void RetryRequest(PendingRequest& aRequest);
 
   nsTArray<PendingRequest> mRequests;
 
   nsCOMPtr<nsPIDOMWindow> mWindow;
   bool mAddedObservers;
 
--- a/dom/webidl/MediaKeySystemAccess.webidl
+++ b/dom/webidl/MediaKeySystemAccess.webidl
@@ -5,30 +5,36 @@
  *
  * The origin of this IDL file is
  * https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html
  *
  * Copyright © 2014 W3C® (MIT, ERCIM, Keio, Beihang), All Rights Reserved.
  * W3C liability, trademark and document use rules apply.
  */
 
-enum MediaKeysRequirement {
-  "required",
-  "optional",
-  "disallowed"
+dictionary MediaKeySystemMediaCapability {
+   DOMString contentType = "";
+   // TODO: robustness
 };
 
-dictionary MediaKeySystemOptions {
+dictionary MediaKeySystemConfiguration {
+  DOMString                               label = "";
+  sequence<DOMString>                     initDataTypes;
+  sequence<MediaKeySystemMediaCapability> audioCapabilities;
+  sequence<MediaKeySystemMediaCapability> videoCapabilities;
+
+   // TODO: distinctiveIdentifier, persistentState, sessionTypes  
+  
+  // For backwards compatibility with implementations using old
+  // MediaKeySystemOptions paradigm...
   DOMString            initDataType = "";
   DOMString            audioType = "";
-  DOMString            audioCapability = "";
   DOMString            videoType = "";
-  DOMString            videoCapability = "";
-  MediaKeysRequirement uniqueidentifier = "optional";
-  MediaKeysRequirement stateful = "optional";
 };
 
 [Pref="media.eme.apiVisible"]
 interface MediaKeySystemAccess {
   readonly    attribute DOMString keySystem;
   [NewObject]
+  MediaKeySystemConfiguration getConfiguration();
+  [NewObject]
   Promise<MediaKeys> createMediaKeys();
 };
--- a/dom/webidl/Navigator.webidl
+++ b/dom/webidl/Navigator.webidl
@@ -442,17 +442,17 @@ partial interface Navigator {
   readonly attribute LegacyMozTCPSocket mozTCPSocket;
 };
 
 #ifdef MOZ_EME
 partial interface Navigator {
   [Pref="media.eme.apiVisible", NewObject]
   Promise<MediaKeySystemAccess>
   requestMediaKeySystemAccess(DOMString keySystem,
-                              optional sequence<MediaKeySystemOptions> supportedConfigurations);
+                              sequence<MediaKeySystemConfiguration> supportedConfigurations);
 };
 #endif
 
 #ifdef NIGHTLY_BUILD
 partial interface Navigator {
   [Func="Navigator::IsE10sEnabled"]
   readonly attribute boolean mozE10sEnabled;
 };