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