web_sys/features/
gen_MediaTrackSupportedConstraints.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "MediaTrackSupportedConstraints"
10 )]
11 #[derive(Debug, Clone, PartialEq, Eq)]
12 #[doc = "The `MediaTrackSupportedConstraints` dictionary."]
13 #[doc = ""]
14 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
15 pub type MediaTrackSupportedConstraints;
16 #[doc = "Get the `aspectRatio` field of this object."]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
19 #[wasm_bindgen(method, getter = "aspectRatio")]
20 pub fn get_aspect_ratio(this: &MediaTrackSupportedConstraints) -> Option<bool>;
21 #[doc = "Change the `aspectRatio` field of this object."]
22 #[doc = ""]
23 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
24 #[wasm_bindgen(method, setter = "aspectRatio")]
25 pub fn set_aspect_ratio(this: &MediaTrackSupportedConstraints, val: bool);
26 #[doc = "Get the `autoGainControl` field of this object."]
27 #[doc = ""]
28 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
29 #[wasm_bindgen(method, getter = "autoGainControl")]
30 pub fn get_auto_gain_control(this: &MediaTrackSupportedConstraints) -> Option<bool>;
31 #[doc = "Change the `autoGainControl` field of this object."]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
34 #[wasm_bindgen(method, setter = "autoGainControl")]
35 pub fn set_auto_gain_control(this: &MediaTrackSupportedConstraints, val: bool);
36 #[doc = "Get the `channelCount` field of this object."]
37 #[doc = ""]
38 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
39 #[wasm_bindgen(method, getter = "channelCount")]
40 pub fn get_channel_count(this: &MediaTrackSupportedConstraints) -> Option<bool>;
41 #[doc = "Change the `channelCount` field of this object."]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
44 #[wasm_bindgen(method, setter = "channelCount")]
45 pub fn set_channel_count(this: &MediaTrackSupportedConstraints, val: bool);
46 #[doc = "Get the `deviceId` field of this object."]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
49 #[wasm_bindgen(method, getter = "deviceId")]
50 pub fn get_device_id(this: &MediaTrackSupportedConstraints) -> Option<bool>;
51 #[doc = "Change the `deviceId` field of this object."]
52 #[doc = ""]
53 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
54 #[wasm_bindgen(method, setter = "deviceId")]
55 pub fn set_device_id(this: &MediaTrackSupportedConstraints, val: bool);
56 #[doc = "Get the `echoCancellation` field of this object."]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
59 #[wasm_bindgen(method, getter = "echoCancellation")]
60 pub fn get_echo_cancellation(this: &MediaTrackSupportedConstraints) -> Option<bool>;
61 #[doc = "Change the `echoCancellation` field of this object."]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
64 #[wasm_bindgen(method, setter = "echoCancellation")]
65 pub fn set_echo_cancellation(this: &MediaTrackSupportedConstraints, val: bool);
66 #[doc = "Get the `facingMode` field of this object."]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
69 #[wasm_bindgen(method, getter = "facingMode")]
70 pub fn get_facing_mode(this: &MediaTrackSupportedConstraints) -> Option<bool>;
71 #[doc = "Change the `facingMode` field of this object."]
72 #[doc = ""]
73 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
74 #[wasm_bindgen(method, setter = "facingMode")]
75 pub fn set_facing_mode(this: &MediaTrackSupportedConstraints, val: bool);
76 #[doc = "Get the `frameRate` field of this object."]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
79 #[wasm_bindgen(method, getter = "frameRate")]
80 pub fn get_frame_rate(this: &MediaTrackSupportedConstraints) -> Option<bool>;
81 #[doc = "Change the `frameRate` field of this object."]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
84 #[wasm_bindgen(method, setter = "frameRate")]
85 pub fn set_frame_rate(this: &MediaTrackSupportedConstraints, val: bool);
86 #[doc = "Get the `groupId` field of this object."]
87 #[doc = ""]
88 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
89 #[wasm_bindgen(method, getter = "groupId")]
90 pub fn get_group_id(this: &MediaTrackSupportedConstraints) -> Option<bool>;
91 #[doc = "Change the `groupId` field of this object."]
92 #[doc = ""]
93 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
94 #[wasm_bindgen(method, setter = "groupId")]
95 pub fn set_group_id(this: &MediaTrackSupportedConstraints, val: bool);
96 #[doc = "Get the `height` field of this object."]
97 #[doc = ""]
98 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
99 #[wasm_bindgen(method, getter = "height")]
100 pub fn get_height(this: &MediaTrackSupportedConstraints) -> Option<bool>;
101 #[doc = "Change the `height` field of this object."]
102 #[doc = ""]
103 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
104 #[wasm_bindgen(method, setter = "height")]
105 pub fn set_height(this: &MediaTrackSupportedConstraints, val: bool);
106 #[doc = "Get the `latency` field of this object."]
107 #[doc = ""]
108 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
109 #[wasm_bindgen(method, getter = "latency")]
110 pub fn get_latency(this: &MediaTrackSupportedConstraints) -> Option<bool>;
111 #[doc = "Change the `latency` field of this object."]
112 #[doc = ""]
113 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
114 #[wasm_bindgen(method, setter = "latency")]
115 pub fn set_latency(this: &MediaTrackSupportedConstraints, val: bool);
116 #[doc = "Get the `noiseSuppression` field of this object."]
117 #[doc = ""]
118 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
119 #[wasm_bindgen(method, getter = "noiseSuppression")]
120 pub fn get_noise_suppression(this: &MediaTrackSupportedConstraints) -> Option<bool>;
121 #[doc = "Change the `noiseSuppression` field of this object."]
122 #[doc = ""]
123 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
124 #[wasm_bindgen(method, setter = "noiseSuppression")]
125 pub fn set_noise_suppression(this: &MediaTrackSupportedConstraints, val: bool);
126 #[doc = "Get the `sampleRate` field of this object."]
127 #[doc = ""]
128 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
129 #[wasm_bindgen(method, getter = "sampleRate")]
130 pub fn get_sample_rate(this: &MediaTrackSupportedConstraints) -> Option<bool>;
131 #[doc = "Change the `sampleRate` field of this object."]
132 #[doc = ""]
133 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
134 #[wasm_bindgen(method, setter = "sampleRate")]
135 pub fn set_sample_rate(this: &MediaTrackSupportedConstraints, val: bool);
136 #[doc = "Get the `sampleSize` field of this object."]
137 #[doc = ""]
138 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
139 #[wasm_bindgen(method, getter = "sampleSize")]
140 pub fn get_sample_size(this: &MediaTrackSupportedConstraints) -> Option<bool>;
141 #[doc = "Change the `sampleSize` field of this object."]
142 #[doc = ""]
143 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
144 #[wasm_bindgen(method, setter = "sampleSize")]
145 pub fn set_sample_size(this: &MediaTrackSupportedConstraints, val: bool);
146 #[doc = "Get the `volume` field of this object."]
147 #[doc = ""]
148 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
149 #[wasm_bindgen(method, getter = "volume")]
150 pub fn get_volume(this: &MediaTrackSupportedConstraints) -> Option<bool>;
151 #[doc = "Change the `volume` field of this object."]
152 #[doc = ""]
153 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
154 #[wasm_bindgen(method, setter = "volume")]
155 pub fn set_volume(this: &MediaTrackSupportedConstraints, val: bool);
156 #[doc = "Get the `width` field of this object."]
157 #[doc = ""]
158 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
159 #[wasm_bindgen(method, getter = "width")]
160 pub fn get_width(this: &MediaTrackSupportedConstraints) -> Option<bool>;
161 #[doc = "Change the `width` field of this object."]
162 #[doc = ""]
163 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
164 #[wasm_bindgen(method, setter = "width")]
165 pub fn set_width(this: &MediaTrackSupportedConstraints, val: bool);
166}
167impl MediaTrackSupportedConstraints {
168 #[doc = "Construct a new `MediaTrackSupportedConstraints`."]
169 #[doc = ""]
170 #[doc = "*This API requires the following crate features to be activated: `MediaTrackSupportedConstraints`*"]
171 pub fn new() -> Self {
172 #[allow(unused_mut)]
173 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
174 ret
175 }
176 #[deprecated = "Use `set_aspect_ratio()` instead."]
177 pub fn aspect_ratio(&mut self, val: bool) -> &mut Self {
178 self.set_aspect_ratio(val);
179 self
180 }
181 #[deprecated = "Use `set_auto_gain_control()` instead."]
182 pub fn auto_gain_control(&mut self, val: bool) -> &mut Self {
183 self.set_auto_gain_control(val);
184 self
185 }
186 #[deprecated = "Use `set_channel_count()` instead."]
187 pub fn channel_count(&mut self, val: bool) -> &mut Self {
188 self.set_channel_count(val);
189 self
190 }
191 #[deprecated = "Use `set_device_id()` instead."]
192 pub fn device_id(&mut self, val: bool) -> &mut Self {
193 self.set_device_id(val);
194 self
195 }
196 #[deprecated = "Use `set_echo_cancellation()` instead."]
197 pub fn echo_cancellation(&mut self, val: bool) -> &mut Self {
198 self.set_echo_cancellation(val);
199 self
200 }
201 #[deprecated = "Use `set_facing_mode()` instead."]
202 pub fn facing_mode(&mut self, val: bool) -> &mut Self {
203 self.set_facing_mode(val);
204 self
205 }
206 #[deprecated = "Use `set_frame_rate()` instead."]
207 pub fn frame_rate(&mut self, val: bool) -> &mut Self {
208 self.set_frame_rate(val);
209 self
210 }
211 #[deprecated = "Use `set_group_id()` instead."]
212 pub fn group_id(&mut self, val: bool) -> &mut Self {
213 self.set_group_id(val);
214 self
215 }
216 #[deprecated = "Use `set_height()` instead."]
217 pub fn height(&mut self, val: bool) -> &mut Self {
218 self.set_height(val);
219 self
220 }
221 #[deprecated = "Use `set_latency()` instead."]
222 pub fn latency(&mut self, val: bool) -> &mut Self {
223 self.set_latency(val);
224 self
225 }
226 #[deprecated = "Use `set_noise_suppression()` instead."]
227 pub fn noise_suppression(&mut self, val: bool) -> &mut Self {
228 self.set_noise_suppression(val);
229 self
230 }
231 #[deprecated = "Use `set_sample_rate()` instead."]
232 pub fn sample_rate(&mut self, val: bool) -> &mut Self {
233 self.set_sample_rate(val);
234 self
235 }
236 #[deprecated = "Use `set_sample_size()` instead."]
237 pub fn sample_size(&mut self, val: bool) -> &mut Self {
238 self.set_sample_size(val);
239 self
240 }
241 #[deprecated = "Use `set_volume()` instead."]
242 pub fn volume(&mut self, val: bool) -> &mut Self {
243 self.set_volume(val);
244 self
245 }
246 #[deprecated = "Use `set_width()` instead."]
247 pub fn width(&mut self, val: bool) -> &mut Self {
248 self.set_width(val);
249 self
250 }
251}
252impl Default for MediaTrackSupportedConstraints {
253 fn default() -> Self {
254 Self::new()
255 }
256}