Add bindings for the WebRTC Encoded Transform API (#4125)

This commit is contained in:
Michael Rosenberg 2024-09-28 05:17:36 -04:00 committed by GitHub
parent 1ebbfc064e
commit 532f30a267
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 1956 additions and 0 deletions

View File

@ -17,6 +17,9 @@
* Added experimental support for `Symbol.dispose` via `WASM_BINDGEN_EXPERIMENTAL_SYMBOL_DISPOSE`.
[#4118](https://github.com/rustwasm/wasm-bindgen/pull/4118)
* Added bindings for the draft [WebRTC Encoded Transform](https://www.w3.org/TR/webrtc-encoded-transform) spec.
[#4125](https://github.com/rustwasm/wasm-bindgen/pull/4125)
### Fixed
* Fixed linked modules emitting snippet files when not using `--split-linked-modules`.

View File

@ -768,6 +768,7 @@ IterationCompositeOperation = []
JsonWebKey = []
KeyAlgorithm = []
KeyEvent = []
KeyFrameRequestEvent = ["Event"]
KeyIdsInitData = []
KeyboardEvent = ["Event", "UiEvent"]
KeyboardEventInit = []
@ -1114,6 +1115,13 @@ RtcDataChannelInit = []
RtcDataChannelState = []
RtcDataChannelType = []
RtcDegradationPreference = []
RtcEncodedAudioFrame = []
RtcEncodedAudioFrameMetadata = []
RtcEncodedAudioFrameOptions = []
RtcEncodedVideoFrame = []
RtcEncodedVideoFrameMetadata = []
RtcEncodedVideoFrameOptions = []
RtcEncodedVideoFrameType = []
RtcFecParameters = []
RtcIceCandidate = []
RtcIceCandidateInit = []
@ -1154,6 +1162,8 @@ RtcRtpHeaderExtensionCapability = []
RtcRtpHeaderExtensionParameters = []
RtcRtpParameters = []
RtcRtpReceiver = []
RtcRtpScriptTransform = []
RtcRtpScriptTransformer = ["EventTarget"]
RtcRtpSender = []
RtcRtpSourceEntry = []
RtcRtpSourceEntryType = []
@ -1174,12 +1184,19 @@ RtcStatsReportInternal = []
RtcStatsType = []
RtcTrackEvent = ["Event"]
RtcTrackEventInit = []
RtcTransformEvent = ["Event"]
RtcTransportStats = []
RtcdtmfSender = ["EventTarget"]
RtcdtmfToneChangeEvent = ["Event"]
RtcdtmfToneChangeEventInit = []
RtcrtpContributingSourceStats = []
RtcrtpStreamStats = []
SFrameTransform = ["EventTarget"]
SFrameTransformErrorEvent = ["Event"]
SFrameTransformErrorEventInit = []
SFrameTransformErrorEventType = []
SFrameTransformOptions = []
SFrameTransformRole = []
SaveFilePickerOptions = []
Scheduler = []
SchedulerPostTaskOptions = []

View File

@ -50,6 +50,31 @@ extern "C" {
this: &DedicatedWorkerGlobalScope,
value: Option<&::js_sys::Function>,
);
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "DedicatedWorkerGlobalScope" , js_name = onrtctransform)]
#[doc = "Getter for the `onrtctransform` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onrtctransform)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn onrtctransform(this: &DedicatedWorkerGlobalScope) -> Option<::js_sys::Function>;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "DedicatedWorkerGlobalScope" , js_name = onrtctransform)]
#[doc = "Setter for the `onrtctransform` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope/onrtctransform)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `DedicatedWorkerGlobalScope`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_onrtctransform(
this: &DedicatedWorkerGlobalScope,
value: Option<&::js_sys::Function>,
);
# [wasm_bindgen (method , structural , js_class = "DedicatedWorkerGlobalScope" , js_name = close)]
#[doc = "The `close()` method."]
#[doc = ""]

View File

@ -0,0 +1,52 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = KeyFrameRequestEvent , typescript_type = "KeyFrameRequestEvent")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `KeyFrameRequestEvent` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyFrameRequestEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `KeyFrameRequestEvent`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type KeyFrameRequestEvent;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "KeyFrameRequestEvent" , js_name = rid)]
#[doc = "Getter for the `rid` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyFrameRequestEvent/rid)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `KeyFrameRequestEvent`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn rid(this: &KeyFrameRequestEvent) -> Option<String>;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen(catch, constructor, js_class = "KeyFrameRequestEvent")]
#[doc = "The `new KeyFrameRequestEvent(..)` constructor, creating a new instance of `KeyFrameRequestEvent`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyFrameRequestEvent/KeyFrameRequestEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `KeyFrameRequestEvent`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new(type_: &str) -> Result<KeyFrameRequestEvent, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen(catch, constructor, js_class = "KeyFrameRequestEvent")]
#[doc = "The `new KeyFrameRequestEvent(..)` constructor, creating a new instance of `KeyFrameRequestEvent`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/KeyFrameRequestEvent/KeyFrameRequestEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `KeyFrameRequestEvent`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new_with_rid(type_: &str, rid: &str) -> Result<KeyFrameRequestEvent, JsValue>;
}

View File

@ -0,0 +1,79 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCEncodedAudioFrame , typescript_type = "RTCEncodedAudioFrame")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `RtcEncodedAudioFrame` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCEncodedAudioFrame)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrame`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type RtcEncodedAudioFrame;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "RTCEncodedAudioFrame" , js_name = data)]
#[doc = "Getter for the `data` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCEncodedAudioFrame/data)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrame`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn data(this: &RtcEncodedAudioFrame) -> ::js_sys::ArrayBuffer;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "RTCEncodedAudioFrame" , js_name = data)]
#[doc = "Setter for the `data` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCEncodedAudioFrame/data)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrame`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_data(this: &RtcEncodedAudioFrame, value: &::js_sys::ArrayBuffer);
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen(catch, constructor, js_class = "RTCEncodedAudioFrame")]
#[doc = "The `new RtcEncodedAudioFrame(..)` constructor, creating a new instance of `RtcEncodedAudioFrame`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCEncodedAudioFrame/RTCEncodedAudioFrame)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrame`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new(original_frame: &RtcEncodedAudioFrame) -> Result<RtcEncodedAudioFrame, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "RtcEncodedAudioFrameOptions")]
#[wasm_bindgen(catch, constructor, js_class = "RTCEncodedAudioFrame")]
#[doc = "The `new RtcEncodedAudioFrame(..)` constructor, creating a new instance of `RtcEncodedAudioFrame`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCEncodedAudioFrame/RTCEncodedAudioFrame)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrame`, `RtcEncodedAudioFrameOptions`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new_with_options(
original_frame: &RtcEncodedAudioFrame,
options: &RtcEncodedAudioFrameOptions,
) -> Result<RtcEncodedAudioFrame, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "RtcEncodedAudioFrameMetadata")]
# [wasm_bindgen (method , structural , js_class = "RTCEncodedAudioFrame" , js_name = getMetadata)]
#[doc = "The `getMetadata()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCEncodedAudioFrame/getMetadata)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrame`, `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn get_metadata(this: &RtcEncodedAudioFrame) -> RtcEncodedAudioFrameMetadata;
}

