web_sys/features/
gen_RtcEncodedVideoFrameOptions.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 = RTCEncodedVideoFrameOptions)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `RtcEncodedVideoFrameOptions` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameOptions`*"]
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 RtcEncodedVideoFrameOptions;
17    #[cfg(web_sys_unstable_apis)]
18    #[cfg(feature = "RtcEncodedVideoFrameMetadata")]
19    #[doc = "Get the `metadata` field of this object."]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`, `RtcEncodedVideoFrameOptions`*"]
22    #[doc = ""]
23    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
24    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
25    #[wasm_bindgen(method, getter = "metadata")]
26    pub fn get_metadata(this: &RtcEncodedVideoFrameOptions)
27        -> Option<RtcEncodedVideoFrameMetadata>;
28    #[cfg(web_sys_unstable_apis)]
29    #[cfg(feature = "RtcEncodedVideoFrameMetadata")]
30    #[doc = "Change the `metadata` field of this object."]
31    #[doc = ""]
32    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameMetadata`, `RtcEncodedVideoFrameOptions`*"]
33    #[doc = ""]
34    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
35    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
36    #[wasm_bindgen(method, setter = "metadata")]
37    pub fn set_metadata(this: &RtcEncodedVideoFrameOptions, val: &RtcEncodedVideoFrameMetadata);
38}
39#[cfg(web_sys_unstable_apis)]
40impl RtcEncodedVideoFrameOptions {
41    #[doc = "Construct a new `RtcEncodedVideoFrameOptions`."]
42    #[doc = ""]
43    #[doc = "*This API requires the following crate features to be activated: `RtcEncodedVideoFrameOptions`*"]
44    #[doc = ""]
45    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
46    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
47    pub fn new() -> Self {
48        #[allow(unused_mut)]
49        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
50        ret
51    }
52    #[cfg(web_sys_unstable_apis)]
53    #[cfg(feature = "RtcEncodedVideoFrameMetadata")]
54    #[deprecated = "Use `set_metadata()` instead."]
55    pub fn metadata(&mut self, val: &RtcEncodedVideoFrameMetadata) -> &mut Self {
56        self.set_metadata(val);
57        self
58    }
59}
60#[cfg(web_sys_unstable_apis)]
61impl Default for RtcEncodedVideoFrameOptions {
62    fn default() -> Self {
63        Self::new()
64    }
65}