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 = VideoEncoderConfig)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `VideoEncoderConfig` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
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 VideoEncoderConfig;
17 #[cfg(web_sys_unstable_apis)]
18 #[cfg(feature = "AlphaOption")]
19 #[doc = "Get the `alpha` field of this object."]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `AlphaOption`, `VideoEncoderConfig`*"]
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 = "alpha")]
26 pub fn get_alpha(this: &VideoEncoderConfig) -> Option<AlphaOption>;
27 #[cfg(web_sys_unstable_apis)]
28 #[cfg(feature = "AlphaOption")]
29 #[doc = "Change the `alpha` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `AlphaOption`, `VideoEncoderConfig`*"]
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 = "alpha")]
36 pub fn set_alpha(this: &VideoEncoderConfig, val: AlphaOption);
37 #[cfg(web_sys_unstable_apis)]
38 #[doc = "Get the `bitrate` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
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 = "bitrate")]
45 pub fn get_bitrate(this: &VideoEncoderConfig) -> Option<f64>;
46 #[cfg(web_sys_unstable_apis)]
47 #[doc = "Change the `bitrate` field of this object."]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
50 #[doc = ""]
51 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
53 #[wasm_bindgen(method, setter = "bitrate")]
54 pub fn set_bitrate(this: &VideoEncoderConfig, val: u32);
55 #[cfg(web_sys_unstable_apis)]
56 #[doc = "Change the `bitrate` field of this object."]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
59 #[doc = ""]
60 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
61 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
62 #[wasm_bindgen(method, setter = "bitrate")]
63 pub fn set_bitrate_f64(this: &VideoEncoderConfig, val: f64);
64 #[cfg(web_sys_unstable_apis)]
65 #[cfg(feature = "VideoEncoderBitrateMode")]
66 #[doc = "Get the `bitrateMode` field of this object."]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderBitrateMode`, `VideoEncoderConfig`*"]
69 #[doc = ""]
70 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
71 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
72 #[wasm_bindgen(method, getter = "bitrateMode")]
73 pub fn get_bitrate_mode(this: &VideoEncoderConfig) -> Option<VideoEncoderBitrateMode>;
74 #[cfg(web_sys_unstable_apis)]
75 #[cfg(feature = "VideoEncoderBitrateMode")]
76 #[doc = "Change the `bitrateMode` field of this object."]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderBitrateMode`, `VideoEncoderConfig`*"]
79 #[doc = ""]
80 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
81 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
82 #[wasm_bindgen(method, setter = "bitrateMode")]
83 pub fn set_bitrate_mode(this: &VideoEncoderConfig, val: VideoEncoderBitrateMode);
84 #[cfg(web_sys_unstable_apis)]
85 #[doc = "Get the `codec` field of this object."]
86 #[doc = ""]
87 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
88 #[doc = ""]
89 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
90 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
91 #[wasm_bindgen(method, getter = "codec")]
92 pub fn get_codec(this: &VideoEncoderConfig) -> ::alloc::string::String;
93 #[cfg(web_sys_unstable_apis)]
94 #[doc = "Change the `codec` field of this object."]
95 #[doc = ""]
96 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
100 #[wasm_bindgen(method, setter = "codec")]
101 pub fn set_codec(this: &VideoEncoderConfig, val: &str);
102 #[cfg(web_sys_unstable_apis)]
103 #[doc = "Get the `contentHint` field of this object."]
104 #[doc = ""]
105 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
106 #[doc = ""]
107 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
108 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
109 #[wasm_bindgen(method, getter = "contentHint")]
110 pub fn get_content_hint(this: &VideoEncoderConfig) -> Option<::alloc::string::String>;
111 #[cfg(web_sys_unstable_apis)]
112 #[doc = "Change the `contentHint` field of this object."]
113 #[doc = ""]
114 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
115 #[doc = ""]
116 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
117 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
118 #[wasm_bindgen(method, setter = "contentHint")]
119 pub fn set_content_hint(this: &VideoEncoderConfig, val: &str);
120 #[cfg(web_sys_unstable_apis)]
121 #[doc = "Get the `displayHeight` field of this object."]
122 #[doc = ""]
123 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
124 #[doc = ""]
125 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
126 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
127 #[wasm_bindgen(method, getter = "displayHeight")]
128 pub fn get_display_height(this: &VideoEncoderConfig) -> Option<u32>;
129 #[cfg(web_sys_unstable_apis)]
130 #[doc = "Change the `displayHeight` field of this object."]
131 #[doc = ""]
132 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
133 #[doc = ""]
134 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
135 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
136 #[wasm_bindgen(method, setter = "displayHeight")]
137 pub fn set_display_height(this: &VideoEncoderConfig, val: u32);
138 #[cfg(web_sys_unstable_apis)]
139 #[doc = "Get the `displayWidth` field of this object."]
140 #[doc = ""]
141 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
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://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
145 #[wasm_bindgen(method, getter = "displayWidth")]
146 pub fn get_display_width(this: &VideoEncoderConfig) -> Option<u32>;
147 #[cfg(web_sys_unstable_apis)]
148 #[doc = "Change the `displayWidth` field of this object."]
149 #[doc = ""]
150 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
151 #[doc = ""]
152 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
153 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
154 #[wasm_bindgen(method, setter = "displayWidth")]
155 pub fn set_display_width(this: &VideoEncoderConfig, val: u32);
156 #[cfg(web_sys_unstable_apis)]
157 #[doc = "Get the `framerate` field of this object."]
158 #[doc = ""]
159 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
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_framerate(this: &VideoEncoderConfig) -> Option<f64>;
165 #[cfg(web_sys_unstable_apis)]
166 #[doc = "Change the `framerate` field of this object."]
167 #[doc = ""]
168 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
169 #[doc = ""]
170 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
171 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
172 #[wasm_bindgen(method, setter = "framerate")]
173 pub fn set_framerate(this: &VideoEncoderConfig, val: f64);
174 #[cfg(web_sys_unstable_apis)]
175 #[cfg(feature = "HardwareAcceleration")]
176 #[doc = "Get the `hardwareAcceleration` field of this object."]
177 #[doc = ""]
178 #[doc = "*This API requires the following crate features to be activated: `HardwareAcceleration`, `VideoEncoderConfig`*"]
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 = "hardwareAcceleration")]
183 pub fn get_hardware_acceleration(this: &VideoEncoderConfig) -> Option<HardwareAcceleration>;
184 #[cfg(web_sys_unstable_apis)]
185 #[cfg(feature = "HardwareAcceleration")]
186 #[doc = "Change the `hardwareAcceleration` field of this object."]
187 #[doc = ""]
188 #[doc = "*This API requires the following crate features to be activated: `HardwareAcceleration`, `VideoEncoderConfig`*"]
189 #[doc = ""]
190 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
191 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
192 #[wasm_bindgen(method, setter = "hardwareAcceleration")]
193 pub fn set_hardware_acceleration(this: &VideoEncoderConfig, val: HardwareAcceleration);
194 #[cfg(web_sys_unstable_apis)]
195 #[doc = "Get the `height` field of this object."]
196 #[doc = ""]
197 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
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: &VideoEncoderConfig) -> u32;
203 #[cfg(web_sys_unstable_apis)]
204 #[doc = "Change the `height` field of this object."]
205 #[doc = ""]
206 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
207 #[doc = ""]
208 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
209 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
210 #[wasm_bindgen(method, setter = "height")]
211 pub fn set_height(this: &VideoEncoderConfig, val: u32);
212 #[cfg(web_sys_unstable_apis)]
213 #[cfg(feature = "LatencyMode")]
214 #[doc = "Get the `latencyMode` field of this object."]
215 #[doc = ""]
216 #[doc = "*This API requires the following crate features to be activated: `LatencyMode`, `VideoEncoderConfig`*"]
217 #[doc = ""]
218 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
219 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
220 #[wasm_bindgen(method, getter = "latencyMode")]
221 pub fn get_latency_mode(this: &VideoEncoderConfig) -> Option<LatencyMode>;
222 #[cfg(web_sys_unstable_apis)]
223 #[cfg(feature = "LatencyMode")]
224 #[doc = "Change the `latencyMode` field of this object."]
225 #[doc = ""]
226 #[doc = "*This API requires the following crate features to be activated: `LatencyMode`, `VideoEncoderConfig`*"]
227 #[doc = ""]
228 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
229 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
230 #[wasm_bindgen(method, setter = "latencyMode")]
231 pub fn set_latency_mode(this: &VideoEncoderConfig, val: LatencyMode);
232 #[cfg(web_sys_unstable_apis)]
233 #[doc = "Get the `scalabilityMode` field of this object."]
234 #[doc = ""]
235 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
236 #[doc = ""]
237 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
238 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
239 #[wasm_bindgen(method, getter = "scalabilityMode")]
240 pub fn get_scalability_mode(this: &VideoEncoderConfig) -> Option<::alloc::string::String>;
241 #[cfg(web_sys_unstable_apis)]
242 #[doc = "Change the `scalabilityMode` field of this object."]
243 #[doc = ""]
244 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
245 #[doc = ""]
246 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
247 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
248 #[wasm_bindgen(method, setter = "scalabilityMode")]
249 pub fn set_scalability_mode(this: &VideoEncoderConfig, val: &str);
250 #[cfg(web_sys_unstable_apis)]
251 #[doc = "Get the `width` field of this object."]
252 #[doc = ""]
253 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
254 #[doc = ""]
255 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
256 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
257 #[wasm_bindgen(method, getter = "width")]
258 pub fn get_width(this: &VideoEncoderConfig) -> u32;
259 #[cfg(web_sys_unstable_apis)]
260 #[doc = "Change the `width` field of this object."]
261 #[doc = ""]
262 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
263 #[doc = ""]
264 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
265 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
266 #[wasm_bindgen(method, setter = "width")]
267 pub fn set_width(this: &VideoEncoderConfig, val: u32);
268}
269#[cfg(web_sys_unstable_apis)]
270impl VideoEncoderConfig {
271 #[doc = "Construct a new `VideoEncoderConfig`."]
272 #[doc = ""]
273 #[doc = "*This API requires the following crate features to be activated: `VideoEncoderConfig`*"]
274 #[doc = ""]
275 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
276 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
277 pub fn new(codec: &str, height: u32, width: u32) -> Self {
278 #[allow(unused_mut)]
279 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
280 ret.set_codec(codec);
281 ret.set_height(height);
282 ret.set_width(width);
283 ret
284 }
285 #[cfg(web_sys_unstable_apis)]
286 #[cfg(feature = "AlphaOption")]
287 #[deprecated = "Use `set_alpha()` instead."]
288 pub fn alpha(&mut self, val: AlphaOption) -> &mut Self {
289 self.set_alpha(val);
290 self
291 }
292 #[cfg(web_sys_unstable_apis)]
293 #[deprecated = "Use `set_bitrate()` instead."]
294 pub fn bitrate(&mut self, val: u32) -> &mut Self {
295 self.set_bitrate(val);
296 self
297 }
298 #[cfg(web_sys_unstable_apis)]
299 #[cfg(feature = "VideoEncoderBitrateMode")]
300 #[deprecated = "Use `set_bitrate_mode()` instead."]
301 pub fn bitrate_mode(&mut self, val: VideoEncoderBitrateMode) -> &mut Self {
302 self.set_bitrate_mode(val);
303 self
304 }
305 #[cfg(web_sys_unstable_apis)]
306 #[deprecated = "Use `set_codec()` instead."]
307 pub fn codec(&mut self, val: &str) -> &mut Self {
308 self.set_codec(val);
309 self
310 }
311 #[cfg(web_sys_unstable_apis)]
312 #[deprecated = "Use `set_content_hint()` instead."]
313 pub fn content_hint(&mut self, val: &str) -> &mut Self {
314 self.set_content_hint(val);
315 self
316 }
317 #[cfg(web_sys_unstable_apis)]
318 #[deprecated = "Use `set_display_height()` instead."]
319 pub fn display_height(&mut self, val: u32) -> &mut Self {
320 self.set_display_height(val);
321 self
322 }
323 #[cfg(web_sys_unstable_apis)]
324 #[deprecated = "Use `set_display_width()` instead."]
325 pub fn display_width(&mut self, val: u32) -> &mut Self {
326 self.set_display_width(val);
327 self
328 }
329 #[cfg(web_sys_unstable_apis)]
330 #[deprecated = "Use `set_framerate()` instead."]
331 pub fn framerate(&mut self, val: f64) -> &mut Self {
332 self.set_framerate(val);
333 self
334 }
335 #[cfg(web_sys_unstable_apis)]
336 #[cfg(feature = "HardwareAcceleration")]
337 #[deprecated = "Use `set_hardware_acceleration()` instead."]
338 pub fn hardware_acceleration(&mut self, val: HardwareAcceleration) -> &mut Self {
339 self.set_hardware_acceleration(val);
340 self
341 }
342 #[cfg(web_sys_unstable_apis)]
343 #[deprecated = "Use `set_height()` instead."]
344 pub fn height(&mut self, val: u32) -> &mut Self {
345 self.set_height(val);
346 self
347 }
348 #[cfg(web_sys_unstable_apis)]
349 #[cfg(feature = "LatencyMode")]
350 #[deprecated = "Use `set_latency_mode()` instead."]
351 pub fn latency_mode(&mut self, val: LatencyMode) -> &mut Self {
352 self.set_latency_mode(val);
353 self
354 }
355 #[cfg(web_sys_unstable_apis)]
356 #[deprecated = "Use `set_scalability_mode()` instead."]
357 pub fn scalability_mode(&mut self, val: &str) -> &mut Self {
358 self.set_scalability_mode(val);
359 self
360 }
361 #[cfg(web_sys_unstable_apis)]
362 #[deprecated = "Use `set_width()` instead."]
363 pub fn width(&mut self, val: u32) -> &mut Self {
364 self.set_width(val);
365 self
366 }
367}