View File

@ -0,0 +1,185 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCEncodedAudioFrameMetadata)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `RtcEncodedAudioFrameMetadata` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type RtcEncodedAudioFrameMetadata;
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `contributingSources` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "contributingSources")]
pub fn get_contributing_sources(this: &RtcEncodedAudioFrameMetadata)
-> Option<::js_sys::Array>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `contributingSources` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "contributingSources")]
pub fn set_contributing_sources(
this: &RtcEncodedAudioFrameMetadata,
val: &::wasm_bindgen::JsValue,
);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `mimeType` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "mimeType")]
pub fn get_mime_type(this: &RtcEncodedAudioFrameMetadata) -> Option<String>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `mimeType` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "mimeType")]
pub fn set_mime_type(this: &RtcEncodedAudioFrameMetadata, val: &str);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `payloadType` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "payloadType")]
pub fn get_payload_type(this: &RtcEncodedAudioFrameMetadata) -> Option<u8>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `payloadType` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "payloadType")]
pub fn set_payload_type(this: &RtcEncodedAudioFrameMetadata, val: u8);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `rtpTimestamp` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "rtpTimestamp")]
pub fn get_rtp_timestamp(this: &RtcEncodedAudioFrameMetadata) -> Option<u32>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `rtpTimestamp` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "rtpTimestamp")]
pub fn set_rtp_timestamp(this: &RtcEncodedAudioFrameMetadata, val: u32);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `sequenceNumber` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "sequenceNumber")]
pub fn get_sequence_number(this: &RtcEncodedAudioFrameMetadata) -> Option<i16>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `sequenceNumber` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "sequenceNumber")]
pub fn set_sequence_number(this: &RtcEncodedAudioFrameMetadata, val: i16);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `synchronizationSource` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "synchronizationSource")]
pub fn get_synchronization_source(this: &RtcEncodedAudioFrameMetadata) -> Option<u32>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `synchronizationSource` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "synchronizationSource")]
pub fn set_synchronization_source(this: &RtcEncodedAudioFrameMetadata, val: u32);
}
#[cfg(web_sys_unstable_apis)]
impl RtcEncodedAudioFrameMetadata {
#[doc = "Construct a new `RtcEncodedAudioFrameMetadata`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_contributing_sources()` instead."]
pub fn contributing_sources(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
self.set_contributing_sources(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_mime_type()` instead."]
pub fn mime_type(&mut self, val: &str) -> &mut Self {
self.set_mime_type(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_payload_type()` instead."]
pub fn payload_type(&mut self, val: u8) -> &mut Self {
self.set_payload_type(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_rtp_timestamp()` instead."]
pub fn rtp_timestamp(&mut self, val: u32) -> &mut Self {
self.set_rtp_timestamp(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_sequence_number()` instead."]
pub fn sequence_number(&mut self, val: i16) -> &mut Self {
self.set_sequence_number(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_synchronization_source()` instead."]
pub fn synchronization_source(&mut self, val: u32) -> &mut Self {
self.set_synchronization_source(val);
self
}
}
#[cfg(web_sys_unstable_apis)]
impl Default for RtcEncodedAudioFrameMetadata {
fn default() -> Self {
Self::new()
}
}

View File

@ -0,0 +1,65 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCEncodedAudioFrameOptions)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `RtcEncodedAudioFrameOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameOptions`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type RtcEncodedAudioFrameOptions;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "RtcEncodedAudioFrameMetadata")]
#[doc = "Get the `metadata` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`, `RtcEncodedAudioFrameOptions`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "metadata")]
pub fn get_metadata(this: &RtcEncodedAudioFrameOptions)
-> Option<RtcEncodedAudioFrameMetadata>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "RtcEncodedAudioFrameMetadata")]
#[doc = "Change the `metadata` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`, `RtcEncodedAudioFrameOptions`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "metadata")]
pub fn set_metadata(this: &RtcEncodedAudioFrameOptions, val: &RtcEncodedAudioFrameMetadata);
}
#[cfg(web_sys_unstable_apis)]
impl RtcEncodedAudioFrameOptions {
#[doc = "Construct a new `RtcEncodedAudioFrameOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameOptions`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "RtcEncodedAudioFrameMetadata")]
#[deprecated = "Use `set_metadata()` instead."]
pub fn metadata(&mut self, val: &RtcEncodedAudioFrameMetadata) -> &mut Self {
self.set_metadata(val);
self
}
}
#[cfg(web_sys_unstable_apis)]
impl Default for RtcEncodedAudioFrameOptions {
fn default() -> Self {
Self::new()
}
}

View File

@ -0,0 +1,91 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCEncodedVideoFrame , typescript_type = "RTCEncodedVideoFrame")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `RtcEncodedVideoFrame` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCEncodedVideoFrame)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrame`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type RtcEncodedVideoFrame;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "RtcEncodedVideoFrameType")]
# [wasm_bindgen (structural , method , getter , js_class = "RTCEncodedVideoFrame" , js_name = type)]
#[doc = "Getter for the `type` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCEncodedVideoFrame/type)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrame`, `RtcEncodedVideoFrameType`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn type_(this: &RtcEncodedVideoFrame) -> RtcEncodedVideoFrameType;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "RTCEncodedVideoFrame" , js_name = data)]
#[doc = "Getter for the `data` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCEncodedVideoFrame/data)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrame`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn data(this: &RtcEncodedVideoFrame) -> ::js_sys::ArrayBuffer;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "RTCEncodedVideoFrame" , js_name = data)]
#[doc = "Setter for the `data` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCEncodedVideoFrame/data)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrame`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_data(this: &RtcEncodedVideoFrame, value: &::js_sys::ArrayBuffer);
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen(catch, constructor, js_class = "RTCEncodedVideoFrame")]
#[doc = "The `new RtcEncodedVideoFrame(..)` constructor, creating a new instance of `RtcEncodedVideoFrame`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCEncodedVideoFrame/RTCEncodedVideoFrame)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrame`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new(original_frame: &RtcEncodedVideoFrame) -> Result<RtcEncodedVideoFrame, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "RtcEncodedVideoFrameOptions")]
#[wasm_bindgen(catch, constructor, js_class = "RTCEncodedVideoFrame")]
#[doc = "The `new RtcEncodedVideoFrame(..)` constructor, creating a new instance of `RtcEncodedVideoFrame`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCEncodedVideoFrame/RTCEncodedVideoFrame)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrame`, `RtcEncodedVideoFrameOptions`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new_with_options(
original_frame: &RtcEncodedVideoFrame,
options: &RtcEncodedVideoFrameOptions,
) -> Result<RtcEncodedVideoFrame, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "RtcEncodedVideoFrameMetadata")]
# [wasm_bindgen (method , structural , js_class = "RTCEncodedVideoFrame" , js_name = getMetadata)]
#[doc = "The `getMetadata()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCEncodedVideoFrame/getMetadata)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrame`, `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn get_metadata(this: &RtcEncodedVideoFrame) -> RtcEncodedVideoFrameMetadata;
}

