web_sys/features/
gen_VideoEncoderSupport.rs1#![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 = VideoEncoderSupport)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `VideoEncoderSupport` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderSupport`*"]
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 VideoEncoderSupport;
17 #[cfg(web_sys_unstable_apis)]
18 #[cfg(feature = "VideoEncoderConfig")]
19 #[doc = "Get the `config` field of this object."]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`, `VideoEncoderSupport`*"]
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 = "config")]
26 pub fn get_config(this: &VideoEncoderSupport) -> Option<VideoEncoderConfig>;
27 #[cfg(web_sys_unstable_apis)]
28 #[cfg(feature = "VideoEncoderConfig")]
29 #[doc = "Change the `config` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`, `VideoEncoderSupport`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
35 #[wasm_bindgen(method, setter = "config")]
36 pub fn set_config(this: &VideoEncoderSupport, val: &VideoEncoderConfig);
37 #[cfg(web_sys_unstable_apis)]
38 #[doc = "Get the `supported` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderSupport`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
44 #[wasm_bindgen(method, getter = "supported")]
45 pub fn get_supported(this: &VideoEncoderSupport) -> Option<bool>;
46 #[cfg(web_sys_unstable_apis)]
47 #[doc = "Change the `supported` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderSupport`*"]
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 = "supported")]
54 pub fn set_supported(this: &VideoEncoderSupport, val: bool);
55}
56#[cfg(web_sys_unstable_apis)]
57impl VideoEncoderSupport {
58 #[doc = "Construct a new `VideoEncoderSupport`."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderSupport`*"]
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 pub fn new() -> Self {
65 #[allow(unused_mut)]
66 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
67 ret
68 }
69 #[cfg(web_sys_unstable_apis)]
70 #[cfg(feature = "VideoEncoderConfig")]
71 #[deprecated = "Use `set_config()` instead."]
72 pub fn config(&mut self, val: &VideoEncoderConfig) -> &mut Self {
73 self.set_config(val);
74 self
75 }
76 #[cfg(web_sys_unstable_apis)]
77 #[deprecated = "Use `set_supported()` instead."]
78 pub fn supported(&mut self, val: bool) -> &mut Self {
79 self.set_supported(val);
80 self
81 }
82}
83#[cfg(web_sys_unstable_apis)]
84impl Default for VideoEncoderSupport {
85 fn default() -> Self {
86 Self::new()
87 }
88}