web_sys/features/
gen_AudioDecoder.rs1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[cfg(web_sys_unstable_apis)]
6#[wasm_bindgen]
7extern "C" {
8 # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = AudioDecoder , typescript_type = "AudioDecoder")]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `AudioDecoder` class."]
11 #[doc = ""]
12 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder)"]
13 #[doc = ""]
14 #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`*"]
15 #[doc = ""]
16 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
17 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
18 pub type AudioDecoder;
19 #[cfg(web_sys_unstable_apis)]
20 #[cfg(feature = "CodecState")]
21 # [wasm_bindgen (structural , method , getter , js_class = "AudioDecoder" , js_name = state)]
22 #[doc = "Getter for the `state` field of this object."]
23 #[doc = ""]
24 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/state)"]
25 #[doc = ""]
26 #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`, `CodecState`*"]
27 #[doc = ""]
28 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
29 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
30 pub fn state(this: &AudioDecoder) -> CodecState;
31 #[cfg(web_sys_unstable_apis)]
32 # [wasm_bindgen (structural , method , getter , js_class = "AudioDecoder" , js_name = decodeQueueSize)]
33 #[doc = "Getter for the `decodeQueueSize` field of this object."]
34 #[doc = ""]
35 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/decodeQueueSize)"]
36 #[doc = ""]
37 #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`*"]
38 #[doc = ""]
39 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
40 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
41 pub fn decode_queue_size(this: &AudioDecoder) -> u32;
42 #[cfg(web_sys_unstable_apis)]
43 # [wasm_bindgen (structural , method , getter , js_class = "AudioDecoder" , js_name = ondequeue)]
44 #[doc = "Getter for the `ondequeue` field of this object."]
45 #[doc = ""]
46 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/ondequeue)"]
47 #[doc = ""]
48 #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`*"]
49 #[doc = ""]
50 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
51 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
52 pub fn ondequeue(this: &AudioDecoder) -> Option<::js_sys::Function>;
53 #[cfg(web_sys_unstable_apis)]
54 # [wasm_bindgen (structural , method , setter , js_class = "AudioDecoder" , js_name = ondequeue)]
55 #[doc = "Setter for the `ondequeue` field of this object."]
56 #[doc = ""]
57 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/ondequeue)"]
58 #[doc = ""]
59 #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`*"]
60 #[doc = ""]
61 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
62 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
63 pub fn set_ondequeue(this: &AudioDecoder, value: Option<&::js_sys::Function>);
64 #[cfg(web_sys_unstable_apis)]
65 #[cfg(feature = "AudioDecoderInit")]
66 #[wasm_bindgen(catch, constructor, js_class = "AudioDecoder")]
67 #[doc = "The `new AudioDecoder(..)` constructor, creating a new instance of `AudioDecoder`."]
68 #[doc = ""]
69 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/AudioDecoder)"]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`, `AudioDecoderInit`*"]
72 #[doc = ""]
73 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
74 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
75 pub fn new(init: &AudioDecoderInit) -> Result<AudioDecoder, JsValue>;
76 #[cfg(web_sys_unstable_apis)]
77 # [wasm_bindgen (catch , method , structural , js_class = "AudioDecoder" , js_name = close)]
78 #[doc = "The `close()` method."]
79 #[doc = ""]
80 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/close)"]
81 #[doc = ""]
82 #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`*"]
83 #[doc = ""]
84 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
85 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
86 pub fn close(this: &AudioDecoder) -> Result<(), JsValue>;
87 #[cfg(web_sys_unstable_apis)]
88 #[cfg(feature = "AudioDecoderConfig")]
89 # [wasm_bindgen (catch , method , structural , js_class = "AudioDecoder" , js_name = configure)]
90 #[doc = "The `configure()` method."]
91 #[doc = ""]
92 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/configure)"]
93 #[doc = ""]
94 #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`, `AudioDecoderConfig`*"]
95 #[doc = ""]
96 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
97 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
98 pub fn configure(this: &AudioDecoder, config: &AudioDecoderConfig) -> Result<(), JsValue>;
99 #[cfg(web_sys_unstable_apis)]
100 #[cfg(feature = "EncodedAudioChunk")]
101 # [wasm_bindgen (catch , method , structural , js_class = "AudioDecoder" , js_name = decode)]
102 #[doc = "The `decode()` method."]
103 #[doc = ""]
104 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/decode)"]
105 #[doc = ""]
106 #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`, `EncodedAudioChunk`*"]
107 #[doc = ""]
108 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
109 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
110 pub fn decode(this: &AudioDecoder, chunk: &EncodedAudioChunk) -> Result<(), JsValue>;
111 #[cfg(web_sys_unstable_apis)]
112 # [wasm_bindgen (method , structural , js_class = "AudioDecoder" , js_name = flush)]
113 #[doc = "The `flush()` method."]
114 #[doc = ""]
115 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/flush)"]
116 #[doc = ""]
117 #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`*"]
118 #[doc = ""]
119 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
120 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
121 pub fn flush(this: &AudioDecoder) -> ::js_sys::Promise<::js_sys::Undefined>;
122 #[cfg(web_sys_unstable_apis)]
123 #[cfg(all(feature = "AudioDecoderConfig", feature = "AudioDecoderSupport",))]
124 # [wasm_bindgen (static_method_of = AudioDecoder , js_class = "AudioDecoder" , js_name = isConfigSupported)]
125 #[doc = "The `isConfigSupported()` method."]
126 #[doc = ""]
127 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/isConfigSupported_static)"]
128 #[doc = ""]
129 #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`, `AudioDecoderConfig`, `AudioDecoderSupport`*"]
130 #[doc = ""]
131 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
132 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
133 pub fn is_config_supported(
134 config: &AudioDecoderConfig,
135 ) -> ::js_sys::Promise<AudioDecoderSupport>;
136 #[cfg(web_sys_unstable_apis)]
137 # [wasm_bindgen (catch , method , structural , js_class = "AudioDecoder" , js_name = reset)]
138 #[doc = "The `reset()` method."]
139 #[doc = ""]
140 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/reset)"]
141 #[doc = ""]
142 #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`*"]
143 #[doc = ""]
144 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
145 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
146 pub fn reset(this: &AudioDecoder) -> Result<(), JsValue>;
147}