web_sys/features/
gen_EncodedAudioChunkMetadata.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 = EncodedAudioChunkMetadata)]
9 #[derive(Debug, Clone, PartialEq, Eq)]
10 #[doc = "The `EncodedAudioChunkMetadata` dictionary."]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkMetadata`*"]
13 #[doc = ""]
14 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
15 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
16 pub type EncodedAudioChunkMetadata;
17 #[cfg(web_sys_unstable_apis)]
18 #[cfg(feature = "AudioDecoderConfig")]
19 #[doc = "Get the `decoderConfig` field of this object."]
20 #[doc = ""]
21 #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`, `EncodedAudioChunkMetadata`*"]
22 #[doc = ""]
23 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
24 #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
25 #[wasm_bindgen(method, getter = "decoderConfig")]
26 pub fn get_decoder_config(this: &EncodedAudioChunkMetadata) -> Option<AudioDecoderConfig>;
27 #[cfg(web_sys_unstable_apis)]
28 #[cfg(feature = "AudioDecoderConfig")]
29 #[doc = "Change the `decoderConfig` field of this object."]
30 #[doc = ""]
31 #[doc = "*This API requires the following crate features to be activated: `AudioDecoderConfig`, `EncodedAudioChunkMetadata`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
35 #[wasm_bindgen(method, setter = "decoderConfig")]
36 pub fn set_decoder_config(this: &EncodedAudioChunkMetadata, val: &AudioDecoderConfig);
37}
38#[cfg(web_sys_unstable_apis)]
39impl EncodedAudioChunkMetadata {
40 #[doc = "Construct a new `EncodedAudioChunkMetadata`."]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunkMetadata`*"]
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://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*"]
46 pub fn new() -> Self {
47 #[allow(unused_mut)]
48 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
49 ret
50 }
51 #[cfg(web_sys_unstable_apis)]
52 #[cfg(feature = "AudioDecoderConfig")]
53 #[deprecated = "Use `set_decoder_config()` instead."]
54 pub fn decoder_config(&mut self, val: &AudioDecoderConfig) -> &mut Self {
55 self.set_decoder_config(val);
56 self
57 }
58}
59#[cfg(web_sys_unstable_apis)]
60impl Default for EncodedAudioChunkMetadata {
61 fn default() -> Self {
62 Self::new()
63 }
64}