web_sys/features/
gen_MediaConfiguration.rs1#![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 = MediaConfiguration)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `MediaConfiguration` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `MediaConfiguration`*"]
12 pub type MediaConfiguration;
13 #[cfg(feature = "AudioConfiguration")]
14 #[doc = "Get the `audio` field of this object."]
15 #[doc = ""]
16 #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaConfiguration`*"]
17 #[wasm_bindgen(method, getter = "audio")]
18 pub fn get_audio(this: &MediaConfiguration) -> Option<AudioConfiguration>;
19 #[cfg(feature = "AudioConfiguration")]
20 #[doc = "Change the `audio` field of this object."]
21 #[doc = ""]
22 #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaConfiguration`*"]
23 #[wasm_bindgen(method, setter = "audio")]
24 pub fn set_audio(this: &MediaConfiguration, val: &AudioConfiguration);
25 #[cfg(feature = "VideoConfiguration")]
26 #[doc = "Get the `video` field of this object."]
27 #[doc = ""]
28 #[doc = "*This API requires the following crate features to be activated: `MediaConfiguration`, `VideoConfiguration`*"]
29 #[wasm_bindgen(method, getter = "video")]
30 pub fn get_video(this: &MediaConfiguration) -> Option<VideoConfiguration>;
31 #[cfg(feature = "VideoConfiguration")]
32 #[doc = "Change the `video` field of this object."]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `MediaConfiguration`, `VideoConfiguration`*"]
35 #[wasm_bindgen(method, setter = "video")]
36 pub fn set_video(this: &MediaConfiguration, val: &VideoConfiguration);
37}
38impl MediaConfiguration {
39 #[doc = "Construct a new `MediaConfiguration`."]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `MediaConfiguration`*"]
42 pub fn new() -> Self {
43 #[allow(unused_mut)]
44 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
45 ret
46 }
47 #[cfg(feature = "AudioConfiguration")]
48 #[deprecated = "Use `set_audio()` instead."]
49 pub fn audio(&mut self, val: &AudioConfiguration) -> &mut Self {
50 self.set_audio(val);
51 self
52 }
53 #[cfg(feature = "VideoConfiguration")]
54 #[deprecated = "Use `set_video()` instead."]
55 pub fn video(&mut self, val: &VideoConfiguration) -> &mut Self {
56 self.set_video(val);
57 self
58 }
59}
60impl Default for MediaConfiguration {
61 fn default() -> Self {
62 Self::new()
63 }
64}