web_sys/features/
gen_MediaError.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 = MediaError , typescript_type = "MediaError")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `MediaError` class."]
10 #[doc = ""]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaError)"]
12 #[doc = ""]
13 #[doc = "*This API requires the following crate features to be activated: `MediaError`*"]
14 pub type MediaError;
15 # [wasm_bindgen (structural , method , getter , js_class = "MediaError" , js_name = code)]
16 #[doc = "Getter for the `code` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaError/code)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `MediaError`*"]
21 pub fn code(this: &MediaError) -> u16;
22 # [wasm_bindgen (structural , method , getter , js_class = "MediaError" , js_name = message)]
23 #[doc = "Getter for the `message` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/MediaError/message)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `MediaError`*"]
28 pub fn message(this: &MediaError) -> ::alloc::string::String;
29}
30impl MediaError {
31 #[doc = "The `MediaError.MEDIA_ERR_ABORTED` const."]
32 #[doc = ""]
33 #[doc = "*This API requires the following crate features to be activated: `MediaError`*"]
34 pub const MEDIA_ERR_ABORTED: u16 = 1u64 as u16;
35 #[doc = "The `MediaError.MEDIA_ERR_NETWORK` const."]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `MediaError`*"]
38 pub const MEDIA_ERR_NETWORK: u16 = 2u64 as u16;
39 #[doc = "The `MediaError.MEDIA_ERR_DECODE` const."]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `MediaError`*"]
42 pub const MEDIA_ERR_DECODE: u16 = 3u64 as u16;
43 #[doc = "The `MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED` const."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `MediaError`*"]
46 pub const MEDIA_ERR_SRC_NOT_SUPPORTED: u16 = 4u64 as u16;
47}