web_sys/features/
gen_MediaTrackSettings.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 = MediaTrackSettings)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `MediaTrackSettings` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
12 pub type MediaTrackSettings;
13 #[doc = "Get the `autoGainControl` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
16 #[wasm_bindgen(method, getter = "autoGainControl")]
17 pub fn get_auto_gain_control(this: &MediaTrackSettings) -> Option<bool>;
18 #[doc = "Change the `autoGainControl` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
21 #[wasm_bindgen(method, setter = "autoGainControl")]
22 pub fn set_auto_gain_control(this: &MediaTrackSettings, val: bool);
23 #[doc = "Get the `channelCount` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
26 #[wasm_bindgen(method, getter = "channelCount")]
27 pub fn get_channel_count(this: &MediaTrackSettings) -> Option<i32>;
28 #[doc = "Change the `channelCount` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
31 #[wasm_bindgen(method, setter = "channelCount")]
32 pub fn set_channel_count(this: &MediaTrackSettings, val: i32);
33 #[doc = "Get the `deviceId` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
36 #[wasm_bindgen(method, getter = "deviceId")]
37 pub fn get_device_id(this: &MediaTrackSettings) -> Option<::alloc::string::String>;
38 #[doc = "Change the `deviceId` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
41 #[wasm_bindgen(method, setter = "deviceId")]
42 pub fn set_device_id(this: &MediaTrackSettings, val: &str);
43 #[doc = "Get the `echoCancellation` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
46 #[wasm_bindgen(method, getter = "echoCancellation")]
47 pub fn get_echo_cancellation(this: &MediaTrackSettings) -> Option<bool>;
48 #[doc = "Change the `echoCancellation` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
51 #[wasm_bindgen(method, setter = "echoCancellation")]
52 pub fn set_echo_cancellation(this: &MediaTrackSettings, val: bool);
53 #[doc = "Get the `facingMode` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
56 #[wasm_bindgen(method, getter = "facingMode")]
57 pub fn get_facing_mode(this: &MediaTrackSettings) -> Option<::alloc::string::String>;
58 #[doc = "Change the `facingMode` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
61 #[wasm_bindgen(method, setter = "facingMode")]
62 pub fn set_facing_mode(this: &MediaTrackSettings, val: &str);
63 #[doc = "Get the `frameRate` field of this object."]
64 #[doc = ""]
65 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
66 #[wasm_bindgen(method, getter = "frameRate")]
67 pub fn get_frame_rate(this: &MediaTrackSettings) -> Option<f64>;
68 #[doc = "Change the `frameRate` field of this object."]
69 #[doc = ""]
70 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
71 #[wasm_bindgen(method, setter = "frameRate")]
72 pub fn set_frame_rate(this: &MediaTrackSettings, val: f64);
73 #[doc = "Get the `height` field of this object."]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
76 #[wasm_bindgen(method, getter = "height")]
77 pub fn get_height(this: &MediaTrackSettings) -> Option<i32>;
78 #[doc = "Change the `height` field of this object."]
79 #[doc = ""]
80 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
81 #[wasm_bindgen(method, setter = "height")]
82 pub fn set_height(this: &MediaTrackSettings, val: i32);
83 #[doc = "Get the `noiseSuppression` field of this object."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
86 #[wasm_bindgen(method, getter = "noiseSuppression")]
87 pub fn get_noise_suppression(this: &MediaTrackSettings) -> Option<bool>;
88 #[doc = "Change the `noiseSuppression` field of this object."]
89 #[doc = ""]
90 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
91 #[wasm_bindgen(method, setter = "noiseSuppression")]
92 pub fn set_noise_suppression(this: &MediaTrackSettings, val: bool);
93 #[doc = "Get the `width` field of this object."]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
96 #[wasm_bindgen(method, getter = "width")]
97 pub fn get_width(this: &MediaTrackSettings) -> Option<i32>;
98 #[doc = "Change the `width` field of this object."]
99 #[doc = ""]
100 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
101 #[wasm_bindgen(method, setter = "width")]
102 pub fn set_width(this: &MediaTrackSettings, val: i32);
103}
104impl MediaTrackSettings {
105 #[doc = "Construct a new `MediaTrackSettings`."]
106 #[doc = ""]
107 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSettings`*"]
108 pub fn new() -> Self {
109 #[allow(unused_mut)]
110 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
111 ret
112 }
113 #[deprecated = "Use `set_auto_gain_control()` instead."]
114 pub fn auto_gain_control(&mut self, val: bool) -> &mut Self {
115 self.set_auto_gain_control(val);
116 self
117 }
118 #[deprecated = "Use `set_channel_count()` instead."]
119 pub fn channel_count(&mut self, val: i32) -> &mut Self {
120 self.set_channel_count(val);
121 self
122 }
123 #[deprecated = "Use `set_device_id()` instead."]
124 pub fn device_id(&mut self, val: &str) -> &mut Self {
125 self.set_device_id(val);
126 self
127 }
128 #[deprecated = "Use `set_echo_cancellation()` instead."]
129 pub fn echo_cancellation(&mut self, val: bool) -> &mut Self {
130 self.set_echo_cancellation(val);
131 self
132 }
133 #[deprecated = "Use `set_facing_mode()` instead."]
134 pub fn facing_mode(&mut self, val: &str) -> &mut Self {
135 self.set_facing_mode(val);
136 self
137 }
138 #[deprecated = "Use `set_frame_rate()` instead."]
139 pub fn frame_rate(&mut self, val: f64) -> &mut Self {
140 self.set_frame_rate(val);
141 self
142 }
143 #[deprecated = "Use `set_height()` instead."]
144 pub fn height(&mut self, val: i32) -> &mut Self {
145 self.set_height(val);
146 self
147 }
148 #[deprecated = "Use `set_noise_suppression()` instead."]
149 pub fn noise_suppression(&mut self, val: bool) -> &mut Self {
150 self.set_noise_suppression(val);
151 self
152 }
153 #[deprecated = "Use `set_width()` instead."]
154 pub fn width(&mut self, val: i32) -> &mut Self {
155 self.set_width(val);
156 self
157 }
158}
159impl Default for MediaTrackSettings {
160 fn default() -> Self {
161 Self::new()
162 }
163}