View File

@ -0,0 +1,329 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCEncodedVideoFrameMetadata)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `RtcEncodedVideoFrameMetadata` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type RtcEncodedVideoFrameMetadata;
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `contributingSources` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "contributingSources")]
pub fn get_contributing_sources(this: &RtcEncodedVideoFrameMetadata)
-> Option<::js_sys::Array>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `contributingSources` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "contributingSources")]
pub fn set_contributing_sources(
this: &RtcEncodedVideoFrameMetadata,
val: &::wasm_bindgen::JsValue,
);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `dependencies` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "dependencies")]
pub fn get_dependencies(this: &RtcEncodedVideoFrameMetadata) -> Option<::js_sys::Array>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `dependencies` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "dependencies")]
pub fn set_dependencies(this: &RtcEncodedVideoFrameMetadata, val: &::wasm_bindgen::JsValue);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `frameId` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "frameId")]
pub fn get_frame_id(this: &RtcEncodedVideoFrameMetadata) -> Option<f64>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `frameId` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "frameId")]
pub fn set_frame_id(this: &RtcEncodedVideoFrameMetadata, val: f64);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `height` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "height")]
pub fn get_height(this: &RtcEncodedVideoFrameMetadata) -> Option<u16>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `height` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "height")]
pub fn set_height(this: &RtcEncodedVideoFrameMetadata, val: u16);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `mimeType` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "mimeType")]
pub fn get_mime_type(this: &RtcEncodedVideoFrameMetadata) -> Option<String>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `mimeType` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "mimeType")]
pub fn set_mime_type(this: &RtcEncodedVideoFrameMetadata, val: &str);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `payloadType` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "payloadType")]
pub fn get_payload_type(this: &RtcEncodedVideoFrameMetadata) -> Option<u8>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `payloadType` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "payloadType")]
pub fn set_payload_type(this: &RtcEncodedVideoFrameMetadata, val: u8);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `rtpTimestamp` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "rtpTimestamp")]
pub fn get_rtp_timestamp(this: &RtcEncodedVideoFrameMetadata) -> Option<u32>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `rtpTimestamp` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "rtpTimestamp")]
pub fn set_rtp_timestamp(this: &RtcEncodedVideoFrameMetadata, val: u32);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `spatialIndex` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "spatialIndex")]
pub fn get_spatial_index(this: &RtcEncodedVideoFrameMetadata) -> Option<u32>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `spatialIndex` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "spatialIndex")]
pub fn set_spatial_index(this: &RtcEncodedVideoFrameMetadata, val: u32);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `synchronizationSource` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "synchronizationSource")]
pub fn get_synchronization_source(this: &RtcEncodedVideoFrameMetadata) -> Option<u32>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `synchronizationSource` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "synchronizationSource")]
pub fn set_synchronization_source(this: &RtcEncodedVideoFrameMetadata, val: u32);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `temporalIndex` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "temporalIndex")]
pub fn get_temporal_index(this: &RtcEncodedVideoFrameMetadata) -> Option<u32>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `temporalIndex` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "temporalIndex")]
pub fn set_temporal_index(this: &RtcEncodedVideoFrameMetadata, val: u32);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `timestamp` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "timestamp")]
pub fn get_timestamp(this: &RtcEncodedVideoFrameMetadata) -> Option<f64>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `timestamp` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "timestamp")]
pub fn set_timestamp(this: &RtcEncodedVideoFrameMetadata, val: f64);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `width` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "width")]
pub fn get_width(this: &RtcEncodedVideoFrameMetadata) -> Option<u16>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `width` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "width")]
pub fn set_width(this: &RtcEncodedVideoFrameMetadata, val: u16);
}
#[cfg(web_sys_unstable_apis)]
impl RtcEncodedVideoFrameMetadata {
#[doc = "Construct a new `RtcEncodedVideoFrameMetadata`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_contributing_sources()` instead."]
pub fn contributing_sources(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
self.set_contributing_sources(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_dependencies()` instead."]
pub fn dependencies(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
self.set_dependencies(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_frame_id()` instead."]
pub fn frame_id(&mut self, val: f64) -> &mut Self {
self.set_frame_id(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_height()` instead."]
pub fn height(&mut self, val: u16) -> &mut Self {
self.set_height(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_mime_type()` instead."]
pub fn mime_type(&mut self, val: &str) -> &mut Self {
self.set_mime_type(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_payload_type()` instead."]
pub fn payload_type(&mut self, val: u8) -> &mut Self {
self.set_payload_type(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_rtp_timestamp()` instead."]
pub fn rtp_timestamp(&mut self, val: u32) -> &mut Self {
self.set_rtp_timestamp(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_spatial_index()` instead."]
pub fn spatial_index(&mut self, val: u32) -> &mut Self {
self.set_spatial_index(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_synchronization_source()` instead."]
pub fn synchronization_source(&mut self, val: u32) -> &mut Self {
self.set_synchronization_source(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_temporal_index()` instead."]
pub fn temporal_index(&mut self, val: u32) -> &mut Self {
self.set_temporal_index(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_timestamp()` instead."]
pub fn timestamp(&mut self, val: f64) -> &mut Self {
self.set_timestamp(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_width()` instead."]
pub fn width(&mut self, val: u16) -> &mut Self {
self.set_width(val);
self
}
}
#[cfg(web_sys_unstable_apis)]
impl Default for RtcEncodedVideoFrameMetadata {
fn default() -> Self {
Self::new()
}
}

View File

@ -0,0 +1,65 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCEncodedVideoFrameOptions)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `RtcEncodedVideoFrameOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameOptions`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type RtcEncodedVideoFrameOptions;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "RtcEncodedVideoFrameMetadata")]
#[doc = "Get the `metadata` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`, `RtcEncodedVideoFrameOptions`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "metadata")]
pub fn get_metadata(this: &RtcEncodedVideoFrameOptions)
-> Option<RtcEncodedVideoFrameMetadata>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "RtcEncodedVideoFrameMetadata")]
#[doc = "Change the `metadata` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`, `RtcEncodedVideoFrameOptions`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "metadata")]
pub fn set_metadata(this: &RtcEncodedVideoFrameOptions, val: &RtcEncodedVideoFrameMetadata);
}
#[cfg(web_sys_unstable_apis)]
impl RtcEncodedVideoFrameOptions {
#[doc = "Construct a new `RtcEncodedVideoFrameOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameOptions`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "RtcEncodedVideoFrameMetadata")]
#[deprecated = "Use `set_metadata()` instead."]
pub fn metadata(&mut self, val: &RtcEncodedVideoFrameMetadata) -> &mut Self {
self.set_metadata(val);
self
}
}
#[cfg(web_sys_unstable_apis)]
impl Default for RtcEncodedVideoFrameOptions {
fn default() -> Self {
Self::new()
}
}

View File

@ -0,0 +1,17 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
#[doc = "The `RtcEncodedVideoFrameType` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameType`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum RtcEncodedVideoFrameType {
Empty = "empty",
Key = "key",
Delta = "delta",
}

View File

@ -45,6 +45,28 @@ extern "C" {
this: &RtcRtpReceiver,
value: Option<f64>,
) -> Result<(), JsValue>;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "RTCRtpReceiver" , js_name = transform)]
#[doc = "Getter for the `transform` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/transform)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn transform(this: &RtcRtpReceiver) -> Option<::js_sys::Object>;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "RTCRtpReceiver" , js_name = transform)]
#[doc = "Setter for the `transform` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpReceiver/transform)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpReceiver`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_transform(this: &RtcRtpReceiver, value: Option<&::js_sys::Object>);
#[cfg(feature = "RtcRtpCapabilities")]
# [wasm_bindgen (static_method_of = RtcRtpReceiver , js_class = "RTCRtpReceiver" , js_name = getCapabilities)]
#[doc = "The `getCapabilities()` method."]

View File

@ -0,0 +1,62 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCRtpScriptTransform , typescript_type = "RTCRtpScriptTransform")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `RtcRtpScriptTransform` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpScriptTransform)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpScriptTransform`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type RtcRtpScriptTransform;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "Worker")]
#[wasm_bindgen(catch, constructor, js_class = "RTCRtpScriptTransform")]
#[doc = "The `new RtcRtpScriptTransform(..)` constructor, creating a new instance of `RtcRtpScriptTransform`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpScriptTransform/RTCRtpScriptTransform)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpScriptTransform`, `Worker`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new(worker: &Worker) -> Result<RtcRtpScriptTransform, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "Worker")]
#[wasm_bindgen(catch, constructor, js_class = "RTCRtpScriptTransform")]
#[doc = "The `new RtcRtpScriptTransform(..)` constructor, creating a new instance of `RtcRtpScriptTransform`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpScriptTransform/RTCRtpScriptTransform)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpScriptTransform`, `Worker`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new_with_options(
worker: &Worker,
options: &::wasm_bindgen::JsValue,
) -> Result<RtcRtpScriptTransform, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "Worker")]
#[wasm_bindgen(catch, constructor, js_class = "RTCRtpScriptTransform")]
#[doc = "The `new RtcRtpScriptTransform(..)` constructor, creating a new instance of `RtcRtpScriptTransform`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpScriptTransform/RTCRtpScriptTransform)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpScriptTransform`, `Worker`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new_with_options_and_transfer(
worker: &Worker,
options: &::wasm_bindgen::JsValue,
transfer: &::wasm_bindgen::JsValue,
) -> Result<RtcRtpScriptTransform, JsValue>;
}

