web_sys/features/
gen_EncodedVideoChunkMetadata.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 = EncodedVideoChunkMetadata)]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `EncodedVideoChunkMetadata` dictionary."]
11    #[doc = ""]
12    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"]
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 EncodedVideoChunkMetadata;
17    #[cfg(web_sys_unstable_apis)]
18    #[doc = "Get the `alphaSideData` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"]
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 = "alphaSideData")]
25    pub fn get_alpha_side_data(this: &EncodedVideoChunkMetadata) -> Option<::js_sys::Object>;
26    #[cfg(web_sys_unstable_apis)]
27    #[doc = "Change the `alphaSideData` field of this object."]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"]
30    #[doc = ""]
31    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
32    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
33    #[wasm_bindgen(method, setter = "alphaSideData")]
34    pub fn set_alpha_side_data(this: &EncodedVideoChunkMetadata, val: &::js_sys::Object);
35    #[cfg(web_sys_unstable_apis)]
36    #[cfg(feature = "VideoDecoderConfig")]
37    #[doc = "Get the `decoderConfig` field of this object."]
38    #[doc = ""]
39    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `VideoDecoderConfig`*"]
40    #[doc = ""]
41    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
42    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
43    #[wasm_bindgen(method, getter = "decoderConfig")]
44    pub fn get_decoder_config(this: &EncodedVideoChunkMetadata) -> Option<VideoDecoderConfig>;
45    #[cfg(web_sys_unstable_apis)]
46    #[cfg(feature = "VideoDecoderConfig")]
47    #[doc = "Change the `decoderConfig` field of this object."]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `VideoDecoderConfig`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
53    #[wasm_bindgen(method, setter = "decoderConfig")]
54    pub fn set_decoder_config(this: &EncodedVideoChunkMetadata, val: &VideoDecoderConfig);
55    #[cfg(web_sys_unstable_apis)]
56    #[cfg(feature = "SvcOutputMetadata")]
57    #[doc = "Get the `svc` field of this object."]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `SvcOutputMetadata`*"]
60    #[doc = ""]
61    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
63    #[wasm_bindgen(method, getter = "svc")]
64    pub fn get_svc(this: &EncodedVideoChunkMetadata) -> Option<SvcOutputMetadata>;
65    #[cfg(web_sys_unstable_apis)]
66    #[cfg(feature = "SvcOutputMetadata")]
67    #[doc = "Change the `svc` field of this object."]
68    #[doc = ""]
69    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `SvcOutputMetadata`*"]
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 = "svc")]
74    pub fn set_svc(this: &EncodedVideoChunkMetadata, val: &SvcOutputMetadata);
75}
76#[cfg(web_sys_unstable_apis)]
77impl EncodedVideoChunkMetadata {
78    #[doc = "Construct a new `EncodedVideoChunkMetadata`."]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"]
81    #[doc = ""]
82    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
83    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
84    pub fn new() -> Self {
85        #[allow(unused_mut)]
86        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
87        ret
88    }
89    #[cfg(web_sys_unstable_apis)]
90    #[deprecated = "Use `set_alpha_side_data()` instead."]
91    pub fn alpha_side_data(&mut self, val: &::js_sys::Object) -> &mut Self {
92        self.set_alpha_side_data(val);
93        self
94    }
95    #[cfg(web_sys_unstable_apis)]
96    #[cfg(feature = "VideoDecoderConfig")]
97    #[deprecated = "Use `set_decoder_config()` instead."]
98    pub fn decoder_config(&mut self, val: &VideoDecoderConfig) -> &mut Self {
99        self.set_decoder_config(val);
100        self
101    }
102    #[cfg(web_sys_unstable_apis)]
103    #[cfg(feature = "SvcOutputMetadata")]
104    #[deprecated = "Use `set_svc()` instead."]
105    pub fn svc(&mut self, val: &SvcOutputMetadata) -> &mut Self {
106        self.set_svc(val);
107        self
108    }
109}
110#[cfg(web_sys_unstable_apis)]
111impl Default for EncodedVideoChunkMetadata {
112    fn default() -> Self {
113        Self::new()
114    }
115}