Skip to main content

web_sys/features/
gen_RtcEncodedAudioFrameMetadata.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = RTCEncodedAudioFrameMetadata)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `RtcEncodedAudioFrameMetadata` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
13    #[doc = ""]
14    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
16    pub type RtcEncodedAudioFrameMetadata;
17    #[cfg(web_sys_unstable_apis)]
18    #[doc = "Get the `contributingSources` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
21    #[doc = ""]
22    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
23    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
24    #[wasm_bindgen(method, getter = "contributingSources")]
25    pub fn get_contributing_sources(
26        this: &RtcEncodedAudioFrameMetadata,
27    ) -> Option<::js_sys::Array<::js_sys::Number>>;
28    #[cfg(web_sys_unstable_apis)]
29    #[doc = "Change the `contributingSources` field of this object."]
30    #[doc = ""]
31    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
32    #[doc = ""]
33    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
34    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
35    #[wasm_bindgen(method, setter = "contributingSources")]
36    pub fn set_contributing_sources(this: &RtcEncodedAudioFrameMetadata, val: &[::js_sys::Number]);
37    #[cfg(web_sys_unstable_apis)]
38    #[doc = "Get the `mimeType` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
41    #[doc = ""]
42    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
43    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
44    #[wasm_bindgen(method, getter = "mimeType")]
45    pub fn get_mime_type(this: &RtcEncodedAudioFrameMetadata) -> Option<::alloc::string::String>;
46    #[cfg(web_sys_unstable_apis)]
47    #[doc = "Change the `mimeType` field of this object."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
50    #[doc = ""]
51    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
53    #[wasm_bindgen(method, setter = "mimeType")]
54    pub fn set_mime_type(this: &RtcEncodedAudioFrameMetadata, val: &str);
55    #[cfg(web_sys_unstable_apis)]
56    #[doc = "Get the `payloadType` field of this object."]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
59    #[doc = ""]
60    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
62    #[wasm_bindgen(method, getter = "payloadType")]
63    pub fn get_payload_type(this: &RtcEncodedAudioFrameMetadata) -> Option<u8>;
64    #[cfg(web_sys_unstable_apis)]
65    #[doc = "Change the `payloadType` field of this object."]
66    #[doc = ""]
67    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
68    #[doc = ""]
69    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
70    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
71    #[wasm_bindgen(method, setter = "payloadType")]
72    pub fn set_payload_type(this: &RtcEncodedAudioFrameMetadata, val: u8);
73    #[cfg(web_sys_unstable_apis)]
74    #[doc = "Get the `rtpTimestamp` field of this object."]
75    #[doc = ""]
76    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
77    #[doc = ""]
78    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
79    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
80    #[wasm_bindgen(method, getter = "rtpTimestamp")]
81    pub fn get_rtp_timestamp(this: &RtcEncodedAudioFrameMetadata) -> Option<u32>;
82    #[cfg(web_sys_unstable_apis)]
83    #[doc = "Change the `rtpTimestamp` field of this object."]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
86    #[doc = ""]
87    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
88    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
89    #[wasm_bindgen(method, setter = "rtpTimestamp")]
90    pub fn set_rtp_timestamp(this: &RtcEncodedAudioFrameMetadata, val: u32);
91    #[cfg(web_sys_unstable_apis)]
92    #[doc = "Get the `sequenceNumber` field of this object."]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
95    #[doc = ""]
96    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
97    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
98    #[wasm_bindgen(method, getter = "sequenceNumber")]
99    pub fn get_sequence_number(this: &RtcEncodedAudioFrameMetadata) -> Option<i16>;
100    #[cfg(web_sys_unstable_apis)]
101    #[doc = "Change the `sequenceNumber` field of this object."]
102    #[doc = ""]
103    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
104    #[doc = ""]
105    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
106    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
107    #[wasm_bindgen(method, setter = "sequenceNumber")]
108    pub fn set_sequence_number(this: &RtcEncodedAudioFrameMetadata, val: i16);
109    #[cfg(web_sys_unstable_apis)]
110    #[doc = "Get the `synchronizationSource` field of this object."]
111    #[doc = ""]
112    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
113    #[doc = ""]
114    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
115    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
116    #[wasm_bindgen(method, getter = "synchronizationSource")]
117    pub fn get_synchronization_source(this: &RtcEncodedAudioFrameMetadata) -> Option<u32>;
118    #[cfg(web_sys_unstable_apis)]
119    #[doc = "Change the `synchronizationSource` field of this object."]
120    #[doc = ""]
121    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
122    #[doc = ""]
123    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
124    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
125    #[wasm_bindgen(method, setter = "synchronizationSource")]
126    pub fn set_synchronization_source(this: &RtcEncodedAudioFrameMetadata, val: u32);
127}
128#[cfg(web_sys_unstable_apis)]
129impl RtcEncodedAudioFrameMetadata {
130    #[doc = "Construct a new `RtcEncodedAudioFrameMetadata`."]
131    #[doc = ""]
132    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedAudioFrameMetadata`*"]
133    #[doc = ""]
134    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
135    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
136    pub fn new() -> Self {
137        #[allow(unused_mut)]
138        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
139        ret
140    }
141    #[cfg(web_sys_unstable_apis)]
142    #[deprecated = "Use `set_contributing_sources()` instead."]
143    pub fn contributing_sources(&mut self, val: &[::js_sys::Number]) -> &mut Self {
144        self.set_contributing_sources(val);
145        self
146    }
147    #[cfg(web_sys_unstable_apis)]
148    #[deprecated = "Use `set_mime_type()` instead."]
149    pub fn mime_type(&mut self, val: &str) -> &mut Self {
150        self.set_mime_type(val);
151        self
152    }
153    #[cfg(web_sys_unstable_apis)]
154    #[deprecated = "Use `set_payload_type()` instead."]
155    pub fn payload_type(&mut self, val: u8) -> &mut Self {
156        self.set_payload_type(val);
157        self
158    }
159    #[cfg(web_sys_unstable_apis)]
160    #[deprecated = "Use `set_rtp_timestamp()` instead."]
161    pub fn rtp_timestamp(&mut self, val: u32) -> &mut Self {
162        self.set_rtp_timestamp(val);
163        self
164    }
165    #[cfg(web_sys_unstable_apis)]
166    #[deprecated = "Use `set_sequence_number()` instead."]
167    pub fn sequence_number(&mut self, val: i16) -> &mut Self {
168        self.set_sequence_number(val);
169        self
170    }
171    #[cfg(web_sys_unstable_apis)]
172    #[deprecated = "Use `set_synchronization_source()` instead."]
173    pub fn synchronization_source(&mut self, val: u32) -> &mut Self {
174        self.set_synchronization_source(val);
175        self
176    }
177}
178#[cfg(web_sys_unstable_apis)]
179impl Default for RtcEncodedAudioFrameMetadata {
180    fn default() -> Self {
181        Self::new()
182    }
183}