]> git.proxmox.com Git - rustc.git/blame - vendor/web-sys/src/features/gen_MediaEncodingConfiguration.rs
New upstream version 1.72.1+dfsg1
[rustc.git] / vendor / web-sys / src / features / gen_MediaEncodingConfiguration.rs
CommitLineData
49aad941 1#![allow(unused_imports)]
fe692bf9 2#![allow(clippy::all)]
49aad941
FG
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 # [wasm_bindgen (extends = :: js_sys :: Object , js_name = MediaEncodingConfiguration)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `MediaEncodingConfiguration` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`*"]
12 pub type MediaEncodingConfiguration;
13}
14impl MediaEncodingConfiguration {
15 #[cfg(feature = "MediaEncodingType")]
16 #[doc = "Construct a new `MediaEncodingConfiguration`."]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `MediaEncodingType`*"]
19 pub fn new(type_: MediaEncodingType) -> Self {
20 #[allow(unused_mut)]
21 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
22 ret.type_(type_);
23 ret
24 }
25 #[cfg(feature = "AudioConfiguration")]
26 #[doc = "Change the `audio` field of this object."]
27 #[doc = ""]
28 #[doc = "*This API requires the following crate features to be activated: `AudioConfiguration`, `MediaEncodingConfiguration`*"]
29 pub fn audio(&mut self, val: &AudioConfiguration) -> &mut Self {
30 use wasm_bindgen::JsValue;
31 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("audio"), &JsValue::from(val));
32 debug_assert!(
33 r.is_ok(),
34 "setting properties should never fail on our dictionary objects"
35 );
36 let _ = r;
37 self
38 }
39 #[cfg(feature = "VideoConfiguration")]
40 #[doc = "Change the `video` field of this object."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `VideoConfiguration`*"]
43 pub fn video(&mut self, val: &VideoConfiguration) -> &mut Self {
44 use wasm_bindgen::JsValue;
45 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("video"), &JsValue::from(val));
46 debug_assert!(
47 r.is_ok(),
48 "setting properties should never fail on our dictionary objects"
49 );
50 let _ = r;
51 self
52 }
53 #[cfg(feature = "MediaEncodingType")]
54 #[doc = "Change the `type` field of this object."]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `MediaEncodingConfiguration`, `MediaEncodingType`*"]
57 pub fn type_(&mut self, val: MediaEncodingType) -> &mut Self {
58 use wasm_bindgen::JsValue;
59 let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("type"), &JsValue::from(val));
60 debug_assert!(
61 r.is_ok(),
62 "setting properties should never fail on our dictionary objects"
63 );
64 let _ = r;
65 self
66 }
67}