web_sys/features/
gen_MediaKeySystemConfiguration.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 = MediaKeySystemConfiguration)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `MediaKeySystemConfiguration` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"]
12 pub type MediaKeySystemConfiguration;
13 #[doc = "Get the `audioCapabilities` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"]
16 #[wasm_bindgen(method, getter = "audioCapabilities")]
17 pub fn get_audio_capabilities(this: &MediaKeySystemConfiguration) -> Option<::js_sys::Array>;
18 #[doc = "Change the `audioCapabilities` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"]
21 #[wasm_bindgen(method, setter = "audioCapabilities")]
22 pub fn set_audio_capabilities(
23 this: &MediaKeySystemConfiguration,
24 val: &::wasm_bindgen::JsValue,
25 );
26 #[cfg(feature = "MediaKeysRequirement")]
27 #[doc = "Get the `distinctiveIdentifier` field of this object."]
28 #[doc = ""]
29 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"]
30 #[wasm_bindgen(method, getter = "distinctiveIdentifier")]
31 pub fn get_distinctive_identifier(
32 this: &MediaKeySystemConfiguration,
33 ) -> Option<MediaKeysRequirement>;
34 #[cfg(feature = "MediaKeysRequirement")]
35 #[doc = "Change the `distinctiveIdentifier` field of this object."]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"]
38 #[wasm_bindgen(method, setter = "distinctiveIdentifier")]
39 pub fn set_distinctive_identifier(
40 this: &MediaKeySystemConfiguration,
41 val: MediaKeysRequirement,
42 );
43 #[doc = "Get the `initDataTypes` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"]
46 #[wasm_bindgen(method, getter = "initDataTypes")]
47 pub fn get_init_data_types(this: &MediaKeySystemConfiguration) -> Option<::js_sys::Array>;
48 #[doc = "Change the `initDataTypes` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"]
51 #[wasm_bindgen(method, setter = "initDataTypes")]
52 pub fn set_init_data_types(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue);
53 #[doc = "Get the `label` field of this object."]
54 #[doc = ""]
55 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"]
56 #[wasm_bindgen(method, getter = "label")]
57 pub fn get_label(this: &MediaKeySystemConfiguration) -> Option<::alloc::string::String>;
58 #[doc = "Change the `label` field of this object."]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"]
61 #[wasm_bindgen(method, setter = "label")]
62 pub fn set_label(this: &MediaKeySystemConfiguration, val: &str);
63 #[cfg(feature = "MediaKeysRequirement")]
64 #[doc = "Get the `persistentState` field of this object."]
65 #[doc = ""]
66 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"]
67 #[wasm_bindgen(method, getter = "persistentState")]
68 pub fn get_persistent_state(this: &MediaKeySystemConfiguration)
69 -> Option<MediaKeysRequirement>;
70 #[cfg(feature = "MediaKeysRequirement")]
71 #[doc = "Change the `persistentState` field of this object."]
72 #[doc = ""]
73 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`, `MediaKeysRequirement`*"]
74 #[wasm_bindgen(method, setter = "persistentState")]
75 pub fn set_persistent_state(this: &MediaKeySystemConfiguration, val: MediaKeysRequirement);
76 #[doc = "Get the `sessionTypes` field of this object."]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"]
79 #[wasm_bindgen(method, getter = "sessionTypes")]
80 pub fn get_session_types(this: &MediaKeySystemConfiguration) -> Option<::js_sys::Array>;
81 #[doc = "Change the `sessionTypes` field of this object."]
82 #[doc = ""]
83 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"]
84 #[wasm_bindgen(method, setter = "sessionTypes")]
85 pub fn set_session_types(this: &MediaKeySystemConfiguration, val: &::wasm_bindgen::JsValue);
86 #[doc = "Get the `videoCapabilities` field of this object."]
87 #[doc = ""]
88 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"]
89 #[wasm_bindgen(method, getter = "videoCapabilities")]
90 pub fn get_video_capabilities(this: &MediaKeySystemConfiguration) -> Option<::js_sys::Array>;
91 #[doc = "Change the `videoCapabilities` field of this object."]
92 #[doc = ""]
93 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"]
94 #[wasm_bindgen(method, setter = "videoCapabilities")]
95 pub fn set_video_capabilities(
96 this: &MediaKeySystemConfiguration,
97 val: &::wasm_bindgen::JsValue,
98 );
99}
100impl MediaKeySystemConfiguration {
101 #[doc = "Construct a new `MediaKeySystemConfiguration`."]
102 #[doc = ""]
103 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemConfiguration`*"]
104 pub fn new() -> Self {
105 #[allow(unused_mut)]
106 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
107 ret
108 }
109 #[deprecated = "Use `set_audio_capabilities()` instead."]
110 pub fn audio_capabilities(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
111 self.set_audio_capabilities(val);
112 self
113 }
114 #[cfg(feature = "MediaKeysRequirement")]
115 #[deprecated = "Use `set_distinctive_identifier()` instead."]
116 pub fn distinctive_identifier(&mut self, val: MediaKeysRequirement) -> &mut Self {
117 self.set_distinctive_identifier(val);
118 self
119 }
120 #[deprecated = "Use `set_init_data_types()` instead."]
121 pub fn init_data_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
122 self.set_init_data_types(val);
123 self
124 }
125 #[deprecated = "Use `set_label()` instead."]
126 pub fn label(&mut self, val: &str) -> &mut Self {
127 self.set_label(val);
128 self
129 }
130 #[cfg(feature = "MediaKeysRequirement")]
131 #[deprecated = "Use `set_persistent_state()` instead."]
132 pub fn persistent_state(&mut self, val: MediaKeysRequirement) -> &mut Self {
133 self.set_persistent_state(val);
134 self
135 }
136 #[deprecated = "Use `set_session_types()` instead."]
137 pub fn session_types(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
138 self.set_session_types(val);
139 self
140 }
141 #[deprecated = "Use `set_video_capabilities()` instead."]
142 pub fn video_capabilities(&mut self, val: &::wasm_bindgen::JsValue) -> &mut Self {
143 self.set_video_capabilities(val);
144 self
145 }
146}
147impl Default for MediaKeySystemConfiguration {
148 fn default() -> Self {
149 Self::new()
150 }
151}