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