feat(media): expose encrypted media interface shells

This commit is contained in:
ldm0
2026-11-21 20:03:28 +08:00
parent f06b4b509e
commit 00a124eff7
3 changed files with 25 additions and 1 deletions
@@ -220,6 +220,11 @@ const SECURE_CONTEXT_ONLY_INTERFACE_NAMES: &[&str] = &[
"MIDIOutput",
"MIDIOutputMap",
"MIDIPort",
"MediaKeyMessageEvent",
"MediaKeySession",
"MediaKeyStatusMap",
"MediaKeySystemAccess",
"MediaKeys",
"Worklet",
"AudioWorklet",
"ServiceWorker",
@@ -128,6 +128,26 @@ const CONSTRUCTOR_SPECS_BEFORE_STREAMS: &[ConstructorSpec] = &[
interface: web_api_interfaces::MIDIPort::DESCRIPTOR,
kind: ConstructorKind::Illegal,
},
ConstructorSpec {
interface: web_api_interfaces::MediaKeyMessageEvent::DESCRIPTOR,
kind: ConstructorKind::Shell { length: 2 },
},
ConstructorSpec {
interface: web_api_interfaces::MediaKeySession::DESCRIPTOR,
kind: ConstructorKind::Illegal,
},
ConstructorSpec {
interface: web_api_interfaces::MediaKeyStatusMap::DESCRIPTOR,
kind: ConstructorKind::Illegal,
},
ConstructorSpec {
interface: web_api_interfaces::MediaKeySystemAccess::DESCRIPTOR,
kind: ConstructorKind::Illegal,
},
ConstructorSpec {
interface: web_api_interfaces::MediaKeys::DESCRIPTOR,
kind: ConstructorKind::Illegal,
},
ConstructorSpec {
interface: web_api_interfaces::External::DESCRIPTOR,
kind: ConstructorKind::Illegal,
-1
View File
@@ -38,7 +38,6 @@ interfaces! {
MediaKeyMessageEvent: Event;
MediaKeySession: EventTarget;
MediaKeyStatusMap;
MediaKeyStatusMapIterator = "MediaKeyStatusMap Iterator";
MediaKeySystemAccess;
MediaKeys;
PaymentMethodChangeEvent: PaymentRequestUpdateEvent;