Skip to main content

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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/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://wasm-bindgen.github.io/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    #[doc = "Change the `alphaSideData` field of this object."]
37    #[doc = ""]
38    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"]
39    #[doc = ""]
40    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
41    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
42    #[wasm_bindgen(method, setter = "alphaSideData")]
43    pub fn set_alpha_side_data_u8_slice(this: &EncodedVideoChunkMetadata, val: &mut [u8]);
44    #[cfg(web_sys_unstable_apis)]
45    #[doc = "Change the `alphaSideData` field of this object."]
46    #[doc = ""]
47    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"]
48    #[doc = ""]
49    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
50    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
51    #[wasm_bindgen(method, setter = "alphaSideData")]
52    pub fn set_alpha_side_data_u8_array(
53        this: &EncodedVideoChunkMetadata,
54        val: &::js_sys::Uint8Array,
55    );
56    #[cfg(web_sys_unstable_apis)]
57    #[cfg(feature = "VideoDecoderConfig")]
58    #[doc = "Get the `decoderConfig` field of this object."]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `VideoDecoderConfig`*"]
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, getter = "decoderConfig")]
65    pub fn get_decoder_config(this: &EncodedVideoChunkMetadata) -> Option<VideoDecoderConfig>;
66    #[cfg(web_sys_unstable_apis)]
67    #[cfg(feature = "VideoDecoderConfig")]
68    #[doc = "Change the `decoderConfig` field of this object."]
69    #[doc = ""]
70    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `VideoDecoderConfig`*"]
71    #[doc = ""]
72    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
73    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
74    #[wasm_bindgen(method, setter = "decoderConfig")]
75    pub fn set_decoder_config(this: &EncodedVideoChunkMetadata, val: &VideoDecoderConfig);
76    #[cfg(web_sys_unstable_apis)]
77    #[cfg(feature = "SvcOutputMetadata")]
78    #[doc = "Get the `svc` field of this object."]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `SvcOutputMetadata`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
84    #[wasm_bindgen(method, getter = "svc")]
85    pub fn get_svc(this: &EncodedVideoChunkMetadata) -> Option<SvcOutputMetadata>;
86    #[cfg(web_sys_unstable_apis)]
87    #[cfg(feature = "SvcOutputMetadata")]
88    #[doc = "Change the `svc` field of this object."]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`, `SvcOutputMetadata`*"]
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 = "svc")]
95    pub fn set_svc(this: &EncodedVideoChunkMetadata, val: &SvcOutputMetadata);
96}
97#[cfg(web_sys_unstable_apis)]
98impl EncodedVideoChunkMetadata {
99    #[doc = "Construct a new `EncodedVideoChunkMetadata`."]
100    #[doc = ""]
101    #[doc = "*This API requires the following crate features to be activated: `EncodedVideoChunkMetadata`*"]
102    #[doc = ""]
103    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
104    #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
105    pub fn new() -> Self {
106        #[allow(unused_mut)]
107        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
108        ret
109    }
110    #[cfg(web_sys_unstable_apis)]
111    #[deprecated = "Use `set_alpha_side_data()` instead."]
112    pub fn alpha_side_data(&mut self, val: &::js_sys::Object) -> &mut Self {
113        self.set_alpha_side_data(val);
114        self
115    }
116    #[cfg(web_sys_unstable_apis)]
117    #[cfg(feature = "VideoDecoderConfig")]
118    #[deprecated = "Use `set_decoder_config()` instead."]
119    pub fn decoder_config(&mut self, val: &VideoDecoderConfig) -> &mut Self {
120        self.set_decoder_config(val);
121        self
122    }
123    #[cfg(web_sys_unstable_apis)]
124    #[cfg(feature = "SvcOutputMetadata")]
125    #[deprecated = "Use `set_svc()` instead."]
126    pub fn svc(&mut self, val: &SvcOutputMetadata) -> &mut Self {
127        self.set_svc(val);
128        self
129    }
130}
131#[cfg(web_sys_unstable_apis)]
132impl Default for EncodedVideoChunkMetadata {
133    fn default() -> Self {
134        Self::new()
135    }
136}