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 = MediaTrackCapabilities)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `MediaTrackCapabilities` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
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 MediaTrackCapabilities;
17 #[cfg(web_sys_unstable_apis)]
18 #[cfg(feature = "DoubleRange")]
19 #[doc = "Get the `aspectRatio` field of this object."]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
25 #[wasm_bindgen(method, getter = "aspectRatio")]
26 pub fn get_aspect_ratio(this: &MediaTrackCapabilities) -> Option<DoubleRange>;
27 #[cfg(web_sys_unstable_apis)]
28 #[cfg(feature = "DoubleRange")]
29 #[doc = "Change the `aspectRatio` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
35 #[wasm_bindgen(method, setter = "aspectRatio")]
36 pub fn set_aspect_ratio(this: &MediaTrackCapabilities, val: &DoubleRange);
37 #[cfg(web_sys_unstable_apis)]
38 #[doc = "Get the `autoGainControl` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
44 #[wasm_bindgen(method, getter = "autoGainControl")]
45 pub fn get_auto_gain_control(
46 this: &MediaTrackCapabilities,
47 ) -> Option<::js_sys::Array<::js_sys::Boolean>>;
48 #[cfg(web_sys_unstable_apis)]
49 #[doc = "Change the `autoGainControl` field of this object."]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
52 #[doc = ""]
53 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
54 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
55 #[wasm_bindgen(method, setter = "autoGainControl")]
56 pub fn set_auto_gain_control(this: &MediaTrackCapabilities, val: &[::js_sys::Boolean]);
57 #[cfg(web_sys_unstable_apis)]
58 #[doc = "Get the `backgroundBlur` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
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 = "backgroundBlur")]
65 pub fn get_background_blur(
66 this: &MediaTrackCapabilities,
67 ) -> Option<::js_sys::Array<::js_sys::Boolean>>;
68 #[cfg(web_sys_unstable_apis)]
69 #[doc = "Change the `backgroundBlur` field of this object."]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
72 #[doc = ""]
73 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
75 #[wasm_bindgen(method, setter = "backgroundBlur")]
76 pub fn set_background_blur(this: &MediaTrackCapabilities, val: &[::js_sys::Boolean]);
77 #[cfg(web_sys_unstable_apis)]
78 #[cfg(feature = "ULongRange")]
79 #[doc = "Get the `channelCount` field of this object."]
80 #[doc = ""]
81 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"]
82 #[doc = ""]
83 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
84 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
85 #[wasm_bindgen(method, getter = "channelCount")]
86 pub fn get_channel_count(this: &MediaTrackCapabilities) -> Option<ULongRange>;
87 #[cfg(web_sys_unstable_apis)]
88 #[cfg(feature = "ULongRange")]
89 #[doc = "Change the `channelCount` field of this object."]
90 #[doc = ""]
91 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"]
92 #[doc = ""]
93 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
94 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
95 #[wasm_bindgen(method, setter = "channelCount")]
96 pub fn set_channel_count(this: &MediaTrackCapabilities, val: &ULongRange);
97 #[cfg(web_sys_unstable_apis)]
98 #[doc = "Get the `deviceId` field of this object."]
99 #[doc = ""]
100 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
101 #[doc = ""]
102 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
103 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
104 #[wasm_bindgen(method, getter = "deviceId")]
105 pub fn get_device_id(this: &MediaTrackCapabilities) -> Option<::alloc::string::String>;
106 #[cfg(web_sys_unstable_apis)]
107 #[doc = "Change the `deviceId` field of this object."]
108 #[doc = ""]
109 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
110 #[doc = ""]
111 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
112 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
113 #[wasm_bindgen(method, setter = "deviceId")]
114 pub fn set_device_id(this: &MediaTrackCapabilities, val: &str);
115 #[cfg(web_sys_unstable_apis)]
116 #[doc = "Get the `echoCancellation` field of this object."]
117 #[doc = ""]
118 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
119 #[doc = ""]
120 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
121 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
122 #[wasm_bindgen(method, getter = "echoCancellation")]
123 pub fn get_echo_cancellation(
124 this: &MediaTrackCapabilities,
125 ) -> Option<::js_sys::Array<::js_sys::Boolean>>;
126 #[cfg(web_sys_unstable_apis)]
127 #[doc = "Change the `echoCancellation` field of this object."]
128 #[doc = ""]
129 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
130 #[doc = ""]
131 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
132 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
133 #[wasm_bindgen(method, setter = "echoCancellation")]
134 pub fn set_echo_cancellation(this: &MediaTrackCapabilities, val: &[::js_sys::Boolean]);
135 #[cfg(web_sys_unstable_apis)]
136 #[doc = "Get the `facingMode` field of this object."]
137 #[doc = ""]
138 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
139 #[doc = ""]
140 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
141 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
142 #[wasm_bindgen(method, getter = "facingMode")]
143 pub fn get_facing_mode(
144 this: &MediaTrackCapabilities,
145 ) -> Option<::js_sys::Array<::js_sys::JsString>>;
146 #[cfg(web_sys_unstable_apis)]
147 #[doc = "Change the `facingMode` field of this object."]
148 #[doc = ""]
149 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
150 #[doc = ""]
151 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
152 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
153 #[wasm_bindgen(method, setter = "facingMode")]
154 pub fn set_facing_mode(this: &MediaTrackCapabilities, val: &[::js_sys::JsString]);
155 #[cfg(web_sys_unstable_apis)]
156 #[cfg(feature = "DoubleRange")]
157 #[doc = "Get the `frameRate` field of this object."]
158 #[doc = ""]
159 #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"]
160 #[doc = ""]
161 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
162 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
163 #[wasm_bindgen(method, getter = "frameRate")]
164 pub fn get_frame_rate(this: &MediaTrackCapabilities) -> Option<DoubleRange>;
165 #[cfg(web_sys_unstable_apis)]
166 #[cfg(feature = "DoubleRange")]
167 #[doc = "Change the `frameRate` field of this object."]
168 #[doc = ""]
169 #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"]
170 #[doc = ""]
171 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
172 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
173 #[wasm_bindgen(method, setter = "frameRate")]
174 pub fn set_frame_rate(this: &MediaTrackCapabilities, val: &DoubleRange);
175 #[cfg(web_sys_unstable_apis)]
176 #[doc = "Get the `groupId` field of this object."]
177 #[doc = ""]
178 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
179 #[doc = ""]
180 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
181 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
182 #[wasm_bindgen(method, getter = "groupId")]
183 pub fn get_group_id(this: &MediaTrackCapabilities) -> Option<::alloc::string::String>;
184 #[cfg(web_sys_unstable_apis)]
185 #[doc = "Change the `groupId` field of this object."]
186 #[doc = ""]
187 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
188 #[doc = ""]
189 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
190 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
191 #[wasm_bindgen(method, setter = "groupId")]
192 pub fn set_group_id(this: &MediaTrackCapabilities, val: &str);
193 #[cfg(web_sys_unstable_apis)]
194 #[cfg(feature = "ULongRange")]
195 #[doc = "Get the `height` field of this object."]
196 #[doc = ""]
197 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"]
198 #[doc = ""]
199 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
200 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
201 #[wasm_bindgen(method, getter = "height")]
202 pub fn get_height(this: &MediaTrackCapabilities) -> Option<ULongRange>;
203 #[cfg(web_sys_unstable_apis)]
204 #[cfg(feature = "ULongRange")]
205 #[doc = "Change the `height` field of this object."]
206 #[doc = ""]
207 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"]
208 #[doc = ""]
209 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
210 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
211 #[wasm_bindgen(method, setter = "height")]
212 pub fn set_height(this: &MediaTrackCapabilities, val: &ULongRange);
213 #[cfg(web_sys_unstable_apis)]
214 #[cfg(feature = "DoubleRange")]
215 #[doc = "Get the `latency` field of this object."]
216 #[doc = ""]
217 #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"]
218 #[doc = ""]
219 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
220 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
221 #[wasm_bindgen(method, getter = "latency")]
222 pub fn get_latency(this: &MediaTrackCapabilities) -> Option<DoubleRange>;
223 #[cfg(web_sys_unstable_apis)]
224 #[cfg(feature = "DoubleRange")]
225 #[doc = "Change the `latency` field of this object."]
226 #[doc = ""]
227 #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"]
228 #[doc = ""]
229 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
230 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
231 #[wasm_bindgen(method, setter = "latency")]
232 pub fn set_latency(this: &MediaTrackCapabilities, val: &DoubleRange);
233 #[cfg(web_sys_unstable_apis)]
234 #[doc = "Get the `noiseSuppression` field of this object."]
235 #[doc = ""]
236 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
237 #[doc = ""]
238 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
239 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
240 #[wasm_bindgen(method, getter = "noiseSuppression")]
241 pub fn get_noise_suppression(
242 this: &MediaTrackCapabilities,
243 ) -> Option<::js_sys::Array<::js_sys::Boolean>>;
244 #[cfg(web_sys_unstable_apis)]
245 #[doc = "Change the `noiseSuppression` field of this object."]
246 #[doc = ""]
247 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
248 #[doc = ""]
249 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
250 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
251 #[wasm_bindgen(method, setter = "noiseSuppression")]
252 pub fn set_noise_suppression(this: &MediaTrackCapabilities, val: &[::js_sys::Boolean]);
253 #[cfg(web_sys_unstable_apis)]
254 #[doc = "Get the `resizeMode` field of this object."]
255 #[doc = ""]
256 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
257 #[doc = ""]
258 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
259 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
260 #[wasm_bindgen(method, getter = "resizeMode")]
261 pub fn get_resize_mode(
262 this: &MediaTrackCapabilities,
263 ) -> Option<::js_sys::Array<::js_sys::JsString>>;
264 #[cfg(web_sys_unstable_apis)]
265 #[doc = "Change the `resizeMode` field of this object."]
266 #[doc = ""]
267 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
268 #[doc = ""]
269 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
270 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
271 #[wasm_bindgen(method, setter = "resizeMode")]
272 pub fn set_resize_mode(this: &MediaTrackCapabilities, val: &[::js_sys::JsString]);
273 #[cfg(web_sys_unstable_apis)]
274 #[cfg(feature = "ULongRange")]
275 #[doc = "Get the `sampleRate` field of this object."]
276 #[doc = ""]
277 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"]
278 #[doc = ""]
279 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
280 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
281 #[wasm_bindgen(method, getter = "sampleRate")]
282 pub fn get_sample_rate(this: &MediaTrackCapabilities) -> Option<ULongRange>;
283 #[cfg(web_sys_unstable_apis)]
284 #[cfg(feature = "ULongRange")]
285 #[doc = "Change the `sampleRate` field of this object."]
286 #[doc = ""]
287 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"]
288 #[doc = ""]
289 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
290 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
291 #[wasm_bindgen(method, setter = "sampleRate")]
292 pub fn set_sample_rate(this: &MediaTrackCapabilities, val: &ULongRange);
293 #[cfg(web_sys_unstable_apis)]
294 #[cfg(feature = "ULongRange")]
295 #[doc = "Get the `sampleSize` field of this object."]
296 #[doc = ""]
297 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"]
298 #[doc = ""]
299 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
300 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
301 #[wasm_bindgen(method, getter = "sampleSize")]
302 pub fn get_sample_size(this: &MediaTrackCapabilities) -> Option<ULongRange>;
303 #[cfg(web_sys_unstable_apis)]
304 #[cfg(feature = "ULongRange")]
305 #[doc = "Change the `sampleSize` field of this object."]
306 #[doc = ""]
307 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"]
308 #[doc = ""]
309 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
310 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
311 #[wasm_bindgen(method, setter = "sampleSize")]
312 pub fn set_sample_size(this: &MediaTrackCapabilities, val: &ULongRange);
313 #[cfg(web_sys_unstable_apis)]
314 #[cfg(feature = "ULongRange")]
315 #[doc = "Get the `width` field of this object."]
316 #[doc = ""]
317 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"]
318 #[doc = ""]
319 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
320 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
321 #[wasm_bindgen(method, getter = "width")]
322 pub fn get_width(this: &MediaTrackCapabilities) -> Option<ULongRange>;
323 #[cfg(web_sys_unstable_apis)]
324 #[cfg(feature = "ULongRange")]
325 #[doc = "Change the `width` field of this object."]
326 #[doc = ""]
327 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"]
328 #[doc = ""]
329 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
330 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
331 #[wasm_bindgen(method, setter = "width")]
332 pub fn set_width(this: &MediaTrackCapabilities, val: &ULongRange);
333}
334#[cfg(web_sys_unstable_apis)]
335impl MediaTrackCapabilities {
336 #[doc = "Construct a new `MediaTrackCapabilities`."]
337 #[doc = ""]
338 #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"]
339 #[doc = ""]
340 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
341 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
342 pub fn new() -> Self {
343 #[allow(unused_mut)]
344 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
345 ret
346 }
347 #[cfg(web_sys_unstable_apis)]
348 #[cfg(feature = "DoubleRange")]
349 #[deprecated = "Use `set_aspect_ratio()` instead."]
350 pub fn aspect_ratio(&mut self, val: &DoubleRange) -> &mut Self {
351 self.set_aspect_ratio(val);
352 self
353 }
354 #[cfg(web_sys_unstable_apis)]
355 #[deprecated = "Use `set_auto_gain_control()` instead."]
356 pub fn auto_gain_control(&mut self, val: &[::js_sys::Boolean]) -> &mut Self {
357 self.set_auto_gain_control(val);
358 self
359 }
360 #[cfg(web_sys_unstable_apis)]
361 #[deprecated = "Use `set_background_blur()` instead."]
362 pub fn background_blur(&mut self, val: &[::js_sys::Boolean]) -> &mut Self {
363 self.set_background_blur(val);
364 self
365 }
366 #[cfg(web_sys_unstable_apis)]
367 #[cfg(feature = "ULongRange")]
368 #[deprecated = "Use `set_channel_count()` instead."]
369 pub fn channel_count(&mut self, val: &ULongRange) -> &mut Self {
370 self.set_channel_count(val);
371 self
372 }
373 #[cfg(web_sys_unstable_apis)]
374 #[deprecated = "Use `set_device_id()` instead."]
375 pub fn device_id(&mut self, val: &str) -> &mut Self {
376 self.set_device_id(val);
377 self
378 }
379 #[cfg(web_sys_unstable_apis)]
380 #[deprecated = "Use `set_echo_cancellation()` instead."]
381 pub fn echo_cancellation(&mut self, val: &[::js_sys::Boolean]) -> &mut Self {
382 self.set_echo_cancellation(val);
383 self
384 }
385 #[cfg(web_sys_unstable_apis)]
386 #[deprecated = "Use `set_facing_mode()` instead."]
387 pub fn facing_mode(&mut self, val: &[::js_sys::JsString]) -> &mut Self {
388 self.set_facing_mode(val);
389 self
390 }
391 #[cfg(web_sys_unstable_apis)]
392 #[cfg(feature = "DoubleRange")]
393 #[deprecated = "Use `set_frame_rate()` instead."]
394 pub fn frame_rate(&mut self, val: &DoubleRange) -> &mut Self {
395 self.set_frame_rate(val);
396 self
397 }
398 #[cfg(web_sys_unstable_apis)]
399 #[deprecated = "Use `set_group_id()` instead."]
400 pub fn group_id(&mut self, val: &str) -> &mut Self {
401 self.set_group_id(val);
402 self
403 }
404 #[cfg(web_sys_unstable_apis)]
405 #[cfg(feature = "ULongRange")]
406 #[deprecated = "Use `set_height()` instead."]
407 pub fn height(&mut self, val: &ULongRange) -> &mut Self {
408 self.set_height(val);
409 self
410 }
411 #[cfg(web_sys_unstable_apis)]
412 #[cfg(feature = "DoubleRange")]
413 #[deprecated = "Use `set_latency()` instead."]
414 pub fn latency(&mut self, val: &DoubleRange) -> &mut Self {
415 self.set_latency(val);
416 self
417 }
418 #[cfg(web_sys_unstable_apis)]
419 #[deprecated = "Use `set_noise_suppression()` instead."]
420 pub fn noise_suppression(&mut self, val: &[::js_sys::Boolean]) -> &mut Self {
421 self.set_noise_suppression(val);
422 self
423 }
424 #[cfg(web_sys_unstable_apis)]
425 #[deprecated = "Use `set_resize_mode()` instead."]
426 pub fn resize_mode(&mut self, val: &[::js_sys::JsString]) -> &mut Self {
427 self.set_resize_mode(val);
428 self
429 }
430 #[cfg(web_sys_unstable_apis)]
431 #[cfg(feature = "ULongRange")]
432 #[deprecated = "Use `set_sample_rate()` instead."]
433 pub fn sample_rate(&mut self, val: &ULongRange) -> &mut Self {
434 self.set_sample_rate(val);
435 self
436 }
437 #[cfg(web_sys_unstable_apis)]
438 #[cfg(feature = "ULongRange")]
439 #[deprecated = "Use `set_sample_size()` instead."]
440 pub fn sample_size(&mut self, val: &ULongRange) -> &mut Self {
441 self.set_sample_size(val);
442 self
443 }
444 #[cfg(web_sys_unstable_apis)]
445 #[cfg(feature = "ULongRange")]
446 #[deprecated = "Use `set_width()` instead."]
447 pub fn width(&mut self, val: &ULongRange) -> &mut Self {
448 self.set_width(val);
449 self
450 }
451}
452#[cfg(web_sys_unstable_apis)]
453impl Default for MediaTrackCapabilities {
454 fn default() -> Self {
455 Self::new()
456 }
457}