View File

@ -0,0 +1,115 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = RTCRtpScriptTransformer , typescript_type = "RTCRtpScriptTransformer")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `RtcRtpScriptTransformer` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpScriptTransformer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpScriptTransformer`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type RtcRtpScriptTransformer;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "ReadableStream")]
# [wasm_bindgen (structural , method , getter , js_class = "RTCRtpScriptTransformer" , js_name = readable)]
#[doc = "Getter for the `readable` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpScriptTransformer/readable)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `RtcRtpScriptTransformer`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn readable(this: &RtcRtpScriptTransformer) -> ReadableStream;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "WritableStream")]
# [wasm_bindgen (structural , method , getter , js_class = "RTCRtpScriptTransformer" , js_name = writable)]
#[doc = "Getter for the `writable` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpScriptTransformer/writable)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpScriptTransformer`, `WritableStream`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn writable(this: &RtcRtpScriptTransformer) -> WritableStream;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "RTCRtpScriptTransformer" , js_name = onkeyframerequest)]
#[doc = "Getter for the `onkeyframerequest` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpScriptTransformer/onkeyframerequest)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpScriptTransformer`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn onkeyframerequest(this: &RtcRtpScriptTransformer) -> Option<::js_sys::Function>;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "RTCRtpScriptTransformer" , js_name = onkeyframerequest)]
#[doc = "Setter for the `onkeyframerequest` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpScriptTransformer/onkeyframerequest)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpScriptTransformer`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_onkeyframerequest(
this: &RtcRtpScriptTransformer,
value: Option<&::js_sys::Function>,
);
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "RTCRtpScriptTransformer" , js_name = options)]
#[doc = "Getter for the `options` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpScriptTransformer/options)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpScriptTransformer`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn options(this: &RtcRtpScriptTransformer) -> ::wasm_bindgen::JsValue;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (method , structural , js_class = "RTCRtpScriptTransformer" , js_name = generateKeyFrame)]
#[doc = "The `generateKeyFrame()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpScriptTransformer/generateKeyFrame)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpScriptTransformer`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn generate_key_frame(this: &RtcRtpScriptTransformer) -> ::js_sys::Promise;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (method , structural , js_class = "RTCRtpScriptTransformer" , js_name = generateKeyFrame)]
#[doc = "The `generateKeyFrame()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpScriptTransformer/generateKeyFrame)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpScriptTransformer`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn generate_key_frame_with_rid(
this: &RtcRtpScriptTransformer,
rid: &str,
) -> ::js_sys::Promise;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (method , structural , js_class = "RTCRtpScriptTransformer" , js_name = sendKeyFrameRequest)]
#[doc = "The `sendKeyFrameRequest()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpScriptTransformer/sendKeyFrameRequest)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpScriptTransformer`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn send_key_frame_request(this: &RtcRtpScriptTransformer) -> ::js_sys::Promise;
}

