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