Bug 1278198 - Update MediaKeySystemConfiguration and MediaKeys to match draft EME spec. r=smaug
☠☠ backed out by 7f0562848c05 ☠ ☠
authorChris Pearce <cpearce@mozilla.com>
Fri, 01 Jul 2016 11:28:58 +1200
changeset 346140 92a49962cec316bfb96ad398830119c3648915e6
parent 346139 830a8be8be2a90e9730ad61039c06db980eef0cc
child 346141 656b778e0f15958d7e2be6f15bd89c259ac38416
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1278198
milestone50.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 1278198 - Update MediaKeySystemConfiguration and MediaKeys to match draft EME spec. r=smaug The only thing we're now not up to date on (in terms of WebIDL) is the "persistent-usage-record" MediaKeySessionType. MozReview-Commit-ID: 4CKK35HAxKK
dom/webidl/MediaKeySystemAccess.webidl
dom/webidl/MediaKeys.webidl
--- a/dom/webidl/MediaKeySystemAccess.webidl
+++ b/dom/webidl/MediaKeySystemAccess.webidl
@@ -5,28 +5,35 @@
  *
  * 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",
+  "not-allowed"
+};
+
 dictionary MediaKeySystemMediaCapability {
    DOMString contentType = "";
-   // TODO: robustness
+   DOMString robustness = "";
 };
 
 dictionary MediaKeySystemConfiguration {
   DOMString                               label = "";
-  sequence<DOMString>                     initDataTypes;
-  sequence<MediaKeySystemMediaCapability> audioCapabilities;
-  sequence<MediaKeySystemMediaCapability> videoCapabilities;
-
-   // TODO: distinctiveIdentifier, persistentState, sessionTypes  
+  sequence<DOMString>                     initDataTypes = [];
+  sequence<MediaKeySystemMediaCapability> audioCapabilities = [];
+  sequence<MediaKeySystemMediaCapability> videoCapabilities = [];
+  MediaKeysRequirement                    distinctiveIdentifier = "optional";
+  MediaKeysRequirement                    persistentState = "optional";
+  sequence<DOMString>                     sessionTypes;
 };
 
 [Pref="media.eme.apiVisible"]
 interface MediaKeySystemAccess {
   readonly    attribute DOMString keySystem;
   [NewObject]
   MediaKeySystemConfiguration getConfiguration();
   [NewObject]
--- a/dom/webidl/MediaKeys.webidl
+++ b/dom/webidl/MediaKeys.webidl
@@ -5,20 +5,26 @@
  *
  * 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 SessionType { "temporary", "persistent" };
+// Note: "persistent-usage-record" session type is unsupported yet, as
+// it's marked as "at risk" in the spec, and Chrome doesn't support it. 
+enum MediaKeySessionType {
+  "temporary",
+  "persistent-license",
+  // persistent-usage-record,
+};
 
 [Pref="media.eme.apiVisible"]
 interface MediaKeys {
   readonly attribute DOMString keySystem;
 
   [NewObject, Throws]
-  MediaKeySession createSession(optional SessionType sessionType = "temporary");
+  MediaKeySession createSession(optional MediaKeySessionType sessionType = "temporary");
 
   [NewObject]
   Promise<void> setServerCertificate((ArrayBufferView or ArrayBuffer) serverCertificate);
 };