Skip to main content

web_sys/features/
gen_RtcEncodedVideoFrameMetadata.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 = RTCEncodedVideoFrameMetadata)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `RtcEncodedVideoFrameMetadata` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
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 RtcEncodedVideoFrameMetadata;
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: `RtcEncodedVideoFrameMetadata`*"]
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: &RtcEncodedVideoFrameMetadata,
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: `RtcEncodedVideoFrameMetadata`*"]
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: &RtcEncodedVideoFrameMetadata, val: &[::js_sys::Number]);
37    #[cfg(web_sys_unstable_apis)]
38    #[doc = "Get the `dependencies` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
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 = "dependencies")]
45    pub fn get_dependencies(
46        this: &RtcEncodedVideoFrameMetadata,
47    ) -> Option<::js_sys::Array<::js_sys::Number>>;
48    #[cfg(web_sys_unstable_apis)]
49    #[doc = "Change the `dependencies` field of this object."]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
52    #[doc = ""]
53    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
55    #[wasm_bindgen(method, setter = "dependencies")]
56    pub fn set_dependencies(this: &RtcEncodedVideoFrameMetadata, val: &[::js_sys::Number]);
57    #[cfg(web_sys_unstable_apis)]
58    #[doc = "Change the `dependencies` field of this object."]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
61    #[doc = ""]
62    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
63    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
64    #[wasm_bindgen(method, setter = "dependencies")]
65    pub fn set_dependencies_f64_sequence(
66        this: &RtcEncodedVideoFrameMetadata,
67        val: &[::js_sys::Number],
68    );
69    #[cfg(web_sys_unstable_apis)]
70    #[doc = "Get the `frameId` field of this object."]
71    #[doc = ""]
72    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
73    #[doc = ""]
74    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
75    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
76    #[wasm_bindgen(method, getter = "frameId")]
77    pub fn get_frame_id(this: &RtcEncodedVideoFrameMetadata) -> Option<f64>;
78    #[cfg(web_sys_unstable_apis)]
79    #[doc = "Change the `frameId` field of this object."]
80    #[doc = ""]
81    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
82    #[doc = ""]
83    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
84    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
85    #[wasm_bindgen(method, setter = "frameId")]
86    pub fn set_frame_id(this: &RtcEncodedVideoFrameMetadata, val: u32);
87    #[cfg(web_sys_unstable_apis)]
88    #[doc = "Change the `frameId` field of this object."]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
91    #[doc = ""]
92    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
93    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
94    #[wasm_bindgen(method, setter = "frameId")]
95    pub fn set_frame_id_f64(this: &RtcEncodedVideoFrameMetadata, val: f64);
96    #[cfg(web_sys_unstable_apis)]
97    #[doc = "Get the `height` field of this object."]
98    #[doc = ""]
99    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
100    #[doc = ""]
101    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
102    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
103    #[wasm_bindgen(method, getter = "height")]
104    pub fn get_height(this: &RtcEncodedVideoFrameMetadata) -> Option<u16>;
105    #[cfg(web_sys_unstable_apis)]
106    #[doc = "Change the `height` field of this object."]
107    #[doc = ""]
108    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
109    #[doc = ""]
110    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
111    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
112    #[wasm_bindgen(method, setter = "height")]
113    pub fn set_height(this: &RtcEncodedVideoFrameMetadata, val: u16);
114    #[cfg(web_sys_unstable_apis)]
115    #[doc = "Get the `mimeType` field of this object."]
116    #[doc = ""]
117    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
118    #[doc = ""]
119    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
120    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
121    #[wasm_bindgen(method, getter = "mimeType")]
122    pub fn get_mime_type(this: &RtcEncodedVideoFrameMetadata) -> Option<::alloc::string::String>;
123    #[cfg(web_sys_unstable_apis)]
124    #[doc = "Change the `mimeType` field of this object."]
125    #[doc = ""]
126    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
127    #[doc = ""]
128    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
129    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
130    #[wasm_bindgen(method, setter = "mimeType")]
131    pub fn set_mime_type(this: &RtcEncodedVideoFrameMetadata, val: &str);
132    #[cfg(web_sys_unstable_apis)]
133    #[doc = "Get the `payloadType` field of this object."]
134    #[doc = ""]
135    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
136    #[doc = ""]
137    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
138    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
139    #[wasm_bindgen(method, getter = "payloadType")]
140    pub fn get_payload_type(this: &RtcEncodedVideoFrameMetadata) -> Option<u8>;
141    #[cfg(web_sys_unstable_apis)]
142    #[doc = "Change the `payloadType` field of this object."]
143    #[doc = ""]
144    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
145    #[doc = ""]
146    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
147    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
148    #[wasm_bindgen(method, setter = "payloadType")]
149    pub fn set_payload_type(this: &RtcEncodedVideoFrameMetadata, val: u8);
150    #[cfg(web_sys_unstable_apis)]
151    #[doc = "Get the `rtpTimestamp` field of this object."]
152    #[doc = ""]
153    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
154    #[doc = ""]
155    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
156    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
157    #[wasm_bindgen(method, getter = "rtpTimestamp")]
158    pub fn get_rtp_timestamp(this: &RtcEncodedVideoFrameMetadata) -> Option<u32>;
159    #[cfg(web_sys_unstable_apis)]
160    #[doc = "Change the `rtpTimestamp` field of this object."]
161    #[doc = ""]
162    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
163    #[doc = ""]
164    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
165    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
166    #[wasm_bindgen(method, setter = "rtpTimestamp")]
167    pub fn set_rtp_timestamp(this: &RtcEncodedVideoFrameMetadata, val: u32);
168    #[cfg(web_sys_unstable_apis)]
169    #[doc = "Get the `spatialIndex` field of this object."]
170    #[doc = ""]
171    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
172    #[doc = ""]
173    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
174    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
175    #[wasm_bindgen(method, getter = "spatialIndex")]
176    pub fn get_spatial_index(this: &RtcEncodedVideoFrameMetadata) -> Option<u32>;
177    #[cfg(web_sys_unstable_apis)]
178    #[doc = "Change the `spatialIndex` field of this object."]
179    #[doc = ""]
180    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
181    #[doc = ""]
182    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
183    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
184    #[wasm_bindgen(method, setter = "spatialIndex")]
185    pub fn set_spatial_index(this: &RtcEncodedVideoFrameMetadata, val: u32);
186    #[cfg(web_sys_unstable_apis)]
187    #[doc = "Get the `synchronizationSource` field of this object."]
188    #[doc = ""]
189    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
190    #[doc = ""]
191    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
192    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
193    #[wasm_bindgen(method, getter = "synchronizationSource")]
194    pub fn get_synchronization_source(this: &RtcEncodedVideoFrameMetadata) -> Option<u32>;
195    #[cfg(web_sys_unstable_apis)]
196    #[doc = "Change the `synchronizationSource` field of this object."]
197    #[doc = ""]
198    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
199    #[doc = ""]
200    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
201    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
202    #[wasm_bindgen(method, setter = "synchronizationSource")]
203    pub fn set_synchronization_source(this: &RtcEncodedVideoFrameMetadata, val: u32);
204    #[cfg(web_sys_unstable_apis)]
205    #[doc = "Get the `temporalIndex` field of this object."]
206    #[doc = ""]
207    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
208    #[doc = ""]
209    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
210    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
211    #[wasm_bindgen(method, getter = "temporalIndex")]
212    pub fn get_temporal_index(this: &RtcEncodedVideoFrameMetadata) -> Option<u32>;
213    #[cfg(web_sys_unstable_apis)]
214    #[doc = "Change the `temporalIndex` field of this object."]
215    #[doc = ""]
216    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
217    #[doc = ""]
218    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
219    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
220    #[wasm_bindgen(method, setter = "temporalIndex")]
221    pub fn set_temporal_index(this: &RtcEncodedVideoFrameMetadata, val: u32);
222    #[cfg(web_sys_unstable_apis)]
223    #[doc = "Get the `timestamp` field of this object."]
224    #[doc = ""]
225    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
226    #[doc = ""]
227    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
228    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
229    #[wasm_bindgen(method, getter = "timestamp")]
230    pub fn get_timestamp(this: &RtcEncodedVideoFrameMetadata) -> Option<f64>;
231    #[cfg(web_sys_unstable_apis)]
232    #[doc = "Change the `timestamp` field of this object."]
233    #[doc = ""]
234    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
235    #[doc = ""]
236    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
237    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
238    #[wasm_bindgen(method, setter = "timestamp")]
239    pub fn set_timestamp(this: &RtcEncodedVideoFrameMetadata, val: i32);
240    #[cfg(web_sys_unstable_apis)]
241    #[doc = "Change the `timestamp` field of this object."]
242    #[doc = ""]
243    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
244    #[doc = ""]
245    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
246    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
247    #[wasm_bindgen(method, setter = "timestamp")]
248    pub fn set_timestamp_f64(this: &RtcEncodedVideoFrameMetadata, val: f64);
249    #[cfg(web_sys_unstable_apis)]
250    #[doc = "Get the `width` field of this object."]
251    #[doc = ""]
252    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
253    #[doc = ""]
254    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
255    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
256    #[wasm_bindgen(method, getter = "width")]
257    pub fn get_width(this: &RtcEncodedVideoFrameMetadata) -> Option<u16>;
258    #[cfg(web_sys_unstable_apis)]
259    #[doc = "Change the `width` field of this object."]
260    #[doc = ""]
261    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
262    #[doc = ""]
263    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
264    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
265    #[wasm_bindgen(method, setter = "width")]
266    pub fn set_width(this: &RtcEncodedVideoFrameMetadata, val: u16);
267}
268#[cfg(web_sys_unstable_apis)]
269impl RtcEncodedVideoFrameMetadata {
270    #[doc = "Construct a new `RtcEncodedVideoFrameMetadata`."]
271    #[doc = ""]
272    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`*"]
273    #[doc = ""]
274    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
275    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
276    pub fn new() -> Self {
277        #[allow(unused_mut)]
278        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
279        ret
280    }
281    #[cfg(web_sys_unstable_apis)]
282    #[deprecated = "Use `set_contributing_sources()` instead."]
283    pub fn contributing_sources(&mut self, val: &[::js_sys::Number]) -> &mut Self {
284        self.set_contributing_sources(val);
285        self
286    }
287    #[cfg(web_sys_unstable_apis)]
288    #[deprecated = "Use `set_dependencies()` instead."]
289    pub fn dependencies(&mut self, val: &[::js_sys::Number]) -> &mut Self {
290        self.set_dependencies(val);
291        self
292    }
293    #[cfg(web_sys_unstable_apis)]
294    #[deprecated = "Use `set_frame_id()` instead."]
295    pub fn frame_id(&mut self, val: u32) -> &mut Self {
296        self.set_frame_id(val);
297        self
298    }
299    #[cfg(web_sys_unstable_apis)]
300    #[deprecated = "Use `set_height()` instead."]
301    pub fn height(&mut self, val: u16) -> &mut Self {
302        self.set_height(val);
303        self
304    }
305    #[cfg(web_sys_unstable_apis)]
306    #[deprecated = "Use `set_mime_type()` instead."]
307    pub fn mime_type(&mut self, val: &str) -> &mut Self {
308        self.set_mime_type(val);
309        self
310    }
311    #[cfg(web_sys_unstable_apis)]
312    #[deprecated = "Use `set_payload_type()` instead."]
313    pub fn payload_type(&mut self, val: u8) -> &mut Self {
314        self.set_payload_type(val);
315        self
316    }
317    #[cfg(web_sys_unstable_apis)]
318    #[deprecated = "Use `set_rtp_timestamp()` instead."]
319    pub fn rtp_timestamp(&mut self, val: u32) -> &mut Self {
320        self.set_rtp_timestamp(val);
321        self
322    }
323    #[cfg(web_sys_unstable_apis)]
324    #[deprecated = "Use `set_spatial_index()` instead."]
325    pub fn spatial_index(&mut self, val: u32) -> &mut Self {
326        self.set_spatial_index(val);
327        self
328    }
329    #[cfg(web_sys_unstable_apis)]
330    #[deprecated = "Use `set_synchronization_source()` instead."]
331    pub fn synchronization_source(&mut self, val: u32) -> &mut Self {
332        self.set_synchronization_source(val);
333        self
334    }
335    #[cfg(web_sys_unstable_apis)]
336    #[deprecated = "Use `set_temporal_index()` instead."]
337    pub fn temporal_index(&mut self, val: u32) -> &mut Self {
338        self.set_temporal_index(val);
339        self
340    }
341    #[cfg(web_sys_unstable_apis)]
342    #[deprecated = "Use `set_timestamp()` instead."]
343    pub fn timestamp(&mut self, val: i32) -> &mut Self {
344        self.set_timestamp(val);
345        self
346    }
347    #[cfg(web_sys_unstable_apis)]
348    #[deprecated = "Use `set_width()` instead."]
349    pub fn width(&mut self, val: u16) -> &mut Self {
350        self.set_width(val);
351        self
352    }
353}
354#[cfg(web_sys_unstable_apis)]
355impl Default for RtcEncodedVideoFrameMetadata {
356    fn default() -> Self {
357        Self::new()
358    }
359}