From 38116f0fb4dbc68e1f994b0662053dc21d84997e Mon Sep 17 00:00:00 2001 From: Luke Bjerring Date: Fri, 2 Mar 2018 12:10:06 -0500 Subject: [PATCH 1/5] Add encrypted-media idl file --- interfaces/encrypted-media.idl | 122 ++++++++++++++++++--------------- 1 file changed, 65 insertions(+), 57 deletions(-) diff --git a/interfaces/encrypted-media.idl b/interfaces/encrypted-media.idl index fbe898b2060b81..5c2fa6a1eb169e 100644 --- a/interfaces/encrypted-media.idl +++ b/interfaces/encrypted-media.idl @@ -1,14 +1,11 @@ -// Encrypted Media Extensions WebIDL -// -// NOTE: Please update the link below to the specification version from -// which this IDL was extracted. -// -// https://www.w3.org/TR/2016/WD-encrypted-media-20160610/ -// + commit 5499821932391ae2c2e53756ae7ab9fae89d5863 -// +// GENERATED CONTENT - DO NOT EDIT +// Content of this file was automatically extracted from the encrypted-media spec. +// See https://w3c.github.io/encrypted-media/ +[Exposed=Window] partial interface Navigator { - Promise requestMediaKeySystemAccess (DOMString keySystem, sequence supportedConfigurations); + [SecureContext] Promise requestMediaKeySystemAccess(DOMString keySystem, + sequence supportedConfigurations); }; enum MediaKeysRequirement { @@ -18,56 +15,64 @@ enum MediaKeysRequirement { }; dictionary MediaKeySystemConfiguration { - DOMString label = ""; - sequence initDataTypes = []; - sequence audioCapabilities = []; - sequence videoCapabilities = []; - MediaKeysRequirement distinctiveIdentifier = "optional"; - MediaKeysRequirement persistentState = "optional"; - sequence sessionTypes; + DOMString label = ""; + sequence initDataTypes = []; + sequence audioCapabilities = []; + sequence videoCapabilities = []; + MediaKeysRequirement distinctiveIdentifier = "optional"; + MediaKeysRequirement persistentState = "optional"; + sequence sessionTypes; }; dictionary MediaKeySystemMediaCapability { - DOMString contentType = ""; - DOMString robustness = ""; + DOMString contentType = ""; + DOMString robustness = ""; }; +[Exposed=Window, + SecureContext] interface MediaKeySystemAccess { - readonly attribute DOMString keySystem; - MediaKeySystemConfiguration getConfiguration (); - Promise createMediaKeys (); + readonly attribute DOMString keySystem; + MediaKeySystemConfiguration getConfiguration(); + Promise createMediaKeys(); }; enum MediaKeySessionType { "temporary", - "persistent-usage-record", "persistent-license" }; +[Exposed=Window, + SecureContext] interface MediaKeys { - MediaKeySession createSession (optional MediaKeySessionType sessionType = "temporary"); - Promise setServerCertificate (BufferSource serverCertificate); + MediaKeySession createSession(optional MediaKeySessionType sessionType = "temporary"); + Promise setServerCertificate(BufferSource serverCertificate); }; +[Exposed=Window, + SecureContext] interface MediaKeySession : EventTarget { - readonly attribute DOMString sessionId; - readonly attribute unrestricted double expiration; - readonly attribute Promise closed; - readonly attribute MediaKeyStatusMap keyStatuses; - attribute EventHandler onkeystatuseschange; - attribute EventHandler onmessage; - Promise generateRequest (DOMString initDataType, BufferSource initData); - Promise load (DOMString sessionId); - Promise update (BufferSource response); - Promise close (); - Promise remove (); -}; - + readonly attribute DOMString sessionId; + readonly attribute unrestricted double expiration; + readonly attribute Promise closed; + readonly attribute MediaKeyStatusMap keyStatuses; + attribute EventHandler onkeystatuseschange; + attribute EventHandler onmessage; + Promise generateRequest(DOMString initDataType, + BufferSource initData); + Promise load(DOMString sessionId); + Promise update(BufferSource response); + Promise close(); + Promise remove(); +}; + +[Exposed=Window, + SecureContext] interface MediaKeyStatusMap { - iterable; - readonly attribute unsigned long size; - boolean has (BufferSource keyId); - any get (BufferSource keyId); + iterable; + readonly attribute unsigned long size; + boolean has(BufferSource keyId); + any get(BufferSource keyId); }; enum MediaKeyStatus { @@ -87,33 +92,36 @@ enum MediaKeyMessageType { "individualization-request" }; -[Constructor(DOMString type, MediaKeyMessageEventInit eventInitDict)] +[Exposed=Window, + SecureContext, + Constructor(DOMString type, MediaKeyMessageEventInit eventInitDict)] interface MediaKeyMessageEvent : Event { - readonly attribute MediaKeyMessageType messageType; - readonly attribute ArrayBuffer message; + readonly attribute MediaKeyMessageType messageType; + readonly attribute ArrayBuffer message; }; dictionary MediaKeyMessageEventInit : EventInit { - required MediaKeyMessageType messageType; - required ArrayBuffer message; + required MediaKeyMessageType messageType; + required ArrayBuffer message; }; -// partial interface HTMLMediaElement : EventTarget { +[Exposed=Window] partial interface HTMLMediaElement { - readonly attribute MediaKeys? mediaKeys; - attribute EventHandler onencrypted; - attribute EventHandler onwaitingforkey; - Promise setMediaKeys (MediaKeys? mediaKeys); + [SecureContext] + readonly attribute MediaKeys? mediaKeys; + attribute EventHandler onencrypted; + attribute EventHandler onwaitingforkey; + [SecureContext] Promise setMediaKeys(MediaKeys? mediaKeys); }; -[Constructor(DOMString type, optional MediaEncryptedEventInit eventInitDict)] +[Exposed=Window, + Constructor(DOMString type, optional MediaEncryptedEventInit eventInitDict)] interface MediaEncryptedEvent : Event { - readonly attribute DOMString initDataType; - readonly attribute ArrayBuffer? initData; + readonly attribute DOMString initDataType; + readonly attribute ArrayBuffer? initData; }; dictionary MediaEncryptedEventInit : EventInit { - DOMString initDataType = ""; - ArrayBuffer? initData = null; + DOMString initDataType = ""; + ArrayBuffer? initData = null; }; - From f564abaa52b70ef631c4ffc2e8af5bf5493ff4ca Mon Sep 17 00:00:00 2001 From: Luke Bjerring Date: Tue, 22 May 2018 13:23:10 -0400 Subject: [PATCH 2/5] Updated encrypted-media IDL file --- interfaces/encrypted-media.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/encrypted-media.idl b/interfaces/encrypted-media.idl index 5c2fa6a1eb169e..8f17e4a2d09d82 100644 --- a/interfaces/encrypted-media.idl +++ b/interfaces/encrypted-media.idl @@ -1,5 +1,5 @@ // GENERATED CONTENT - DO NOT EDIT -// Content of this file was automatically extracted from the encrypted-media spec. +// Content of this file was automatically extracted from the Encrypted Media Extensions spec. // See https://w3c.github.io/encrypted-media/ [Exposed=Window] From c2c2d7d5b4d2ff151f27d417d84c9debe6f7120a Mon Sep 17 00:00:00 2001 From: Luke Bjerring Date: Tue, 5 Jun 2018 09:38:54 -0400 Subject: [PATCH 3/5] Updated encrypted-media IDL file --- interfaces/encrypted-media.idl | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/interfaces/encrypted-media.idl b/interfaces/encrypted-media.idl index 8f17e4a2d09d82..baef3e039bbdaf 100644 --- a/interfaces/encrypted-media.idl +++ b/interfaces/encrypted-media.idl @@ -1,19 +1,18 @@ // GENERATED CONTENT - DO NOT EDIT -// Content of this file was automatically extracted from the Encrypted Media Extensions spec. -// See https://w3c.github.io/encrypted-media/ +// Content of this file was automatically extracted from the +// "Encrypted Media Extensions" spec. +// See: https://w3c.github.io/encrypted-media/ [Exposed=Window] partial interface Navigator { [SecureContext] Promise requestMediaKeySystemAccess(DOMString keySystem, sequence supportedConfigurations); }; - enum MediaKeysRequirement { "required", "optional", "not-allowed" }; - dictionary MediaKeySystemConfiguration { DOMString label = ""; sequence initDataTypes = []; @@ -23,12 +22,10 @@ dictionary MediaKeySystemConfiguration { MediaKeysRequirement persistentState = "optional"; sequence sessionTypes; }; - dictionary MediaKeySystemMediaCapability { DOMString contentType = ""; DOMString robustness = ""; }; - [Exposed=Window, SecureContext] interface MediaKeySystemAccess { @@ -36,19 +33,16 @@ interface MediaKeySystemAccess { MediaKeySystemConfiguration getConfiguration(); Promise createMediaKeys(); }; - enum MediaKeySessionType { "temporary", "persistent-license" }; - [Exposed=Window, SecureContext] interface MediaKeys { MediaKeySession createSession(optional MediaKeySessionType sessionType = "temporary"); Promise setServerCertificate(BufferSource serverCertificate); }; - [Exposed=Window, SecureContext] interface MediaKeySession : EventTarget { @@ -65,7 +59,6 @@ interface MediaKeySession : EventTarget { Promise close(); Promise remove(); }; - [Exposed=Window, SecureContext] interface MediaKeyStatusMap { @@ -74,7 +67,6 @@ interface MediaKeyStatusMap { boolean has(BufferSource keyId); any get(BufferSource keyId); }; - enum MediaKeyStatus { "usable", "expired", @@ -84,14 +76,12 @@ enum MediaKeyStatus { "status-pending", "internal-error" }; - enum MediaKeyMessageType { "license-request", "license-renewal", "license-release", "individualization-request" }; - [Exposed=Window, SecureContext, Constructor(DOMString type, MediaKeyMessageEventInit eventInitDict)] @@ -99,12 +89,10 @@ interface MediaKeyMessageEvent : Event { readonly attribute MediaKeyMessageType messageType; readonly attribute ArrayBuffer message; }; - dictionary MediaKeyMessageEventInit : EventInit { required MediaKeyMessageType messageType; required ArrayBuffer message; }; - [Exposed=Window] partial interface HTMLMediaElement { [SecureContext] @@ -113,15 +101,13 @@ partial interface HTMLMediaElement { attribute EventHandler onwaitingforkey; [SecureContext] Promise setMediaKeys(MediaKeys? mediaKeys); }; - [Exposed=Window, Constructor(DOMString type, optional MediaEncryptedEventInit eventInitDict)] interface MediaEncryptedEvent : Event { readonly attribute DOMString initDataType; readonly attribute ArrayBuffer? initData; }; - dictionary MediaEncryptedEventInit : EventInit { DOMString initDataType = ""; ArrayBuffer? initData = null; -}; +}; \ No newline at end of file From ba1bb6144e21fa411190629a89a9841155305d7d Mon Sep 17 00:00:00 2001 From: Luke Bjerring Date: Tue, 5 Jun 2018 16:35:13 -0400 Subject: [PATCH 4/5] Updated encrypted-media IDL file --- interfaces/encrypted-media.idl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interfaces/encrypted-media.idl b/interfaces/encrypted-media.idl index baef3e039bbdaf..607ed6be9d3731 100644 --- a/interfaces/encrypted-media.idl +++ b/interfaces/encrypted-media.idl @@ -110,4 +110,4 @@ interface MediaEncryptedEvent : Event { dictionary MediaEncryptedEventInit : EventInit { DOMString initDataType = ""; ArrayBuffer? initData = null; -}; \ No newline at end of file +}; From bd18732c1b8d9ad2fa3ae6e0bb6e6cbeaa9c3503 Mon Sep 17 00:00:00 2001 From: Luke Bjerring Date: Mon, 18 Jun 2018 15:18:39 -0400 Subject: [PATCH 5/5] Clean up test --- encrypted-media/idlharness.https.html | 37 +++++++++------------------ 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/encrypted-media/idlharness.https.html b/encrypted-media/idlharness.https.html index a609f9483e66b9..6a2ae80a5384aa 100644 --- a/encrypted-media/idlharness.https.html +++ b/encrypted-media/idlharness.https.html @@ -20,31 +20,18 @@

Description