Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(772)

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/encrypted-media/EncryptedMediaExtensions.idl

Issue 2546853003: Add W3C encrypted-media tests (Closed)
Patch Set: rebase now that content files landed Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Encrypted Media Extensions WebIDL
2 //
3 // NOTE: Please update the link below to the specification version from
4 // which this IDL was extracted.
5 //
6 // https://www.w3.org/TR/2016/WD-encrypted-media-20160610/
7 // + commit 5499821932391ae2c2e53756ae7ab9fae89d5863
8 //
9
10 partial interface Navigator {
11 Promise<MediaKeySystemAccess> requestMediaKeySystemAccess (DOMString keySyst em, sequence<MediaKeySystemConfiguration> supportedConfigurations);
12 };
13
14 enum MediaKeysRequirement {
15 "required",
16 "optional",
17 "not-allowed"
18 };
19
20 dictionary MediaKeySystemConfiguration {
21 DOMString label = "";
22 sequence<DOMString> initDataTypes = [];
23 sequence<MediaKeySystemMediaCapability> audioCapabilities = [];
24 sequence<MediaKeySystemMediaCapability> videoCapabilities = [];
25 MediaKeysRequirement distinctiveIdentifier = "op tional";
26 MediaKeysRequirement persistentState = "optional ";
27 sequence<DOMString> sessionTypes;
28 };
29
30 dictionary MediaKeySystemMediaCapability {
31 DOMString contentType = "";
32 DOMString robustness = "";
33 };
34
35 interface MediaKeySystemAccess {
36 readonly attribute DOMString keySystem;
37 MediaKeySystemConfiguration getConfiguration ();
38 Promise<MediaKeys> createMediaKeys ();
39 };
40
41 enum MediaKeySessionType {
42 "temporary",
43 "persistent-usage-record",
44 "persistent-license"
45 };
46
47 interface MediaKeys {
48 MediaKeySession createSession (optional MediaKeySessionType sessionType = " temporary");
49 Promise<boolean> setServerCertificate (BufferSource serverCertificate);
50 };
51
52 interface MediaKeySession : EventTarget {
53 readonly attribute DOMString sessionId;
54 readonly attribute unrestricted double expiration;
55 readonly attribute Promise<void> closed;
56 readonly attribute MediaKeyStatusMap keyStatuses;
57 attribute EventHandler onkeystatuseschange;
58 attribute EventHandler onmessage;
59 Promise<void> generateRequest (DOMString initDataType, BufferSource initD ata);
60 Promise<boolean> load (DOMString sessionId);
61 Promise<void> update (BufferSource response);
62 Promise<void> close ();
63 Promise<void> remove ();
64 };
65
66 interface MediaKeyStatusMap {
67 iterable<BufferSource,MediaKeyStatus>;
68 readonly attribute unsigned long size;
69 boolean has (BufferSource keyId);
70 any get (BufferSource keyId);
71 };
72
73 enum MediaKeyStatus {
74 "usable",
75 "expired",
76 "released",
77 "output-restricted",
78 "output-downscaled",
79 "status-pending",
80 "internal-error"
81 };
82
83 enum MediaKeyMessageType {
84 "license-request",
85 "license-renewal",
86 "license-release",
87 "individualization-request"
88 };
89
90 [Constructor(DOMString type, MediaKeyMessageEventInit eventInitDict)]
91 interface MediaKeyMessageEvent : Event {
92 readonly attribute MediaKeyMessageType messageType;
93 readonly attribute ArrayBuffer message;
94 };
95
96 dictionary MediaKeyMessageEventInit : EventInit {
97 required MediaKeyMessageType messageType;
98 required ArrayBuffer message;
99 };
100
101 // partial interface HTMLMediaElement : EventTarget {
102 partial interface HTMLMediaElement {
103 readonly attribute MediaKeys? mediaKeys;
104 attribute EventHandler onencrypted;
105 attribute EventHandler onwaitingforkey;
106 Promise<void> setMediaKeys (MediaKeys? mediaKeys);
107 };
108
109 [Constructor(DOMString type, optional MediaEncryptedEventInit eventInitDict)]
110 interface MediaEncryptedEvent : Event {
111 readonly attribute DOMString initDataType;
112 readonly attribute ArrayBuffer? initData;
113 };
114
115 dictionary MediaEncryptedEventInit : EventInit {
116 DOMString initDataType = "";
117 ArrayBuffer? initData = null;
118 };
119
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698