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