web_sys/features/
gen_EncodedAudioChunk.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 = "::js_sys::Object",
10 js_name = "EncodedAudioChunk",
11 typescript_type = "EncodedAudioChunk"
12 )]
13 #[derive(Debug, Clone, PartialEq, Eq)]
14 #[doc = "The `EncodedAudioChunk` class."]
15 #[doc = ""]
16 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk)"]
17 #[doc = ""]
18 #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`*"]
19 #[doc = ""]
20 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
21 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
22 pub type EncodedAudioChunk;
23 #[cfg(web_sys_unstable_apis)]
24 #[cfg(feature = "EncodedAudioChunkType")]
25 #[wasm_bindgen(method, getter, js_class = "EncodedAudioChunk", js_name = "type")]
26 #[doc = "Getter for the `type` field of this object."]
27 #[doc = ""]
28 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/type)"]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`, `EncodedAudioChunkType`*"]
31 #[doc = ""]
32 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
33 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
34 pub fn type_(this: &EncodedAudioChunk) -> EncodedAudioChunkType;
35 #[cfg(web_sys_unstable_apis)]
36 #[wasm_bindgen(method, getter, js_class = "EncodedAudioChunk", js_name = "timestamp")]
37 #[doc = "Getter for the `timestamp` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/timestamp)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`*"]
42 #[doc = ""]
43 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
44 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
45 pub fn timestamp(this: &EncodedAudioChunk) -> f64;
46 #[cfg(web_sys_unstable_apis)]
47 #[wasm_bindgen(method, getter, js_class = "EncodedAudioChunk", js_name = "duration")]
48 #[doc = "Getter for the `duration` field of this object."]
49 #[doc = ""]
50 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/duration)"]
51 #[doc = ""]
52 #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`*"]
53 #[doc = ""]
54 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
55 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
56 pub fn duration(this: &EncodedAudioChunk) -> Option<f64>;
57 #[cfg(web_sys_unstable_apis)]
58 #[wasm_bindgen(method, getter, js_class = "EncodedAudioChunk", js_name = "byteLength")]
59 #[doc = "Getter for the `byteLength` field of this object."]
60 #[doc = ""]
61 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/byteLength)"]
62 #[doc = ""]
63 #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`*"]
64 #[doc = ""]
65 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
66 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
67 pub fn byte_length(this: &EncodedAudioChunk) -> u32;
68 #[cfg(web_sys_unstable_apis)]
69 #[cfg(feature = "EncodedAudioChunkInit")]
70 #[wasm_bindgen(catch, constructor, js_class = "EncodedAudioChunk")]
71 #[doc = "The `new EncodedAudioChunk(..)` constructor, creating a new instance of `EncodedAudioChunk`."]
72 #[doc = ""]
73 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/EncodedAudioChunk)"]
74 #[doc = ""]
75 #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`, `EncodedAudioChunkInit`*"]
76 #[doc = ""]
77 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
78 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
79 pub fn new(init: &EncodedAudioChunkInit) -> Result<EncodedAudioChunk, JsValue>;
80 #[cfg(web_sys_unstable_apis)]
81 #[wasm_bindgen(catch, method, js_class = "EncodedAudioChunk", js_name = "copyTo")]
82 #[doc = "The `copyTo()` method."]
83 #[doc = ""]
84 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/copyTo)"]
85 #[doc = ""]
86 #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`*"]
87 #[doc = ""]
88 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
89 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
90 pub fn copy_to_with_buffer_source(
91 this: &EncodedAudioChunk,
92 destination: &::js_sys::Object,
93 ) -> Result<(), JsValue>;
94 #[cfg(web_sys_unstable_apis)]
95 #[wasm_bindgen(catch, method, js_class = "EncodedAudioChunk", js_name = "copyTo")]
96 #[doc = "The `copyTo()` method."]
97 #[doc = ""]
98 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/copyTo)"]
99 #[doc = ""]
100 #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`*"]
101 #[doc = ""]
102 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
103 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
104 pub fn copy_to_with_u8_slice(
105 this: &EncodedAudioChunk,
106 destination: &mut [u8],
107 ) -> Result<(), JsValue>;
108 #[cfg(web_sys_unstable_apis)]
109 #[wasm_bindgen(catch, method, js_class = "EncodedAudioChunk", js_name = "copyTo")]
110 #[doc = "The `copyTo()` method."]
111 #[doc = ""]
112 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/EncodedAudioChunk/copyTo)"]
113 #[doc = ""]
114 #[doc = "*This API requires the following crate features to be activated: `EncodedAudioChunk`*"]
115 #[doc = ""]
116 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
117 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
118 pub fn copy_to_with_u8_array(
119 this: &EncodedAudioChunk,
120 destination: &::js_sys::Uint8Array,
121 ) -> Result<(), JsValue>;
122}