web_sys/features/
gen_MediaKeySystemMediaCapability.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "MediaKeySystemMediaCapability"
10 )]
11 #[derive(Debug, Clone, PartialEq, Eq)]
12 #[doc = "The `MediaKeySystemMediaCapability` dictionary."]
13 #[doc = ""]
14 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"]
15 pub type MediaKeySystemMediaCapability;
16 #[doc = "Get the `contentType` field of this object."]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"]
19 #[wasm_bindgen(method, getter = "contentType")]
20 pub fn get_content_type(
21 this: &MediaKeySystemMediaCapability,
22 ) -> Option<::alloc::string::String>;
23 #[doc = "Change the `contentType` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"]
26 #[wasm_bindgen(method, setter = "contentType")]
27 pub fn set_content_type(this: &MediaKeySystemMediaCapability, val: &str);
28 #[doc = "Get the `robustness` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"]
31 #[wasm_bindgen(method, getter = "robustness")]
32 pub fn get_robustness(this: &MediaKeySystemMediaCapability) -> Option<::alloc::string::String>;
33 #[doc = "Change the `robustness` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"]
36 #[wasm_bindgen(method, setter = "robustness")]
37 pub fn set_robustness(this: &MediaKeySystemMediaCapability, val: &str);
38}
39impl MediaKeySystemMediaCapability {
40 #[doc = "Construct a new `MediaKeySystemMediaCapability`."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `MediaKeySystemMediaCapability`*"]
43 pub fn new() -> Self {
44 #[allow(unused_mut)]
45 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
46 ret
47 }
48 #[deprecated = "Use `set_content_type()` instead."]
49 pub fn content_type(&mut self, val: &str) -> &mut Self {
50 self.set_content_type(val);
51 self
52 }
53 #[deprecated = "Use `set_robustness()` instead."]
54 pub fn robustness(&mut self, val: &str) -> &mut Self {
55 self.set_robustness(val);
56 self
57 }
58}
59impl Default for MediaKeySystemMediaCapability {
60 fn default() -> Self {
61 Self::new()
62 }
63}