View File

@ -28,6 +28,53 @@ extern "C" {
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpSender`, `RtcdtmfSender`*"]
pub fn dtmf(this: &RtcRtpSender) -> Option<RtcdtmfSender>;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "RTCRtpSender" , js_name = transform)]
#[doc = "Getter for the `transform` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSender/transform)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpSender`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn transform(this: &RtcRtpSender) -> Option<::js_sys::Object>;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "RTCRtpSender" , js_name = transform)]
#[doc = "Setter for the `transform` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSender/transform)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpSender`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_transform(this: &RtcRtpSender, value: Option<&::js_sys::Object>);
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (method , structural , js_class = "RTCRtpSender" , js_name = generateKeyFrame)]
#[doc = "The `generateKeyFrame()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSender/generateKeyFrame)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpSender`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn generate_key_frame(this: &RtcRtpSender) -> ::js_sys::Promise;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (method , structural , js_class = "RTCRtpSender" , js_name = generateKeyFrame)]
#[doc = "The `generateKeyFrame()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSender/generateKeyFrame)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpSender`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn generate_key_frame_with_rids(
this: &RtcRtpSender,
rids: &::wasm_bindgen::JsValue,
) -> ::js_sys::Promise;
#[cfg(feature = "RtcRtpCapabilities")]
# [wasm_bindgen (static_method_of = RtcRtpSender , js_class = "RTCRtpSender" , js_name = getCapabilities)]
#[doc = "The `getCapabilities()` method."]

View File

@ -0,0 +1,31 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = RTCTransformEvent , typescript_type = "RTCTransformEvent")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `RtcTransformEvent` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransformEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcTransformEvent`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type RtcTransformEvent;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "RtcRtpScriptTransformer")]
# [wasm_bindgen (structural , method , getter , js_class = "RTCTransformEvent" , js_name = transformer)]
#[doc = "Getter for the `transformer` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/RTCTransformEvent/transformer)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `RtcRtpScriptTransformer`, `RtcTransformEvent`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn transformer(this: &RtcTransformEvent) -> RtcRtpScriptTransformer;
}

View File

@ -0,0 +1,132 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = SFrameTransform , typescript_type = "SFrameTransform")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `SFrameTransform` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransform)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransform`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type SFrameTransform;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "SFrameTransform" , js_name = onerror)]
#[doc = "Getter for the `onerror` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransform/onerror)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransform`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn onerror(this: &SFrameTransform) -> Option<::js_sys::Function>;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , setter , js_class = "SFrameTransform" , js_name = onerror)]
#[doc = "Setter for the `onerror` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransform/onerror)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransform`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_onerror(this: &SFrameTransform, value: Option<&::js_sys::Function>);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "ReadableStream")]
# [wasm_bindgen (structural , method , getter , js_class = "SFrameTransform" , js_name = readable)]
#[doc = "Getter for the `readable` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransform/readable)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `ReadableStream`, `SFrameTransform`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn readable(this: &SFrameTransform) -> ReadableStream;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "WritableStream")]
# [wasm_bindgen (structural , method , getter , js_class = "SFrameTransform" , js_name = writable)]
#[doc = "Getter for the `writable` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransform/writable)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransform`, `WritableStream`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn writable(this: &SFrameTransform) -> WritableStream;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen(catch, constructor, js_class = "SFrameTransform")]
#[doc = "The `new SFrameTransform(..)` constructor, creating a new instance of `SFrameTransform`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransform/SFrameTransform)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransform`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new() -> Result<SFrameTransform, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "SFrameTransformOptions")]
#[wasm_bindgen(catch, constructor, js_class = "SFrameTransform")]
#[doc = "The `new SFrameTransform(..)` constructor, creating a new instance of `SFrameTransform`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransform/SFrameTransform)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransform`, `SFrameTransformOptions`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new_with_options(options: &SFrameTransformOptions) -> Result<SFrameTransform, JsValue>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "CryptoKey")]
# [wasm_bindgen (method , structural , js_class = "SFrameTransform" , js_name = setEncryptionKey)]
#[doc = "The `setEncryptionKey()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransform/setEncryptionKey)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `SFrameTransform`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_encryption_key(this: &SFrameTransform, key: &CryptoKey) -> ::js_sys::Promise;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "CryptoKey")]
# [wasm_bindgen (method , structural , js_class = "SFrameTransform" , js_name = setEncryptionKey)]
#[doc = "The `setEncryptionKey()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransform/setEncryptionKey)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `SFrameTransform`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_encryption_key_with_u32(
this: &SFrameTransform,
key: &CryptoKey,
key_id: u32,
) -> ::js_sys::Promise;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "CryptoKey")]
# [wasm_bindgen (method , structural , js_class = "SFrameTransform" , js_name = setEncryptionKey)]
#[doc = "The `setEncryptionKey()` method."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransform/setEncryptionKey)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `CryptoKey`, `SFrameTransform`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn set_encryption_key_with_f64(
this: &SFrameTransform,
key: &CryptoKey,
key_id: f64,
) -> ::js_sys::Promise;
}

View File

