From ea3785a6d74423b117bd0c5d377973ceba456ecd Mon Sep 17 00:00:00 2001 From: Moonchild Date: Tue, 17 Oct 2023 13:03:29 +0200 Subject: Issue #2346 - Remove EME WebIDL interfaces --- dom/webidl/MediaEncryptedEvent.webidl | 23 ---------------- dom/webidl/MediaKeyError.webidl | 19 ------------- dom/webidl/MediaKeyMessageEvent.webidl | 30 -------------------- dom/webidl/MediaKeySession.webidl | 47 -------------------------------- dom/webidl/MediaKeyStatusMap.webidl | 30 -------------------- dom/webidl/MediaKeySystemAccess.webidl | 41 ---------------------------- dom/webidl/MediaKeys.webidl | 30 -------------------- dom/webidl/MediaKeysRequestStatus.webidl | 23 ---------------- dom/webidl/WidevineCDMManifest.webidl | 15 ---------- dom/webidl/moz.build | 13 --------- 10 files changed, 271 deletions(-) delete mode 100644 dom/webidl/MediaEncryptedEvent.webidl delete mode 100644 dom/webidl/MediaKeyError.webidl delete mode 100644 dom/webidl/MediaKeyMessageEvent.webidl delete mode 100644 dom/webidl/MediaKeySession.webidl delete mode 100644 dom/webidl/MediaKeyStatusMap.webidl delete mode 100644 dom/webidl/MediaKeySystemAccess.webidl delete mode 100644 dom/webidl/MediaKeys.webidl delete mode 100644 dom/webidl/MediaKeysRequestStatus.webidl delete mode 100644 dom/webidl/WidevineCDMManifest.webidl diff --git a/dom/webidl/MediaEncryptedEvent.webidl b/dom/webidl/MediaEncryptedEvent.webidl deleted file mode 100644 index 28d7a17b79..0000000000 --- a/dom/webidl/MediaEncryptedEvent.webidl +++ /dev/null @@ -1,23 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. - * - * 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. - */ - -[Pref="media.eme.apiVisible", Constructor(DOMString type, optional MediaKeyNeededEventInit eventInitDict)] -interface MediaEncryptedEvent : Event { - readonly attribute DOMString initDataType; - [Throws] - readonly attribute ArrayBuffer? initData; -}; - -dictionary MediaKeyNeededEventInit : EventInit { - DOMString initDataType = ""; - ArrayBuffer? initData = null; -}; diff --git a/dom/webidl/MediaKeyError.webidl b/dom/webidl/MediaKeyError.webidl deleted file mode 100644 index d0dde20320..0000000000 --- a/dom/webidl/MediaKeyError.webidl +++ /dev/null @@ -1,19 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. - * - * 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. - */ - -// According to the spec, "The future of error events and MediaKeyError -// is uncertain." -// https://www.w3.org/Bugs/Public/show_bug.cgi?id=21798 -[Pref="media.eme.apiVisible"] -interface MediaKeyError : Event { - readonly attribute unsigned long systemCode; -}; diff --git a/dom/webidl/MediaKeyMessageEvent.webidl b/dom/webidl/MediaKeyMessageEvent.webidl deleted file mode 100644 index 057924bb73..0000000000 --- a/dom/webidl/MediaKeyMessageEvent.webidl +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. - * - * 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 MediaKeyMessageType { - "license-request", - "license-renewal", - "license-release", - "individualization-request" -}; - -[Pref="media.eme.apiVisible", Constructor(DOMString type, MediaKeyMessageEventInit eventInitDict)] -interface MediaKeyMessageEvent : Event { - readonly attribute MediaKeyMessageType messageType; - [Throws] - readonly attribute ArrayBuffer message; -}; - -dictionary MediaKeyMessageEventInit : EventInit { - required MediaKeyMessageType messageType; - required ArrayBuffer message; -}; diff --git a/dom/webidl/MediaKeySession.webidl b/dom/webidl/MediaKeySession.webidl deleted file mode 100644 index 8ca5745c44..0000000000 --- a/dom/webidl/MediaKeySession.webidl +++ /dev/null @@ -1,47 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. - * - * 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. - */ - -[Pref="media.eme.apiVisible"] -interface MediaKeySession : EventTarget { - // error state - readonly attribute MediaKeyError? error; - - // session properties - readonly attribute DOMString keySystem; - readonly attribute DOMString sessionId; - - readonly attribute unrestricted double expiration; - - readonly attribute Promise closed; - - readonly attribute MediaKeyStatusMap keyStatuses; - - attribute EventHandler onkeystatuseschange; - - attribute EventHandler onmessage; - - [NewObject] - Promise generateRequest(DOMString initDataType, BufferSource initData); - - [NewObject] - Promise load(DOMString sessionId); - - // session operations - [NewObject] - Promise update(BufferSource response); - - [NewObject] - Promise close(); - - [NewObject] - Promise remove(); -}; diff --git a/dom/webidl/MediaKeyStatusMap.webidl b/dom/webidl/MediaKeyStatusMap.webidl deleted file mode 100644 index 1f34b5dc7c..0000000000 --- a/dom/webidl/MediaKeyStatusMap.webidl +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. - * - * 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 MediaKeyStatus { - "usable", - "expired", - "released", - "output-restricted", - "output-downscaled", - "status-pending", - "internal-error" -}; - -[Pref="media.eme.apiVisible"] -interface MediaKeyStatusMap { - iterable; - readonly attribute unsigned long size; - boolean has (BufferSource keyId); - [Throws] - any get (BufferSource keyId); -}; diff --git a/dom/webidl/MediaKeySystemAccess.webidl b/dom/webidl/MediaKeySystemAccess.webidl deleted file mode 100644 index 01552e4490..0000000000 --- a/dom/webidl/MediaKeySystemAccess.webidl +++ /dev/null @@ -1,41 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. - * - * 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 = ""; - DOMString robustness = ""; -}; - -dictionary MediaKeySystemConfiguration { - DOMString label = ""; - sequence initDataTypes = []; - sequence audioCapabilities = []; - sequence videoCapabilities = []; - MediaKeysRequirement distinctiveIdentifier = "optional"; - MediaKeysRequirement persistentState = "optional"; - sequence sessionTypes; -}; - -[Pref="media.eme.apiVisible"] -interface MediaKeySystemAccess { - readonly attribute DOMString keySystem; - [NewObject] - MediaKeySystemConfiguration getConfiguration(); - [NewObject] - Promise createMediaKeys(); -}; diff --git a/dom/webidl/MediaKeys.webidl b/dom/webidl/MediaKeys.webidl deleted file mode 100644 index cb84cdab6d..0000000000 --- a/dom/webidl/MediaKeys.webidl +++ /dev/null @@ -1,30 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. - * - * 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. - */ - -// 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 MediaKeySessionType sessionType = "temporary"); - - [NewObject] - Promise setServerCertificate((ArrayBufferView or ArrayBuffer) serverCertificate); -}; diff --git a/dom/webidl/MediaKeysRequestStatus.webidl b/dom/webidl/MediaKeysRequestStatus.webidl deleted file mode 100644 index 737372f664..0000000000 --- a/dom/webidl/MediaKeysRequestStatus.webidl +++ /dev/null @@ -1,23 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -enum MediaKeySystemStatus { - "available", - "api-disabled", - "cdm-disabled", - "cdm-not-supported", - "cdm-not-installed", - "cdm-created", -}; - -/* Note: This dictionary and enum is only used by Gecko to convey messages - * to chrome JS code. It is not exposed to the web. - */ - -dictionary RequestMediaKeySystemAccessNotification { - required DOMString keySystem; - required MediaKeySystemStatus status; -}; diff --git a/dom/webidl/WidevineCDMManifest.webidl b/dom/webidl/WidevineCDMManifest.webidl deleted file mode 100644 index 83e14e0b0b..0000000000 --- a/dom/webidl/WidevineCDMManifest.webidl +++ /dev/null @@ -1,15 +0,0 @@ -/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this file, - * You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -dictionary WidevineCDMManifest { - required DOMString name; - required DOMString description; - required DOMString version; - required DOMString x-cdm-module-versions; - required DOMString x-cdm-interface-versions; - required DOMString x-cdm-host-versions; - required DOMString x-cdm-codecs; -}; diff --git a/dom/webidl/moz.build b/dom/webidl/moz.build index 1cefdacabb..dfcc11182b 100644 --- a/dom/webidl/moz.build +++ b/dom/webidl/moz.build @@ -572,19 +572,6 @@ WEBIDL_FILES = [ 'XULElement.webidl', ] -if CONFIG['MOZ_EME']: - WEBIDL_FILES += [ - 'MediaEncryptedEvent.webidl', - 'MediaKeyError.webidl', - 'MediaKeyMessageEvent.webidl', - 'MediaKeys.webidl', - 'MediaKeySession.webidl', - 'MediaKeysRequestStatus.webidl', - 'MediaKeyStatusMap.webidl', - 'MediaKeySystemAccess.webidl', - 'WidevineCDMManifest.webidl', - ] - if CONFIG['MOZ_AUDIO_CHANNEL_MANAGER']: WEBIDL_FILES += [ 'AudioChannelManager.webidl', -- cgit v1.2.3