web_sys/features/
gen_AudioEncoder.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 = :: 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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
41 pub fn encode_queue_size(this: &AudioEncoder) -> u32;
42 #[cfg(web_sys_unstable_apis)]
43 #[cfg(feature = "AudioEncoderInit")]
44 #[wasm_bindgen(catch, constructor, js_class = "AudioEncoder")]
45 #[doc = "The `new AudioEncoder(..)` constructor, creating a new instance of `AudioEncoder`."]
46 #[doc = ""]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/AudioEncoder)"]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`, `AudioEncoderInit`*"]
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: &AudioEncoderInit) -> Result<AudioEncoder, JsValue>;
54 #[cfg(web_sys_unstable_apis)]
55 # [wasm_bindgen (catch , method , structural , js_class = "AudioEncoder" , js_name = close)]
56 #[doc = "The `close()` method."]
57 #[doc = ""]
58 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/close)"]
59 #[doc = ""]
60 #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`*"]
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: &AudioEncoder) -> Result<(), JsValue>;
65 #[cfg(web_sys_unstable_apis)]
66 #[cfg(feature = "AudioEncoderConfig")]
67 # [wasm_bindgen (catch , method , structural , js_class = "AudioEncoder" , js_name = configure)]
68 #[doc = "The `configure()` method."]
69 #[doc = ""]
70 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/configure)"]
71 #[doc = ""]
72 #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`, `AudioEncoderConfig`*"]
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: &AudioEncoder, config: &AudioEncoderConfig) -> Result<(), JsValue>;
77 #[cfg(web_sys_unstable_apis)]
78 #[cfg(feature = "AudioData")]
79 # [wasm_bindgen (catch , method , structural , js_class = "AudioEncoder" , js_name = encode)]
80 #[doc = "The `encode()` method."]
81 #[doc = ""]
82 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/encode)"]
83 #[doc = ""]
84 #[doc = "*This API requires the following crate features to be activated: `AudioData`, `AudioEncoder`*"]
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 encode(this: &AudioEncoder, data: &AudioData) -> Result<(), JsValue>;
89 #[cfg(web_sys_unstable_apis)]
90 # [wasm_bindgen (method , structural , js_class = "AudioEncoder" , js_name = flush)]
91 #[doc = "The `flush()` method."]
92 #[doc = ""]
93 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/flush)"]
94 #[doc = ""]
95 #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`*"]
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: &AudioEncoder) -> ::js_sys::Promise;
100 #[cfg(web_sys_unstable_apis)]
101 #[cfg(feature = "AudioEncoderConfig")]
102 # [wasm_bindgen (static_method_of = AudioEncoder , js_class = "AudioEncoder" , js_name = isConfigSupported)]
103 #[doc = "The `isConfigSupported()` method."]
104 #[doc = ""]
105 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/isConfigSupported_static)"]
106 #[doc = ""]
107 #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`, `AudioEncoderConfig`*"]
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: &AudioEncoderConfig) -> ::js_sys::Promise;
112 #[cfg(web_sys_unstable_apis)]
113 # [wasm_bindgen (catch , method , structural , js_class = "AudioEncoder" , js_name = reset)]
114 #[doc = "The `reset()` method."]
115 #[doc = ""]
116 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/AudioEncoder/reset)"]
117 #[doc = ""]
118 #[doc = "*This API requires the following crate features to be activated: `AudioEncoder`*"]
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: &AudioEncoder) -> Result<(), JsValue>;
123}