Skip to main content

web_sys/features/
gen_AudioEncoder.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 = EventTarget , extends = :: js_sys :: Object , js_name = AudioEncoder , typescript_type = "AudioEncoder")]
9    #[derive(Debug, Clone, PartialEq, Eq)]
10    #[doc = "The `AudioEncoder` class."]
11    #[doc = ""]
12    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder)"]
13    #[doc = ""]
14    #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`*"]
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 AudioEncoder;
19    #[cfg(web_sys_unstable_apis)]
20    #[cfg(feature = "CodecState")]
21    # [wasm_bindgen (structural , method , getter , js_class = "AudioEncoder" , 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/AudioEncoder/state)"]
25    #[doc = ""]
26    #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`, `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: &AudioEncoder) -> CodecState;
31    #[cfg(web_sys_unstable_apis)]
32    # [wasm_bindgen (structural , method , getter , js_class = "AudioEncoder" , js_name = encodeQueueSize)]
33    #[doc = "Getter for the `encodeQueueSize` field of this object."]
34    #[doc = ""]
35    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/encodeQueueSize)"]
36    #[doc = ""]
37    #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`*"]
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 encode_queue_size(this: &AudioEncoder) -> u32;
42    #[cfg(web_sys_unstable_apis)]
43    # [wasm_bindgen (structural , method , getter , js_class = "AudioEncoder" , 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/AudioEncoder/ondequeue)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`*"]
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: &AudioEncoder) -> Option<::js_sys::Function>;
53    #[cfg(web_sys_unstable_apis)]
54    # [wasm_bindgen (structural , method , setter , js_class = "AudioEncoder" , 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/AudioEncoder/ondequeue)"]
58    #[doc = ""]
59    #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`*"]
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: &AudioEncoder, value: Option<&::js_sys::Function>);
64    #[cfg(web_sys_unstable_apis)]
65    #[cfg(feature = "AudioEncoderInit")]
66    #[wasm_bindgen(catch, constructor, js_class = "AudioEncoder")]
67    #[doc = "The `new AudioEncoder(..)` constructor, creating a new instance of `AudioEncoder`."]
68    #[doc = ""]
69    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/AudioEncoder)"]
70    #[doc = ""]
71    #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`, `AudioEncoderInit`*"]
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: &AudioEncoderInit) -> Result<AudioEncoder, JsValue>;
76    #[cfg(web_sys_unstable_apis)]
77    # [wasm_bindgen (catch , method , structural , js_class = "AudioEncoder" , js_name = close)]
78    #[doc = "The `close()` method."]
79    #[doc = ""]
80    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/close)"]
81    #[doc = ""]
82    #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`*"]
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: &AudioEncoder) -> Result<(), JsValue>;
87    #[cfg(web_sys_unstable_apis)]
88    #[cfg(feature = "AudioEncoderConfig")]
89    # [wasm_bindgen (catch , method , structural , js_class = "AudioEncoder" , js_name = configure)]
90    #[doc = "The `configure()` method."]
91    #[doc = ""]
92    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/configure)"]
93    #[doc = ""]
94    #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`, `AudioEncoderConfig`*"]
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: &AudioEncoder, config: &AudioEncoderConfig) -> Result<(), JsValue>;
99    #[cfg(web_sys_unstable_apis)]
100    #[cfg(feature = "AudioData")]
101    # [wasm_bindgen (catch , method , structural , js_class = "AudioEncoder" , js_name = encode)]
102    #[doc = "The `encode()` method."]
103    #[doc = ""]
104    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/encode)"]
105    #[doc = ""]
106    #[doc = "*This API requires the following crate features to be activated: `AudioData`, `AudioEncoder`*"]
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 encode(this: &AudioEncoder, data: &AudioData) -> Result<(), JsValue>;
111    #[cfg(web_sys_unstable_apis)]
112    # [wasm_bindgen (method , structural , js_class = "AudioEncoder" , js_name = flush)]
113    #[doc = "The `flush()` method."]
114    #[doc = ""]
115    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/flush)"]
116    #[doc = ""]
117    #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`*"]
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: &AudioEncoder) -> ::js_sys::Promise<::js_sys::Undefined>;
122    #[cfg(web_sys_unstable_apis)]
123    #[cfg(all(feature = "AudioEncoderConfig", feature = "AudioEncoderSupport",))]
124    # [wasm_bindgen (static_method_of = AudioEncoder , js_class = "AudioEncoder" , js_name = isConfigSupported)]
125    #[doc = "The `isConfigSupported()` method."]
126    #[doc = ""]
127    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/isConfigSupported_static)"]
128    #[doc = ""]
129    #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`, `AudioEncoderConfig`, `AudioEncoderSupport`*"]
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: &AudioEncoderConfig,
135    ) -> ::js_sys::Promise<AudioEncoderSupport>;
136    #[cfg(web_sys_unstable_apis)]
137    # [wasm_bindgen (catch , method , structural , js_class = "AudioEncoder" , js_name = reset)]
138    #[doc = "The `reset()` method."]
139    #[doc = ""]
140    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/reset)"]
141    #[doc = ""]
142    #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`*"]
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: &AudioEncoder) -> Result<(), JsValue>;
147}