|
| 1 | +#![allow(unused_imports)] |
| 2 | +#![allow(clippy::all)] |
| 3 | +use super::*; |
| 4 | +use wasm_bindgen::prelude::*; |
| 5 | +#[cfg(web_sys_unstable_apis)] |
| 6 | +#[wasm_bindgen] |
| 7 | +extern "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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 16 | + pub type MediaTrackCapabilities; |
| 17 | + #[cfg(feature = "DoubleRange")] |
| 18 | + #[wasm_bindgen(method, setter = "aspectRatio")] |
| 19 | + fn aspect_ratio_shim(this: &MediaTrackCapabilities, val: &DoubleRange); |
| 20 | + #[wasm_bindgen(method, setter = "autoGainControl")] |
| 21 | + fn auto_gain_control_shim(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); |
| 22 | + #[cfg(feature = "ULongRange")] |
| 23 | + #[wasm_bindgen(method, setter = "channelCount")] |
| 24 | + fn channel_count_shim(this: &MediaTrackCapabilities, val: &ULongRange); |
| 25 | + #[wasm_bindgen(method, setter = "deviceId")] |
| 26 | + fn device_id_shim(this: &MediaTrackCapabilities, val: &str); |
| 27 | + #[wasm_bindgen(method, setter = "echoCancellation")] |
| 28 | + fn echo_cancellation_shim(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); |
| 29 | + #[wasm_bindgen(method, setter = "facingMode")] |
| 30 | + fn facing_mode_shim(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); |
| 31 | + #[cfg(feature = "DoubleRange")] |
| 32 | + #[wasm_bindgen(method, setter = "frameRate")] |
| 33 | + fn frame_rate_shim(this: &MediaTrackCapabilities, val: &DoubleRange); |
| 34 | + #[wasm_bindgen(method, setter = "groupId")] |
| 35 | + fn group_id_shim(this: &MediaTrackCapabilities, val: &str); |
| 36 | + #[cfg(feature = "ULongRange")] |
| 37 | + #[wasm_bindgen(method, setter = "height")] |
| 38 | + fn height_shim(this: &MediaTrackCapabilities, val: &ULongRange); |
| 39 | + #[cfg(feature = "DoubleRange")] |
| 40 | + #[wasm_bindgen(method, setter = "latency")] |
| 41 | + fn latency_shim(this: &MediaTrackCapabilities, val: &DoubleRange); |
| 42 | + #[wasm_bindgen(method, setter = "noiseSuppression")] |
| 43 | + fn noise_suppression_shim(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); |
| 44 | + #[wasm_bindgen(method, setter = "resizeMode")] |
| 45 | + fn resize_mode_shim(this: &MediaTrackCapabilities, val: &::wasm_bindgen::JsValue); |
| 46 | + #[cfg(feature = "ULongRange")] |
| 47 | + #[wasm_bindgen(method, setter = "sampleRate")] |
| 48 | + fn sample_rate_shim(this: &MediaTrackCapabilities, val: &ULongRange); |
| 49 | + #[cfg(feature = "ULongRange")] |
| 50 | + #[wasm_bindgen(method, setter = "sampleSize")] |
| 51 | + fn sample_size_shim(this: &MediaTrackCapabilities, val: &ULongRange); |
| 52 | + #[cfg(feature = "ULongRange")] |
| 53 | + #[wasm_bindgen(method, setter = "width")] |
| 54 | + fn width_shim(this: &MediaTrackCapabilities, val: &ULongRange); |
| 55 | +} |
| 56 | +#[cfg(web_sys_unstable_apis)] |
| 57 | +impl MediaTrackCapabilities { |
| 58 | + #[doc = "Construct a new `MediaTrackCapabilities`."] |
| 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 64 | + pub fn new() -> Self { |
| 65 | + #[allow(unused_mut)] |
| 66 | + let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new()); |
| 67 | + ret |
| 68 | + } |
| 69 | + #[cfg(web_sys_unstable_apis)] |
| 70 | + #[cfg(feature = "DoubleRange")] |
| 71 | + #[doc = "Change the `aspectRatio` field of this object."] |
| 72 | + #[doc = ""] |
| 73 | + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"] |
| 74 | + #[doc = ""] |
| 75 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 76 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 77 | + pub fn aspect_ratio(&mut self, val: &DoubleRange) -> &mut Self { |
| 78 | + self.aspect_ratio_shim(val); |
| 79 | + self |
| 80 | + } |
| 81 | + #[cfg(web_sys_unstable_apis)] |
| 82 | + #[doc = "Change the `autoGainControl` field of this object."] |
| 83 | + #[doc = ""] |
| 84 | + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] |
| 85 | + #[doc = ""] |
| 86 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 87 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 88 | + pub fn auto_gain_control(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { |
| 89 | + self.auto_gain_control_shim(val); |
| 90 | + self |
| 91 | + } |
| 92 | + #[cfg(web_sys_unstable_apis)] |
| 93 | + #[cfg(feature = "ULongRange")] |
| 94 | + #[doc = "Change the `channelCount` field of this object."] |
| 95 | + #[doc = ""] |
| 96 | + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] |
| 97 | + #[doc = ""] |
| 98 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 99 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 100 | + pub fn channel_count(&mut self, val: &ULongRange) -> &mut Self { |
| 101 | + self.channel_count_shim(val); |
| 102 | + self |
| 103 | + } |
| 104 | + #[cfg(web_sys_unstable_apis)] |
| 105 | + #[doc = "Change the `deviceId` field of this object."] |
| 106 | + #[doc = ""] |
| 107 | + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] |
| 108 | + #[doc = ""] |
| 109 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 110 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 111 | + pub fn device_id(&mut self, val: &str) -> &mut Self { |
| 112 | + self.device_id_shim(val); |
| 113 | + self |
| 114 | + } |
| 115 | + #[cfg(web_sys_unstable_apis)] |
| 116 | + #[doc = "Change 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 122 | + pub fn echo_cancellation(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { |
| 123 | + self.echo_cancellation_shim(val); |
| 124 | + self |
| 125 | + } |
| 126 | + #[cfg(web_sys_unstable_apis)] |
| 127 | + #[doc = "Change the `facingMode` 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 133 | + pub fn facing_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { |
| 134 | + self.facing_mode_shim(val); |
| 135 | + self |
| 136 | + } |
| 137 | + #[cfg(web_sys_unstable_apis)] |
| 138 | + #[cfg(feature = "DoubleRange")] |
| 139 | + #[doc = "Change the `frameRate` field of this object."] |
| 140 | + #[doc = ""] |
| 141 | + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"] |
| 142 | + #[doc = ""] |
| 143 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 144 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 145 | + pub fn frame_rate(&mut self, val: &DoubleRange) -> &mut Self { |
| 146 | + self.frame_rate_shim(val); |
| 147 | + self |
| 148 | + } |
| 149 | + #[cfg(web_sys_unstable_apis)] |
| 150 | + #[doc = "Change the `groupId` field of this object."] |
| 151 | + #[doc = ""] |
| 152 | + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] |
| 153 | + #[doc = ""] |
| 154 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 155 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 156 | + pub fn group_id(&mut self, val: &str) -> &mut Self { |
| 157 | + self.group_id_shim(val); |
| 158 | + self |
| 159 | + } |
| 160 | + #[cfg(web_sys_unstable_apis)] |
| 161 | + #[cfg(feature = "ULongRange")] |
| 162 | + #[doc = "Change the `height` field of this object."] |
| 163 | + #[doc = ""] |
| 164 | + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] |
| 165 | + #[doc = ""] |
| 166 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 167 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 168 | + pub fn height(&mut self, val: &ULongRange) -> &mut Self { |
| 169 | + self.height_shim(val); |
| 170 | + self |
| 171 | + } |
| 172 | + #[cfg(web_sys_unstable_apis)] |
| 173 | + #[cfg(feature = "DoubleRange")] |
| 174 | + #[doc = "Change the `latency` field of this object."] |
| 175 | + #[doc = ""] |
| 176 | + #[doc = "*This API requires the following crate features to be activated: `DoubleRange`, `MediaTrackCapabilities`*"] |
| 177 | + #[doc = ""] |
| 178 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 179 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 180 | + pub fn latency(&mut self, val: &DoubleRange) -> &mut Self { |
| 181 | + self.latency_shim(val); |
| 182 | + self |
| 183 | + } |
| 184 | + #[cfg(web_sys_unstable_apis)] |
| 185 | + #[doc = "Change the `noiseSuppression` 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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 191 | + pub fn noise_suppression(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { |
| 192 | + self.noise_suppression_shim(val); |
| 193 | + self |
| 194 | + } |
| 195 | + #[cfg(web_sys_unstable_apis)] |
| 196 | + #[doc = "Change the `resizeMode` field of this object."] |
| 197 | + #[doc = ""] |
| 198 | + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`*"] |
| 199 | + #[doc = ""] |
| 200 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 201 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 202 | + pub fn resize_mode(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self { |
| 203 | + self.resize_mode_shim(val); |
| 204 | + self |
| 205 | + } |
| 206 | + #[cfg(web_sys_unstable_apis)] |
| 207 | + #[cfg(feature = "ULongRange")] |
| 208 | + #[doc = "Change the `sampleRate` field of this object."] |
| 209 | + #[doc = ""] |
| 210 | + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] |
| 211 | + #[doc = ""] |
| 212 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 213 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 214 | + pub fn sample_rate(&mut self, val: &ULongRange) -> &mut Self { |
| 215 | + self.sample_rate_shim(val); |
| 216 | + self |
| 217 | + } |
| 218 | + #[cfg(web_sys_unstable_apis)] |
| 219 | + #[cfg(feature = "ULongRange")] |
| 220 | + #[doc = "Change the `sampleSize` field of this object."] |
| 221 | + #[doc = ""] |
| 222 | + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] |
| 223 | + #[doc = ""] |
| 224 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 225 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 226 | + pub fn sample_size(&mut self, val: &ULongRange) -> &mut Self { |
| 227 | + self.sample_size_shim(val); |
| 228 | + self |
| 229 | + } |
| 230 | + #[cfg(web_sys_unstable_apis)] |
| 231 | + #[cfg(feature = "ULongRange")] |
| 232 | + #[doc = "Change the `width` field of this object."] |
| 233 | + #[doc = ""] |
| 234 | + #[doc = "*This API requires the following crate features to be activated: `MediaTrackCapabilities`, `ULongRange`*"] |
| 235 | + #[doc = ""] |
| 236 | + #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"] |
| 237 | + #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"] |
| 238 | + pub fn width(&mut self, val: &ULongRange) -> &mut Self { |
| 239 | + self.width_shim(val); |
| 240 | + self |
| 241 | + } |
| 242 | +} |
| 243 | +#[cfg(web_sys_unstable_apis)] |
| 244 | +impl Default for MediaTrackCapabilities { |
| 245 | + fn default() -> Self { |
| 246 | + Self::new() |
| 247 | + } |
| 248 | +} |
0 commit comments