web_sys/features/
gen_MediaTrackConstraints.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 = MediaTrackConstraints)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `MediaTrackConstraints` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
12    pub type MediaTrackConstraints;
13    #[doc = "Get the `autoGainControl` field of this object."]
14    #[doc = ""]
15    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
16    #[wasm_bindgen(method, getter = "autoGainControl")]
17    pub fn get_auto_gain_control(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue;
18    #[doc = "Change the `autoGainControl` field of this object."]
19    #[doc = ""]
20    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
21    #[wasm_bindgen(method, setter = "autoGainControl")]
22    pub fn set_auto_gain_control(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue);
23    #[doc = "Get the `browserWindow` field of this object."]
24    #[doc = ""]
25    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
26    #[wasm_bindgen(method, getter = "browserWindow")]
27    pub fn get_browser_window(this: &MediaTrackConstraints) -> Option<f64>;
28    #[doc = "Change the `browserWindow` field of this object."]
29    #[doc = ""]
30    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
31    #[wasm_bindgen(method, setter = "browserWindow")]
32    pub fn set_browser_window(this: &MediaTrackConstraints, val: f64);
33    #[doc = "Get the `channelCount` field of this object."]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
36    #[wasm_bindgen(method, getter = "channelCount")]
37    pub fn get_channel_count(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue;
38    #[doc = "Change the `channelCount` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
41    #[wasm_bindgen(method, setter = "channelCount")]
42    pub fn set_channel_count(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue);
43    #[doc = "Get the `deviceId` field of this object."]
44    #[doc = ""]
45    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
46    #[wasm_bindgen(method, getter = "deviceId")]
47    pub fn get_device_id(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue;
48    #[doc = "Change the `deviceId` field of this object."]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
51    #[wasm_bindgen(method, setter = "deviceId")]
52    pub fn set_device_id(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue);
53    #[doc = "Get the `echoCancellation` field of this object."]
54    #[doc = ""]
55    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
56    #[wasm_bindgen(method, getter = "echoCancellation")]
57    pub fn get_echo_cancellation(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue;
58    #[doc = "Change the `echoCancellation` field of this object."]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
61    #[wasm_bindgen(method, setter = "echoCancellation")]
62    pub fn set_echo_cancellation(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue);
63    #[doc = "Get the `facingMode` field of this object."]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
66    #[wasm_bindgen(method, getter = "facingMode")]
67    pub fn get_facing_mode(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue;
68    #[doc = "Change the `facingMode` field of this object."]
69    #[doc = ""]
70    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
71    #[wasm_bindgen(method, setter = "facingMode")]
72    pub fn set_facing_mode(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue);
73    #[doc = "Get the `frameRate` field of this object."]
74    #[doc = ""]
75    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
76    #[wasm_bindgen(method, getter = "frameRate")]
77    pub fn get_frame_rate(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue;
78    #[doc = "Change the `frameRate` field of this object."]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
81    #[wasm_bindgen(method, setter = "frameRate")]
82    pub fn set_frame_rate(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue);
83    #[doc = "Get the `height` field of this object."]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
86    #[wasm_bindgen(method, getter = "height")]
87    pub fn get_height(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue;
88    #[doc = "Change the `height` field of this object."]
89    #[doc = ""]
90    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
91    #[wasm_bindgen(method, setter = "height")]
92    pub fn set_height(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue);
93    #[doc = "Get the `mediaSource` field of this object."]
94    #[doc = ""]
95    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
96    #[wasm_bindgen(method, getter = "mediaSource")]
97    pub fn get_media_source(this: &MediaTrackConstraints) -> Option<::alloc::string::String>;
98    #[doc = "Change the `mediaSource` field of this object."]
99    #[doc = ""]
100    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
101    #[wasm_bindgen(method, setter = "mediaSource")]
102    pub fn set_media_source(this: &MediaTrackConstraints, val: &str);
103    #[doc = "Get the `noiseSuppression` field of this object."]
104    #[doc = ""]
105    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
106    #[wasm_bindgen(method, getter = "noiseSuppression")]
107    pub fn get_noise_suppression(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue;
108    #[doc = "Change the `noiseSuppression` field of this object."]
109    #[doc = ""]
110    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
111    #[wasm_bindgen(method, setter = "noiseSuppression")]
112    pub fn set_noise_suppression(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue);
113    #[doc = "Get the `scrollWithPage` field of this object."]
114    #[doc = ""]
115    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
116    #[wasm_bindgen(method, getter = "scrollWithPage")]
117    pub fn get_scroll_with_page(this: &MediaTrackConstraints) -> Option<bool>;
118    #[doc = "Change the `scrollWithPage` field of this object."]
119    #[doc = ""]
120    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
121    #[wasm_bindgen(method, setter = "scrollWithPage")]
122    pub fn set_scroll_with_page(this: &MediaTrackConstraints, val: bool);
123    #[doc = "Get the `viewportHeight` field of this object."]
124    #[doc = ""]
125    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
126    #[wasm_bindgen(method, getter = "viewportHeight")]
127    pub fn get_viewport_height(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue;
128    #[doc = "Change the `viewportHeight` field of this object."]
129    #[doc = ""]
130    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
131    #[wasm_bindgen(method, setter = "viewportHeight")]
132    pub fn set_viewport_height(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue);
133    #[doc = "Get the `viewportOffsetX` field of this object."]
134    #[doc = ""]
135    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
136    #[wasm_bindgen(method, getter = "viewportOffsetX")]
137    pub fn get_viewport_offset_x(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue;
138    #[doc = "Change the `viewportOffsetX` field of this object."]
139    #[doc = ""]
140    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
141    #[wasm_bindgen(method, setter = "viewportOffsetX")]
142    pub fn set_viewport_offset_x(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue);
143    #[doc = "Get the `viewportOffsetY` field of this object."]
144    #[doc = ""]
145    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
146    #[wasm_bindgen(method, getter = "viewportOffsetY")]
147    pub fn get_viewport_offset_y(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue;
148    #[doc = "Change the `viewportOffsetY` field of this object."]
149    #[doc = ""]
150    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
151    #[wasm_bindgen(method, setter = "viewportOffsetY")]
152    pub fn set_viewport_offset_y(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue);
153    #[doc = "Get the `viewportWidth` field of this object."]
154    #[doc = ""]
155    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
156    #[wasm_bindgen(method, getter = "viewportWidth")]
157    pub fn get_viewport_width(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue;
158    #[doc = "Change the `viewportWidth` field of this object."]
159    #[doc = ""]
160    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
161    #[wasm_bindgen(method, setter = "viewportWidth")]
162    pub fn set_viewport_width(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue);
163    #[doc = "Get the `width` field of this object."]
164    #[doc = ""]
165    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
166    #[wasm_bindgen(method, getter = "width")]
167    pub fn get_width(this: &MediaTrackConstraints) -> ::wasm_bindgen::JsValue;
168    #[doc = "Change the `width` field of this object."]
169    #[doc = ""]
170    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
171    #[wasm_bindgen(method, setter = "width")]
172    pub fn set_width(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue);
173    #[doc = "Get the `advanced` field of this object."]
174    #[doc = ""]
175    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
176    #[wasm_bindgen(method, getter = "advanced")]
177    pub fn get_advanced(this: &MediaTrackConstraints) -> Option<::js_sys::Array>;
178    #[doc = "Change the `advanced` field of this object."]
179    #[doc = ""]
180    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
181    #[wasm_bindgen(method, setter = "advanced")]
182    pub fn set_advanced(this: &MediaTrackConstraints, val: &::wasm_bindgen::JsValue);
183}
184impl MediaTrackConstraints {
185    #[doc = "Construct a new `MediaTrackConstraints`."]
186    #[doc = ""]
187    #[doc = "*This API requires the following crate features to be activated: `MediaTrackConstraints`*"]
188    pub fn new() -> Self {
189        #[allow(unused_mut)]
190        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
191        ret
192    }
193    #[deprecated = "Use `set_auto_gain_control()` instead."]
194    pub fn auto_gain_control(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
195        self.set_auto_gain_control(val);
196        self
197    }
198    #[deprecated = "Use `set_browser_window()` instead."]
199    pub fn browser_window(&mut self, val: f64) -> &mut Self {
200        self.set_browser_window(val);
201        self
202    }
203    #[deprecated = "Use `set_channel_count()` instead."]
204    pub fn channel_count(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
205        self.set_channel_count(val);
206        self
207    }
208    #[deprecated = "Use `set_device_id()` instead."]
209    pub fn device_id(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
210        self.set_device_id(val);
211        self
212    }
213    #[deprecated = "Use `set_echo_cancellation()` instead."]
214    pub fn echo_cancellation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
215        self.set_echo_cancellation(val);
216        self
217    }
218    #[deprecated = "Use `set_facing_mode()` instead."]
219    pub fn facing_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
220        self.set_facing_mode(val);
221        self
222    }
223    #[deprecated = "Use `set_frame_rate()` instead."]
224    pub fn frame_rate(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
225        self.set_frame_rate(val);
226        self
227    }
228    #[deprecated = "Use `set_height()` instead."]
229    pub fn height(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
230        self.set_height(val);
231        self
232    }
233    #[deprecated = "Use `set_media_source()` instead."]
234    pub fn media_source(&mut self, val: &str) -> &mut Self {
235        self.set_media_source(val);
236        self
237    }
238    #[deprecated = "Use `set_noise_suppression()` instead."]
239    pub fn noise_suppression(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
240        self.set_noise_suppression(val);
241        self
242    }
243    #[deprecated = "Use `set_scroll_with_page()` instead."]
244    pub fn scroll_with_page(&mut self, val: bool) -> &mut Self {
245        self.set_scroll_with_page(val);
246        self
247    }
248    #[deprecated = "Use `set_viewport_height()` instead."]
249    pub fn viewport_height(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
250        self.set_viewport_height(val);
251        self
252    }
253    #[deprecated = "Use `set_viewport_offset_x()` instead."]
254    pub fn viewport_offset_x(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
255        self.set_viewport_offset_x(val);
256        self
257    }
258    #[deprecated = "Use `set_viewport_offset_y()` instead."]
259    pub fn viewport_offset_y(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
260        self.set_viewport_offset_y(val);
261        self
262    }
263    #[deprecated = "Use `set_viewport_width()` instead."]
264    pub fn viewport_width(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
265        self.set_viewport_width(val);
266        self
267    }
268    #[deprecated = "Use `set_width()` instead."]
269    pub fn width(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
270        self.set_width(val);
271        self
272    }
273    #[deprecated = "Use `set_advanced()` instead."]
274    pub fn advanced(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
275        self.set_advanced(val);
276        self
277    }
278}
279impl Default for MediaTrackConstraints {
280    fn default() -> Self {
281        Self::new()
282    }
283}