web_sys/features/
gen_VideoConfiguration.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = VideoConfiguration)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `VideoConfiguration` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"]
12 pub type VideoConfiguration;
13 #[doc = "Get the `bitrate` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"]
16 #[wasm_bindgen(method, getter = "bitrate")]
17 pub fn get_bitrate(this: &VideoConfiguration) -> Option<f64>;
18 #[doc = "Change the `bitrate` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"]
21 #[wasm_bindgen(method, setter = "bitrate")]
22 pub fn set_bitrate(this: &VideoConfiguration, val: f64);
23 #[doc = "Change the `bitrate` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"]
26 #[wasm_bindgen(method, setter = "bitrate")]
27 pub fn set_bitrate_u32(this: &VideoConfiguration, val: u32);
28 #[doc = "Change the `bitrate` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"]
31 #[wasm_bindgen(method, setter = "bitrate")]
32 pub fn set_bitrate_f64(this: &VideoConfiguration, val: f64);
33 #[doc = "Get the `contentType` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"]
36 #[wasm_bindgen(method, getter = "contentType")]
37 pub fn get_content_type(this: &VideoConfiguration) -> Option<::alloc::string::String>;
38 #[doc = "Change the `contentType` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"]
41 #[wasm_bindgen(method, setter = "contentType")]
42 pub fn set_content_type(this: &VideoConfiguration, val: &str);
43 #[doc = "Get the `framerate` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"]
46 #[wasm_bindgen(method, getter = "framerate")]
47 pub fn get_framerate(this: &VideoConfiguration) -> Option<::alloc::string::String>;
48 #[doc = "Change the `framerate` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"]
51 #[wasm_bindgen(method, setter = "framerate")]
52 pub fn set_framerate(this: &VideoConfiguration, val: &str);
53 #[doc = "Get the `height` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"]
56 #[wasm_bindgen(method, getter = "height")]
57 pub fn get_height(this: &VideoConfiguration) -> Option<u32>;
58 #[doc = "Change the `height` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"]
61 #[wasm_bindgen(method, setter = "height")]
62 pub fn set_height(this: &VideoConfiguration, val: u32);
63 #[doc = "Get the `width` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"]
66 #[wasm_bindgen(method, getter = "width")]
67 pub fn get_width(this: &VideoConfiguration) -> Option<u32>;
68 #[doc = "Change the `width` field of this object."]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"]
71 #[wasm_bindgen(method, setter = "width")]
72 pub fn set_width(this: &VideoConfiguration, val: u32);
73}
74impl VideoConfiguration {
75 #[doc = "Construct a new `VideoConfiguration`."]
76 #[doc = ""]
77 #[doc = "*This API requires the following crate features to be activated: `VideoConfiguration`*"]
78 pub fn new() -> Self {
79 #[allow(unused_mut)]
80 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
81 ret
82 }
83 #[deprecated = "Use `set_bitrate()` instead."]
84 pub fn bitrate(&mut self, val: f64) -> &mut Self {
85 self.set_bitrate(val);
86 self
87 }
88 #[deprecated = "Use `set_content_type()` instead."]
89 pub fn content_type(&mut self, val: &str) -> &mut Self {
90 self.set_content_type(val);
91 self
92 }
93 #[deprecated = "Use `set_framerate()` instead."]
94 pub fn framerate(&mut self, val: &str) -> &mut Self {
95 self.set_framerate(val);
96 self
97 }
98 #[deprecated = "Use `set_height()` instead."]
99 pub fn height(&mut self, val: u32) -> &mut Self {
100 self.set_height(val);
101 self
102 }
103 #[deprecated = "Use `set_width()` instead."]
104 pub fn width(&mut self, val: u32) -> &mut Self {
105 self.set_width(val);
106 self
107 }
108}
109impl Default for VideoConfiguration {
110 fn default() -> Self {
111 Self::new()
112 }
113}