web_sys/features/
gen_MediaEncryptedEvent.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "Event",
9 extends = "::js_sys::Object",
10 js_name = "MediaEncryptedEvent",
11 typescript_type = "MediaEncryptedEvent"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `MediaEncryptedEvent` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaEncryptedEvent)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `MediaEncryptedEvent`*"]
19 pub type MediaEncryptedEvent;
20 #[wasm_bindgen(
21 method,
22 getter,
23 js_class = "MediaEncryptedEvent",
24 js_name = "initDataType"
25 )]
26 #[doc = "Getter for the `initDataType` field of this object."]
27 #[doc = ""]
28 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaEncryptedEvent/initDataType)"]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `MediaEncryptedEvent`*"]
31 pub fn init_data_type(this: &MediaEncryptedEvent) -> ::alloc::string::String;
32 #[wasm_bindgen(
33 catch,
34 method,
35 getter,
36 js_class = "MediaEncryptedEvent",
37 js_name = "initData"
38 )]
39 #[doc = "Getter for the `initData` field of this object."]
40 #[doc = ""]
41 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaEncryptedEvent/initData)"]
42 #[doc = ""]
43 #[doc = "*This API requires the following crate features to be activated: `MediaEncryptedEvent`*"]
44 pub fn init_data(this: &MediaEncryptedEvent) -> Result<Option<::js_sys::ArrayBuffer>, JsValue>;
45 #[wasm_bindgen(catch, constructor, js_class = "MediaEncryptedEvent")]
46 #[doc = "The `new MediaEncryptedEvent(..)` constructor, creating a new instance of `MediaEncryptedEvent`."]
47 #[doc = ""]
48 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaEncryptedEvent/MediaEncryptedEvent)"]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `MediaEncryptedEvent`*"]
51 pub fn new(type_: &str) -> Result<MediaEncryptedEvent, JsValue>;
52 #[cfg(feature = "MediaKeyNeededEventInit")]
53 #[wasm_bindgen(catch, constructor, js_class = "MediaEncryptedEvent")]
54 #[doc = "The `new MediaEncryptedEvent(..)` constructor, creating a new instance of `MediaEncryptedEvent`."]
55 #[doc = ""]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaEncryptedEvent/MediaEncryptedEvent)"]
57 #[doc = ""]
58 #[doc = "*This API requires the following crate features to be activated: `MediaEncryptedEvent`, `MediaKeyNeededEventInit`*"]
59 pub fn new_with_event_init_dict(
60 type_: &str,
61 event_init_dict: &MediaKeyNeededEventInit,
62 ) -> Result<MediaEncryptedEvent, JsValue>;
63}