web_sys/features/
gen_AudioDecoder.rs

1#![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 = :: 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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
41    pub fn decode_queue_size(this: &AudioDecoder) -> u32;
42    #[cfg(web_sys_unstable_apis)]
43    #[cfg(feature = "AudioDecoderInit")]
44    #[wasm_bindgen(catch, constructor, js_class = "AudioDecoder")]
45    #[doc = "The `new AudioDecoder(..)` constructor, creating a new instance of `AudioDecoder`."]
46    #[doc = ""]
47    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/AudioDecoder)"]
48    #[doc = ""]
49    #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`, `AudioDecoderInit`*"]
50    #[doc = ""]
51    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
52    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
53    pub fn new(init: &AudioDecoderInit) -> Result<AudioDecoder, JsValue>;
54    #[cfg(web_sys_unstable_apis)]
55    # [wasm_bindgen (catch , method , structural , js_class = "AudioDecoder" , js_name = close)]
56    #[doc = "The `close()` method."]
57    #[doc = ""]
58    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/close)"]
59    #[doc = ""]
60    #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`*"]
61    #[doc = ""]
62    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
63    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
64    pub fn close(this: &AudioDecoder) -> Result<(), JsValue>;
65    #[cfg(web_sys_unstable_apis)]
66    #[cfg(feature = "AudioDecoderConfig")]
67    # [wasm_bindgen (catch , method , structural , js_class = "AudioDecoder" , js_name = configure)]
68    #[doc = "The `configure()` method."]
69    #[doc = ""]
70    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/configure)"]
71    #[doc = ""]
72    #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`, `AudioDecoderConfig`*"]
73    #[doc = ""]
74    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
75    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
76    pub fn configure(this: &AudioDecoder, config: &AudioDecoderConfig) -> Result<(), JsValue>;
77    #[cfg(web_sys_unstable_apis)]
78    #[cfg(feature = "EncodedAudioChunk")]
79    # [wasm_bindgen (catch , method , structural , js_class = "AudioDecoder" , js_name = decode)]
80    #[doc = "The `decode()` method."]
81    #[doc = ""]
82    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/decode)"]
83    #[doc = ""]
84    #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`, `EncodedAudioChunk`*"]
85    #[doc = ""]
86    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
87    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
88    pub fn decode(this: &AudioDecoder, chunk: &EncodedAudioChunk) -> Result<(), JsValue>;
89    #[cfg(web_sys_unstable_apis)]
90    # [wasm_bindgen (method , structural , js_class = "AudioDecoder" , js_name = flush)]
91    #[doc = "The `flush()` method."]
92    #[doc = ""]
93    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/flush)"]
94    #[doc = ""]
95    #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`*"]
96    #[doc = ""]
97    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
98    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
99    pub fn flush(this: &AudioDecoder) -> ::js_sys::Promise;
100    #[cfg(web_sys_unstable_apis)]
101    #[cfg(feature = "AudioDecoderConfig")]
102    # [wasm_bindgen (static_method_of = AudioDecoder , js_class = "AudioDecoder" , js_name = isConfigSupported)]
103    #[doc = "The `isConfigSupported()` method."]
104    #[doc = ""]
105    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/isConfigSupported_static)"]
106    #[doc = ""]
107    #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`, `AudioDecoderConfig`*"]
108    #[doc = ""]
109    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
110    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
111    pub fn is_config_supported(config: &AudioDecoderConfig) -> ::js_sys::Promise;
112    #[cfg(web_sys_unstable_apis)]
113    # [wasm_bindgen (catch , method , structural , js_class = "AudioDecoder" , js_name = reset)]
114    #[doc = "The `reset()` method."]
115    #[doc = ""]
116    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioDecoder/reset)"]
117    #[doc = ""]
118    #[doc = "*This API requires the following crate features to be activated: `AudioDecoder`*"]
119    #[doc = ""]
120    #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
121    #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
122    pub fn reset(this: &AudioDecoder) -> Result<(), JsValue>;
123}