web_sys/features/
gen_MediaKeySession.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = MediaKeySession , typescript_type = "MediaKeySession")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `MediaKeySession` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
14    pub type MediaKeySession;
15    #[cfg(feature = "MediaKeyError")]
16    # [wasm_bindgen (structural , method , getter , js_class = "MediaKeySession" , js_name = error)]
17    #[doc = "Getter for the `error` field of this object."]
18    #[doc = ""]
19    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/error)"]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `MediaKeyError`, `MediaKeySession`*"]
22    pub fn error(this: &MediaKeySession) -> Option<MediaKeyError>;
23    # [wasm_bindgen (structural , method , getter , js_class = "MediaKeySession" , js_name = sessionId)]
24    #[doc = "Getter for the `sessionId` field of this object."]
25    #[doc = ""]
26    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/sessionId)"]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
29    pub fn session_id(this: &MediaKeySession) -> ::alloc::string::String;
30    # [wasm_bindgen (structural , method , getter , js_class = "MediaKeySession" , js_name = expiration)]
31    #[doc = "Getter for the `expiration` field of this object."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/expiration)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
36    pub fn expiration(this: &MediaKeySession) -> f64;
37    # [wasm_bindgen (structural , method , getter , js_class = "MediaKeySession" , js_name = closed)]
38    #[doc = "Getter for the `closed` field of this object."]
39    #[doc = ""]
40    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/closed)"]
41    #[doc = ""]
42    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
43    pub fn closed(this: &MediaKeySession) -> ::js_sys::Promise;
44    #[cfg(feature = "MediaKeyStatusMap")]
45    # [wasm_bindgen (structural , method , getter , js_class = "MediaKeySession" , js_name = keyStatuses)]
46    #[doc = "Getter for the `keyStatuses` field of this object."]
47    #[doc = ""]
48    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/keyStatuses)"]
49    #[doc = ""]
50    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`, `MediaKeyStatusMap`*"]
51    pub fn key_statuses(this: &MediaKeySession) -> MediaKeyStatusMap;
52    # [wasm_bindgen (structural , method , getter , js_class = "MediaKeySession" , js_name = onkeystatuseschange)]
53    #[doc = "Getter for the `onkeystatuseschange` field of this object."]
54    #[doc = ""]
55    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/onkeystatuseschange)"]
56    #[doc = ""]
57    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
58    pub fn onkeystatuseschange(this: &MediaKeySession) -> Option<::js_sys::Function>;
59    # [wasm_bindgen (structural , method , setter , js_class = "MediaKeySession" , js_name = onkeystatuseschange)]
60    #[doc = "Setter for the `onkeystatuseschange` field of this object."]
61    #[doc = ""]
62    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/onkeystatuseschange)"]
63    #[doc = ""]
64    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
65    pub fn set_onkeystatuseschange(this: &MediaKeySession, value: Option<&::js_sys::Function>);
66    # [wasm_bindgen (structural , method , getter , js_class = "MediaKeySession" , js_name = onmessage)]
67    #[doc = "Getter for the `onmessage` field of this object."]
68    #[doc = ""]
69    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/onmessage)"]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
72    pub fn onmessage(this: &MediaKeySession) -> Option<::js_sys::Function>;
73    # [wasm_bindgen (structural , method , setter , js_class = "MediaKeySession" , js_name = onmessage)]
74    #[doc = "Setter for the `onmessage` field of this object."]
75    #[doc = ""]
76    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/onmessage)"]
77    #[doc = ""]
78    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
79    pub fn set_onmessage(this: &MediaKeySession, value: Option<&::js_sys::Function>);
80    # [wasm_bindgen (method , structural , js_class = "MediaKeySession" , js_name = close)]
81    #[doc = "The `close()` method."]
82    #[doc = ""]
83    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/close)"]
84    #[doc = ""]
85    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
86    pub fn close(this: &MediaKeySession) -> ::js_sys::Promise;
87    # [wasm_bindgen (method , structural , js_class = "MediaKeySession" , js_name = generateRequest)]
88    #[doc = "The `generateRequest()` method."]
89    #[doc = ""]
90    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/generateRequest)"]
91    #[doc = ""]
92    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
93    pub fn generate_request_with_buffer_source(
94        this: &MediaKeySession,
95        init_data_type: &str,
96        init_data: &::js_sys::Object,
97    ) -> ::js_sys::Promise;
98    # [wasm_bindgen (method , structural , js_class = "MediaKeySession" , js_name = generateRequest)]
99    #[doc = "The `generateRequest()` method."]
100    #[doc = ""]
101    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/generateRequest)"]
102    #[doc = ""]
103    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
104    pub fn generate_request_with_u8_array(
105        this: &MediaKeySession,
106        init_data_type: &str,
107        init_data: &mut [u8],
108    ) -> ::js_sys::Promise;
109    # [wasm_bindgen (method , structural , js_class = "MediaKeySession" , js_name = generateRequest)]
110    #[doc = "The `generateRequest()` method."]
111    #[doc = ""]
112    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/generateRequest)"]
113    #[doc = ""]
114    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
115    pub fn generate_request_with_js_u8_array(
116        this: &MediaKeySession,
117        init_data_type: &str,
118        init_data: &::js_sys::Uint8Array,
119    ) -> ::js_sys::Promise;
120    # [wasm_bindgen (method , structural , js_class = "MediaKeySession" , js_name = load)]
121    #[doc = "The `load()` method."]
122    #[doc = ""]
123    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/load)"]
124    #[doc = ""]
125    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
126    pub fn load(this: &MediaKeySession, session_id: &str) -> ::js_sys::Promise;
127    # [wasm_bindgen (method , structural , js_class = "MediaKeySession" , js_name = remove)]
128    #[doc = "The `remove()` method."]
129    #[doc = ""]
130    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/remove)"]
131    #[doc = ""]
132    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
133    pub fn remove(this: &MediaKeySession) -> ::js_sys::Promise;
134    # [wasm_bindgen (method , structural , js_class = "MediaKeySession" , js_name = update)]
135    #[doc = "The `update()` method."]
136    #[doc = ""]
137    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/update)"]
138    #[doc = ""]
139    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
140    pub fn update_with_buffer_source(
141        this: &MediaKeySession,
142        response: &::js_sys::Object,
143    ) -> ::js_sys::Promise;
144    # [wasm_bindgen (method , structural , js_class = "MediaKeySession" , js_name = update)]
145    #[doc = "The `update()` method."]
146    #[doc = ""]
147    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/update)"]
148    #[doc = ""]
149    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
150    pub fn update_with_u8_array(this: &MediaKeySession, response: &mut [u8]) -> ::js_sys::Promise;
151    # [wasm_bindgen (method , structural , js_class = "MediaKeySession" , js_name = update)]
152    #[doc = "The `update()` method."]
153    #[doc = ""]
154    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaKeySession/update)"]
155    #[doc = ""]
156    #[doc = "*This API requires the following crate features to be activated: `MediaKeySession`*"]
157    pub fn update_with_js_u8_array(
158        this: &MediaKeySession,
159        response: &::js_sys::Uint8Array,
160    ) -> ::js_sys::Promise;
161}