@ -0,0 +1,68 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = Event , extends = :: js_sys :: Object , js_name = SFrameTransformErrorEvent , typescript_type = "SFrameTransformErrorEvent")]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `SFrameTransformErrorEvent` class."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransformErrorEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEvent`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type SFrameTransformErrorEvent;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "SFrameTransformErrorEventType")]
# [wasm_bindgen (structural , method , getter , js_class = "SFrameTransformErrorEvent" , js_name = errorType)]
#[doc = "Getter for the `errorType` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransformErrorEvent/errorType)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEvent`, `SFrameTransformErrorEventType`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn error_type(this: &SFrameTransformErrorEvent) -> SFrameTransformErrorEventType;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "SFrameTransformErrorEvent" , js_name = keyID)]
#[doc = "Getter for the `keyID` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransformErrorEvent/keyID)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEvent`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn key_id(this: &SFrameTransformErrorEvent) -> ::wasm_bindgen::JsValue;
#[cfg(web_sys_unstable_apis)]
# [wasm_bindgen (structural , method , getter , js_class = "SFrameTransformErrorEvent" , js_name = frame)]
#[doc = "Getter for the `frame` field of this object."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransformErrorEvent/frame)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEvent`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn frame(this: &SFrameTransformErrorEvent) -> ::wasm_bindgen::JsValue;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "SFrameTransformErrorEventInit")]
#[wasm_bindgen(catch, constructor, js_class = "SFrameTransformErrorEvent")]
#[doc = "The `new SFrameTransformErrorEvent(..)` constructor, creating a new instance of `SFrameTransformErrorEvent`."]
#[doc = ""]
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SFrameTransformErrorEvent/SFrameTransformErrorEvent)"]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEvent`, `SFrameTransformErrorEventInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new(
type_: &str,
event_init_dict: &SFrameTransformErrorEventInit,
) -> Result<SFrameTransformErrorEvent, JsValue>;
}

View File

@ -0,0 +1,181 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = SFrameTransformErrorEventInit)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `SFrameTransformErrorEventInit` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type SFrameTransformErrorEventInit;
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `bubbles` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "bubbles")]
pub fn get_bubbles(this: &SFrameTransformErrorEventInit) -> Option<bool>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `bubbles` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "bubbles")]
pub fn set_bubbles(this: &SFrameTransformErrorEventInit, val: bool);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `cancelable` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "cancelable")]
pub fn get_cancelable(this: &SFrameTransformErrorEventInit) -> Option<bool>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `cancelable` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "cancelable")]
pub fn set_cancelable(this: &SFrameTransformErrorEventInit, val: bool);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `composed` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "composed")]
pub fn get_composed(this: &SFrameTransformErrorEventInit) -> Option<bool>;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `composed` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "composed")]
pub fn set_composed(this: &SFrameTransformErrorEventInit, val: bool);
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "SFrameTransformErrorEventType")]
#[doc = "Get the `errorType` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventInit`, `SFrameTransformErrorEventType`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "errorType")]
pub fn get_error_type(this: &SFrameTransformErrorEventInit) -> SFrameTransformErrorEventType;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "SFrameTransformErrorEventType")]
#[doc = "Change the `errorType` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventInit`, `SFrameTransformErrorEventType`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "errorType")]
pub fn set_error_type(this: &SFrameTransformErrorEventInit, val: SFrameTransformErrorEventType);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `frame` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "frame")]
pub fn get_frame(this: &SFrameTransformErrorEventInit) -> ::wasm_bindgen::JsValue;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `frame` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "frame")]
pub fn set_frame(this: &SFrameTransformErrorEventInit, val: &::wasm_bindgen::JsValue);
#[cfg(web_sys_unstable_apis)]
#[doc = "Get the `keyID` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "keyID")]
pub fn get_key_id(this: &SFrameTransformErrorEventInit) -> ::wasm_bindgen::JsValue;
#[cfg(web_sys_unstable_apis)]
#[doc = "Change the `keyID` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventInit`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "keyID")]
pub fn set_key_id(this: &SFrameTransformErrorEventInit, val: &::wasm_bindgen::JsValue);
}
#[cfg(web_sys_unstable_apis)]
impl SFrameTransformErrorEventInit {
#[cfg(feature = "SFrameTransformErrorEventType")]
#[doc = "Construct a new `SFrameTransformErrorEventInit`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventInit`, `SFrameTransformErrorEventType`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new(error_type: SFrameTransformErrorEventType, frame: &::wasm_bindgen::JsValue) -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret.error_type(error_type);
ret.frame(frame);
ret
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_bubbles()` instead."]
pub fn bubbles(&mut self, val: bool) -> &mut Self {
self.set_bubbles(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_cancelable()` instead."]
pub fn cancelable(&mut self, val: bool) -> &mut Self {
self.set_cancelable(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_composed()` instead."]
pub fn composed(&mut self, val: bool) -> &mut Self {
self.set_composed(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "SFrameTransformErrorEventType")]
#[deprecated = "Use `set_error_type()` instead."]
pub fn error_type(&mut self, val: SFrameTransformErrorEventType) -> &mut Self {
self.set_error_type(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_frame()` instead."]
pub fn frame(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
self.set_frame(val);
self
}
#[cfg(web_sys_unstable_apis)]
#[deprecated = "Use `set_key_id()` instead."]
pub fn key_id(&mut self, val: Option<&::wasm_bindgen::JsValue>) -> &mut Self {
self.set_key_id(val.unwrap_or(&::wasm_bindgen::JsValue::NULL));
self
}
}

View File

@ -0,0 +1,17 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
#[doc = "The `SFrameTransformErrorEventType` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformErrorEventType`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum SFrameTransformErrorEventType {
Authentication = "authentication",
KeyId = "keyID",
Syntax = "syntax",
}

View File

@ -0,0 +1,64 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use super::*;
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
extern "C" {
# [wasm_bindgen (extends = :: js_sys :: Object , js_name = SFrameTransformOptions)]
#[derive(Debug, Clone, PartialEq, Eq)]
#[doc = "The `SFrameTransformOptions` dictionary."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformOptions`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub type SFrameTransformOptions;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "SFrameTransformRole")]
#[doc = "Get the `role` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformOptions`, `SFrameTransformRole`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, getter = "role")]
pub fn get_role(this: &SFrameTransformOptions) -> Option<SFrameTransformRole>;
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "SFrameTransformRole")]
#[doc = "Change the `role` field of this object."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformOptions`, `SFrameTransformRole`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[wasm_bindgen(method, setter = "role")]
pub fn set_role(this: &SFrameTransformOptions, val: SFrameTransformRole);
}
#[cfg(web_sys_unstable_apis)]
impl SFrameTransformOptions {
#[doc = "Construct a new `SFrameTransformOptions`."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformOptions`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
pub fn new() -> Self {
#[allow(unused_mut)]
let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
ret
}
#[cfg(web_sys_unstable_apis)]
#[cfg(feature = "SFrameTransformRole")]
#[deprecated = "Use `set_role()` instead."]
pub fn role(&mut self, val: SFrameTransformRole) -> &mut Self {
self.set_role(val);
self
}
}
#[cfg(web_sys_unstable_apis)]
impl Default for SFrameTransformOptions {
fn default() -> Self {
Self::new()
}
}

