mirror of
https://github.com/lexmount/moli.git
synced 2026-11-06 00:07:32 +00:00
feat(media): expose video encoder and decoder interface shells
This commit is contained in:
@@ -35,6 +35,8 @@ pub(in crate::context_bootstrap) const WORKER_SHARED_INTERFACE_NAMES: &[&str] =
|
||||
"MIDIOutput",
|
||||
"MIDIOutputMap",
|
||||
"MIDIPort",
|
||||
"VideoDecoder",
|
||||
"VideoEncoder",
|
||||
"EventTarget",
|
||||
"Event",
|
||||
"CustomEvent",
|
||||
@@ -211,6 +213,8 @@ const SECURE_CONTEXT_ONLY_INTERFACE_NAMES: &[&str] = &[
|
||||
"PaymentRequest",
|
||||
"PaymentRequestUpdateEvent",
|
||||
"PaymentResponse",
|
||||
"VideoDecoder",
|
||||
"VideoEncoder",
|
||||
"Worklet",
|
||||
"AudioWorklet",
|
||||
"ServiceWorker",
|
||||
@@ -249,6 +253,7 @@ const WINDOW_DEDICATED_AND_SHARED_WORKER_INTERFACE_NAMES: &[&str] = &[
|
||||
"XMLHttpRequest",
|
||||
];
|
||||
const DEDICATED_AND_SHARED_WORKER_INTERFACE_NAMES: &[&str] = &["FileReaderSync"];
|
||||
const WINDOW_AND_DEDICATED_WORKER_INTERFACE_NAMES: &[&str] = &["VideoDecoder", "VideoEncoder"];
|
||||
|
||||
pub(in crate::context_bootstrap) const INDEXED_DB_INTERFACE_NAMES: &[&str] = &[
|
||||
"DOMStringList",
|
||||
@@ -525,6 +530,9 @@ fn exposure_for_name(name: &str) -> ExposureSet {
|
||||
match name {
|
||||
"FileSystemSyncAccessHandle" => ExposureSet::DEDICATED_WORKER_ONLY,
|
||||
"EncodedVideoChunk" => ExposureSet::WINDOW_AND_DEDICATED_WORKER,
|
||||
_ if WINDOW_AND_DEDICATED_WORKER_INTERFACE_NAMES.contains(&name) => {
|
||||
ExposureSet::WINDOW_AND_DEDICATED_WORKER
|
||||
}
|
||||
_ if WINDOW_DEDICATED_AND_SHARED_WORKER_INTERFACE_NAMES.contains(&name) => {
|
||||
ExposureSet::WINDOW_DEDICATED_AND_SHARED_WORKER
|
||||
}
|
||||
|
||||
@@ -120,6 +120,14 @@ const CONSTRUCTOR_SPECS_BEFORE_STREAMS: &[ConstructorSpec] = &[
|
||||
interface: web_api_interfaces::PaymentResponse::DESCRIPTOR,
|
||||
kind: ConstructorKind::Illegal,
|
||||
},
|
||||
ConstructorSpec {
|
||||
interface: web_api_interfaces::VideoDecoder::DESCRIPTOR,
|
||||
kind: ConstructorKind::Shell { length: 1 },
|
||||
},
|
||||
ConstructorSpec {
|
||||
interface: web_api_interfaces::VideoEncoder::DESCRIPTOR,
|
||||
kind: ConstructorKind::Shell { length: 1 },
|
||||
},
|
||||
ConstructorSpec {
|
||||
interface: web_api_interfaces::External::DESCRIPTOR,
|
||||
kind: ConstructorKind::Illegal,
|
||||
|
||||
@@ -45,6 +45,8 @@ interfaces! {
|
||||
PaymentRequest: EventTarget;
|
||||
PaymentRequestUpdateEvent: Event;
|
||||
PaymentResponse: EventTarget;
|
||||
VideoDecoder: EventTarget;
|
||||
VideoEncoder: EventTarget;
|
||||
AbortController;
|
||||
AbortSignal: EventTarget;
|
||||
AbstractRange;
|
||||
|
||||
Reference in New Issue
Block a user