web_sys/features/
gen_MediaTrackSupportedConstraints.rs

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