View File

@ -0,0 +1,16 @@
#![allow(unused_imports)]
#![allow(clippy::all)]
use wasm_bindgen::prelude::*;
#[cfg(web_sys_unstable_apis)]
#[wasm_bindgen]
#[doc = "The `SFrameTransformRole` enum."]
#[doc = ""]
#[doc = "*This API requires the following crate features to be activated: `SFrameTransformRole`*"]
#[doc = ""]
#[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
#[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum SFrameTransformRole {
Encrypt = "encrypt",
Decrypt = "decrypt",
}

View File

@ -5122,6 +5122,13 @@ mod gen_KeyEvent;
#[allow(unused_imports)]
pub use gen_KeyEvent::*;
#[cfg(feature = "KeyFrameRequestEvent")]
#[allow(non_snake_case)]
mod gen_KeyFrameRequestEvent;
#[cfg(feature = "KeyFrameRequestEvent")]
#[allow(unused_imports)]
pub use gen_KeyFrameRequestEvent::*;
#[cfg(feature = "KeyIdsInitData")]
#[allow(non_snake_case)]
mod gen_KeyIdsInitData;
@ -7544,6 +7551,55 @@ mod gen_RtcDegradationPreference;
#[allow(unused_imports)]
pub use gen_RtcDegradationPreference::*;
#[cfg(feature = "RtcEncodedAudioFrame")]
#[allow(non_snake_case)]
mod gen_RtcEncodedAudioFrame;
#[cfg(feature = "RtcEncodedAudioFrame")]
#[allow(unused_imports)]
pub use gen_RtcEncodedAudioFrame::*;
#[cfg(feature = "RtcEncodedAudioFrameMetadata")]
#[allow(non_snake_case)]
mod gen_RtcEncodedAudioFrameMetadata;
#[cfg(feature = "RtcEncodedAudioFrameMetadata")]
#[allow(unused_imports)]
pub use gen_RtcEncodedAudioFrameMetadata::*;
#[cfg(feature = "RtcEncodedAudioFrameOptions")]
#[allow(non_snake_case)]
mod gen_RtcEncodedAudioFrameOptions;
#[cfg(feature = "RtcEncodedAudioFrameOptions")]
#[allow(unused_imports)]
pub use gen_RtcEncodedAudioFrameOptions::*;
#[cfg(feature = "RtcEncodedVideoFrame")]
#[allow(non_snake_case)]
mod gen_RtcEncodedVideoFrame;
#[cfg(feature = "RtcEncodedVideoFrame")]
#[allow(unused_imports)]
pub use gen_RtcEncodedVideoFrame::*;
#[cfg(feature = "RtcEncodedVideoFrameMetadata")]
#[allow(non_snake_case)]
mod gen_RtcEncodedVideoFrameMetadata;
#[cfg(feature = "RtcEncodedVideoFrameMetadata")]
#[allow(unused_imports)]
pub use gen_RtcEncodedVideoFrameMetadata::*;
#[cfg(feature = "RtcEncodedVideoFrameOptions")]
#[allow(non_snake_case)]
mod gen_RtcEncodedVideoFrameOptions;
#[cfg(feature = "RtcEncodedVideoFrameOptions")]
#[allow(unused_imports)]
pub use gen_RtcEncodedVideoFrameOptions::*;
#[cfg(feature = "RtcEncodedVideoFrameType")]
#[allow(non_snake_case)]
mod gen_RtcEncodedVideoFrameType;
#[cfg(feature = "RtcEncodedVideoFrameType")]
#[allow(unused_imports)]
pub use gen_RtcEncodedVideoFrameType::*;
#[cfg(feature = "RtcFecParameters")]
#[allow(non_snake_case)]
mod gen_RtcFecParameters;
@ -7824,6 +7880,20 @@ mod gen_RtcRtpReceiver;
#[allow(unused_imports)]
pub use gen_RtcRtpReceiver::*;
#[cfg(feature = "RtcRtpScriptTransform")]
#[allow(non_snake_case)]
mod gen_RtcRtpScriptTransform;
#[cfg(feature = "RtcRtpScriptTransform")]
#[allow(unused_imports)]
pub use gen_RtcRtpScriptTransform::*;
#[cfg(feature = "RtcRtpScriptTransformer")]
#[allow(non_snake_case)]
mod gen_RtcRtpScriptTransformer;
#[cfg(feature = "RtcRtpScriptTransformer")]
#[allow(unused_imports)]
pub use gen_RtcRtpScriptTransformer::*;
#[cfg(feature = "RtcRtpSender")]
#[allow(non_snake_case)]
mod gen_RtcRtpSender;
@ -7964,6 +8034,13 @@ mod gen_RtcTrackEventInit;
#[allow(unused_imports)]
pub use gen_RtcTrackEventInit::*;
#[cfg(feature = "RtcTransformEvent")]
#[allow(non_snake_case)]
mod gen_RtcTransformEvent;
#[cfg(feature = "RtcTransformEvent")]
#[allow(unused_imports)]
pub use gen_RtcTransformEvent::*;
#[cfg(feature = "RtcTransportStats")]
#[allow(non_snake_case)]
mod gen_RtcTransportStats;
@ -8006,6 +8083,48 @@ mod gen_RtcrtpStreamStats;
#[allow(unused_imports)]
pub use gen_RtcrtpStreamStats::*;
#[cfg(feature = "SFrameTransform")]
#[allow(non_snake_case)]
mod gen_SFrameTransform;
#[cfg(feature = "SFrameTransform")]
#[allow(unused_imports)]
pub use gen_SFrameTransform::*;
#[cfg(feature = "SFrameTransformErrorEvent")]
#[allow(non_snake_case)]
mod gen_SFrameTransformErrorEvent;
#[cfg(feature = "SFrameTransformErrorEvent")]
#[allow(unused_imports)]
pub use gen_SFrameTransformErrorEvent::*;
#[cfg(feature = "SFrameTransformErrorEventInit")]
#[allow(non_snake_case)]
mod gen_SFrameTransformErrorEventInit;
#[cfg(feature = "SFrameTransformErrorEventInit")]
#[allow(unused_imports)]
pub use gen_SFrameTransformErrorEventInit::*;
#[cfg(feature = "SFrameTransformErrorEventType")]
#[allow(non_snake_case)]
mod gen_SFrameTransformErrorEventType;
#[cfg(feature = "SFrameTransformErrorEventType")]
#[allow(unused_imports)]
pub use gen_SFrameTransformErrorEventType::*;
#[cfg(feature = "SFrameTransformOptions")]
#[allow(non_snake_case)]
mod gen_SFrameTransformOptions;
#[cfg(feature = "SFrameTransformOptions")]
#[allow(unused_imports)]
pub use gen_SFrameTransformOptions::*;
#[cfg(feature = "SFrameTransformRole")]
#[allow(non_snake_case)]
mod gen_SFrameTransformRole;
#[cfg(feature = "SFrameTransformRole")]
#[allow(unused_imports)]
pub use gen_SFrameTransformRole::*;
#[cfg(feature = "SaveFilePickerOptions")]
#[allow(non_snake_case)]
mod gen_SaveFilePickerOptions;

