1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[wasm_bindgen]
5 extern "C" {
6     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = MediaKeys , typescript_type = "MediaKeys")]
7     #[derive(Debug, Clone, PartialEq, Eq)]
8     #[doc = "The `MediaKeys` class."]
9     #[doc = ""]
10     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeys)"]
11     #[doc = ""]
12     #[doc = "*This API requires the following crate features to be activated: `MediaKeys`*"]
13     pub type MediaKeys;
14     # [wasm_bindgen (structural , method , getter , js_class = "MediaKeys" , js_name = keySystem)]
15     #[doc = "Getter for the `keySystem` field of this object."]
16     #[doc = ""]
17     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeys/keySystem)"]
18     #[doc = ""]
19     #[doc = "*This API requires the following crate features to be activated: `MediaKeys`*"]
key_system(this: &MediaKeys) -> String20     pub fn key_system(this: &MediaKeys) -> String;
21     #[cfg(feature = "MediaKeySession")]
22     # [wasm_bindgen (catch , method , structural , js_class = "MediaKeys" , js_name = createSession)]
23     #[doc = "The `createSession()` method."]
24     #[doc = ""]
25     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeys/createSession)"]
26     #[doc = ""]
27     #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`, `MediaKeys`*"]
create_session(this: &MediaKeys) -> Result<MediaKeySession, JsValue>28     pub fn create_session(this: &MediaKeys) -> Result<MediaKeySession, JsValue>;
29     #[cfg(all(feature = "MediaKeySession", feature = "MediaKeySessionType",))]
30     # [wasm_bindgen (catch , method , structural , js_class = "MediaKeys" , js_name = createSession)]
31     #[doc = "The `createSession()` method."]
32     #[doc = ""]
33     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeys/createSession)"]
34     #[doc = ""]
35     #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`, `MediaKeySessionType`, `MediaKeys`*"]
create_session_with_session_type( this: &MediaKeys, session_type: MediaKeySessionType, ) -> Result<MediaKeySession, JsValue>36     pub fn create_session_with_session_type(
37         this: &MediaKeys,
38         session_type: MediaKeySessionType,
39     ) -> Result<MediaKeySession, JsValue>;
40     # [wasm_bindgen (method , structural , js_class = "MediaKeys" , js_name = getStatusForPolicy)]
41     #[doc = "The `getStatusForPolicy()` method."]
42     #[doc = ""]
43     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeys/getStatusForPolicy)"]
44     #[doc = ""]
45     #[doc = "*This API requires the following crate features to be activated: `MediaKeys`*"]
get_status_for_policy(this: &MediaKeys) -> ::js_sys::Promise46     pub fn get_status_for_policy(this: &MediaKeys) -> ::js_sys::Promise;
47     #[cfg(feature = "MediaKeysPolicy")]
48     # [wasm_bindgen (method , structural , js_class = "MediaKeys" , js_name = getStatusForPolicy)]
49     #[doc = "The `getStatusForPolicy()` method."]
50     #[doc = ""]
51     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeys/getStatusForPolicy)"]
52     #[doc = ""]
53     #[doc = "*This API requires the following crate features to be activated: `MediaKeys`, `MediaKeysPolicy`*"]
get_status_for_policy_with_policy( this: &MediaKeys, policy: &MediaKeysPolicy, ) -> ::js_sys::Promise54     pub fn get_status_for_policy_with_policy(
55         this: &MediaKeys,
56         policy: &MediaKeysPolicy,
57     ) -> ::js_sys::Promise;
58     # [wasm_bindgen (method , structural , js_class = "MediaKeys" , js_name = setServerCertificate)]
59     #[doc = "The `setServerCertificate()` method."]
60     #[doc = ""]
61     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeys/setServerCertificate)"]
62     #[doc = ""]
63     #[doc = "*This API requires the following crate features to be activated: `MediaKeys`*"]
set_server_certificate_with_buffer_source( this: &MediaKeys, server_certificate: &::js_sys::Object, ) -> ::js_sys::Promise64     pub fn set_server_certificate_with_buffer_source(
65         this: &MediaKeys,
66         server_certificate: &::js_sys::Object,
67     ) -> ::js_sys::Promise;
68     # [wasm_bindgen (method , structural , js_class = "MediaKeys" , js_name = setServerCertificate)]
69     #[doc = "The `setServerCertificate()` method."]
70     #[doc = ""]
71     #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeys/setServerCertificate)"]
72     #[doc = ""]
73     #[doc = "*This API requires the following crate features to be activated: `MediaKeys`*"]
set_server_certificate_with_u8_array( this: &MediaKeys, server_certificate: &mut [u8], ) -> ::js_sys::Promise74     pub fn set_server_certificate_with_u8_array(
75         this: &MediaKeys,
76         server_certificate: &mut [u8],
77     ) -> ::js_sys::Promise;
78 }
79