View File

@ -0,0 +1,154 @@
/* -*- 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://www.w3.org/TR/webrtc-encoded-transform/#idl-index
*/
typedef (SFrameTransform or RTCRtpScriptTransform) RTCRtpTransform;
// New methods for RTCRtpSender and RTCRtpReceiver
partial interface RTCRtpSender {
attribute RTCRtpTransform? transform;
};
partial interface RTCRtpReceiver {
attribute RTCRtpTransform? transform;
};
enum SFrameTransformRole {
"encrypt",
"decrypt"
};
dictionary SFrameTransformOptions {
SFrameTransformRole role = "encrypt";
};
typedef [EnforceRange] unsigned long long SmallCryptoKeyID;
typedef (SmallCryptoKeyID or bigint) CryptoKeyID;
[Exposed=(Window,DedicatedWorker)]
interface SFrameTransform : EventTarget {
constructor(optional SFrameTransformOptions options = {});
Promise<undefined> setEncryptionKey(CryptoKey key, optional CryptoKeyID keyID);
attribute EventHandler onerror;
};
SFrameTransform includes GenericTransformStream;
enum SFrameTransformErrorEventType {
"authentication",
"keyID",
"syntax"
};
[Exposed=(Window,DedicatedWorker)]
interface SFrameTransformErrorEvent : Event {
constructor(DOMString type, SFrameTransformErrorEventInit eventInitDict);
readonly attribute SFrameTransformErrorEventType errorType;
readonly attribute CryptoKeyID? keyID;
readonly attribute any frame;
};
dictionary SFrameTransformErrorEventInit : EventInit {
required SFrameTransformErrorEventType errorType;
required any frame;
CryptoKeyID? keyID;
};
// New enum for video frame types. Will eventually re-use the equivalent defined
// by WebCodecs.
enum RTCEncodedVideoFrameType {
"empty",
"key",
"delta",
};
dictionary RTCEncodedVideoFrameMetadata {
unsigned long long frameId;
sequence<unsigned long long> dependencies;
unsigned short width;
unsigned short height;
unsigned long spatialIndex;
unsigned long temporalIndex;
unsigned long synchronizationSource;
octet payloadType;
sequence<unsigned long> contributingSources;
long long timestamp; // microseconds
unsigned long rtpTimestamp;
DOMString mimeType;
};
dictionary RTCEncodedVideoFrameOptions {
RTCEncodedVideoFrameMetadata metadata;
};
// New interfaces to define encoded video and audio frames. Will eventually
// re-use or extend the equivalent defined in WebCodecs.
[Exposed=(Window,DedicatedWorker), Serializable]
interface RTCEncodedVideoFrame {
constructor(RTCEncodedVideoFrame originalFrame, optional RTCEncodedVideoFrameOptions options = {});
readonly attribute RTCEncodedVideoFrameType type;
attribute ArrayBuffer data;
RTCEncodedVideoFrameMetadata getMetadata();
};
dictionary RTCEncodedAudioFrameMetadata {
unsigned long synchronizationSource;
octet payloadType;
sequence<unsigned long> contributingSources;
short sequenceNumber;
unsigned long rtpTimestamp;
DOMString mimeType;
};
dictionary RTCEncodedAudioFrameOptions {
RTCEncodedAudioFrameMetadata metadata;
};
[Exposed=(Window,DedicatedWorker), Serializable]
interface RTCEncodedAudioFrame {
constructor(RTCEncodedAudioFrame originalFrame, optional RTCEncodedAudioFrameOptions options = {});
attribute ArrayBuffer data;
RTCEncodedAudioFrameMetadata getMetadata();
};
[Exposed=DedicatedWorker]
interface RTCTransformEvent : Event {
readonly attribute RTCRtpScriptTransformer transformer;
};
partial interface DedicatedWorkerGlobalScope {
attribute EventHandler onrtctransform;
};
[Exposed=DedicatedWorker]
interface RTCRtpScriptTransformer : EventTarget {
// Attributes and methods related to the transformer source
readonly attribute ReadableStream readable;
Promise<unsigned long long> generateKeyFrame(optional DOMString rid);
Promise<undefined> sendKeyFrameRequest();
// Attributes and methods related to the transformer sink
readonly attribute WritableStream writable;
attribute EventHandler onkeyframerequest;
// Attributes for configuring the Javascript code
readonly attribute any options;
};
[Exposed=Window]
interface RTCRtpScriptTransform {
constructor(Worker worker, optional any options, optional sequence<object> transfer);
};
[Exposed=DedicatedWorker]
interface KeyFrameRequestEvent : Event {
constructor(DOMString type, optional DOMString rid);
readonly attribute DOMString? rid;
};
partial interface RTCRtpSender {
Promise<undefined> generateKeyFrame(optional sequence <DOMString> rids);
};