web_sys/features/
gen_SourceBuffer.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = EventTarget , extends = :: js_sys :: Object , js_name = SourceBuffer , typescript_type = "SourceBuffer")]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `SourceBuffer` class."]
10    #[doc = ""]
11    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer)"]
12    #[doc = ""]
13    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
14    pub type SourceBuffer;
15    #[cfg(feature = "SourceBufferAppendMode")]
16    # [wasm_bindgen (structural , method , getter , js_class = "SourceBuffer" , js_name = mode)]
17    #[doc = "Getter for the `mode` field of this object."]
18    #[doc = ""]
19    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/mode)"]
20    #[doc = ""]
21    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`, `SourceBufferAppendMode`*"]
22    pub fn mode(this: &SourceBuffer) -> SourceBufferAppendMode;
23    #[cfg(feature = "SourceBufferAppendMode")]
24    # [wasm_bindgen (structural , method , setter , js_class = "SourceBuffer" , js_name = mode)]
25    #[doc = "Setter for the `mode` field of this object."]
26    #[doc = ""]
27    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/mode)"]
28    #[doc = ""]
29    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`, `SourceBufferAppendMode`*"]
30    pub fn set_mode(this: &SourceBuffer, value: SourceBufferAppendMode);
31    # [wasm_bindgen (structural , method , getter , js_class = "SourceBuffer" , js_name = updating)]
32    #[doc = "Getter for the `updating` field of this object."]
33    #[doc = ""]
34    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/updating)"]
35    #[doc = ""]
36    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
37    pub fn updating(this: &SourceBuffer) -> bool;
38    #[cfg(feature = "TimeRanges")]
39    # [wasm_bindgen (structural , catch , method , getter , js_class = "SourceBuffer" , js_name = buffered)]
40    #[doc = "Getter for the `buffered` field of this object."]
41    #[doc = ""]
42    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/buffered)"]
43    #[doc = ""]
44    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`, `TimeRanges`*"]
45    pub fn buffered(this: &SourceBuffer) -> Result<TimeRanges, JsValue>;
46    # [wasm_bindgen (structural , method , getter , js_class = "SourceBuffer" , js_name = timestampOffset)]
47    #[doc = "Getter for the `timestampOffset` field of this object."]
48    #[doc = ""]
49    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/timestampOffset)"]
50    #[doc = ""]
51    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
52    pub fn timestamp_offset(this: &SourceBuffer) -> f64;
53    # [wasm_bindgen (structural , method , setter , js_class = "SourceBuffer" , js_name = timestampOffset)]
54    #[doc = "Setter for the `timestampOffset` field of this object."]
55    #[doc = ""]
56    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/timestampOffset)"]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
59    pub fn set_timestamp_offset(this: &SourceBuffer, value: f64);
60    #[cfg(feature = "AudioTrackList")]
61    # [wasm_bindgen (structural , method , getter , js_class = "SourceBuffer" , js_name = audioTracks)]
62    #[doc = "Getter for the `audioTracks` field of this object."]
63    #[doc = ""]
64    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/audioTracks)"]
65    #[doc = ""]
66    #[doc = "*This API requires the following crate features to be activated: `AudioTrackList`, `SourceBuffer`*"]
67    pub fn audio_tracks(this: &SourceBuffer) -> AudioTrackList;
68    #[cfg(feature = "VideoTrackList")]
69    # [wasm_bindgen (structural , method , getter , js_class = "SourceBuffer" , js_name = videoTracks)]
70    #[doc = "Getter for the `videoTracks` field of this object."]
71    #[doc = ""]
72    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/videoTracks)"]
73    #[doc = ""]
74    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`, `VideoTrackList`*"]
75    pub fn video_tracks(this: &SourceBuffer) -> VideoTrackList;
76    #[cfg(feature = "TextTrackList")]
77    # [wasm_bindgen (structural , method , getter , js_class = "SourceBuffer" , js_name = textTracks)]
78    #[doc = "Getter for the `textTracks` field of this object."]
79    #[doc = ""]
80    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/textTracks)"]
81    #[doc = ""]
82    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`, `TextTrackList`*"]
83    pub fn text_tracks(this: &SourceBuffer) -> TextTrackList;
84    # [wasm_bindgen (structural , method , getter , js_class = "SourceBuffer" , js_name = appendWindowStart)]
85    #[doc = "Getter for the `appendWindowStart` field of this object."]
86    #[doc = ""]
87    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendWindowStart)"]
88    #[doc = ""]
89    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
90    pub fn append_window_start(this: &SourceBuffer) -> f64;
91    # [wasm_bindgen (structural , method , setter , js_class = "SourceBuffer" , js_name = appendWindowStart)]
92    #[doc = "Setter for the `appendWindowStart` field of this object."]
93    #[doc = ""]
94    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendWindowStart)"]
95    #[doc = ""]
96    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
97    pub fn set_append_window_start(this: &SourceBuffer, value: f64);
98    # [wasm_bindgen (structural , method , getter , js_class = "SourceBuffer" , js_name = appendWindowEnd)]
99    #[doc = "Getter for the `appendWindowEnd` field of this object."]
100    #[doc = ""]
101    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendWindowEnd)"]
102    #[doc = ""]
103    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
104    pub fn append_window_end(this: &SourceBuffer) -> f64;
105    # [wasm_bindgen (structural , method , setter , js_class = "SourceBuffer" , js_name = appendWindowEnd)]
106    #[doc = "Setter for the `appendWindowEnd` field of this object."]
107    #[doc = ""]
108    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendWindowEnd)"]
109    #[doc = ""]
110    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
111    pub fn set_append_window_end(this: &SourceBuffer, value: f64);
112    # [wasm_bindgen (structural , method , getter , js_class = "SourceBuffer" , js_name = onupdatestart)]
113    #[doc = "Getter for the `onupdatestart` field of this object."]
114    #[doc = ""]
115    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/onupdatestart)"]
116    #[doc = ""]
117    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
118    pub fn onupdatestart(this: &SourceBuffer) -> Option<::js_sys::Function>;
119    # [wasm_bindgen (structural , method , setter , js_class = "SourceBuffer" , js_name = onupdatestart)]
120    #[doc = "Setter for the `onupdatestart` field of this object."]
121    #[doc = ""]
122    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/onupdatestart)"]
123    #[doc = ""]
124    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
125    pub fn set_onupdatestart(this: &SourceBuffer, value: Option<&::js_sys::Function>);
126    # [wasm_bindgen (structural , method , getter , js_class = "SourceBuffer" , js_name = onupdate)]
127    #[doc = "Getter for the `onupdate` field of this object."]
128    #[doc = ""]
129    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/onupdate)"]
130    #[doc = ""]
131    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
132    pub fn onupdate(this: &SourceBuffer) -> Option<::js_sys::Function>;
133    # [wasm_bindgen (structural , method , setter , js_class = "SourceBuffer" , js_name = onupdate)]
134    #[doc = "Setter for the `onupdate` field of this object."]
135    #[doc = ""]
136    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/onupdate)"]
137    #[doc = ""]
138    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
139    pub fn set_onupdate(this: &SourceBuffer, value: Option<&::js_sys::Function>);
140    # [wasm_bindgen (structural , method , getter , js_class = "SourceBuffer" , js_name = onupdateend)]
141    #[doc = "Getter for the `onupdateend` field of this object."]
142    #[doc = ""]
143    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/onupdateend)"]
144    #[doc = ""]
145    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
146    pub fn onupdateend(this: &SourceBuffer) -> Option<::js_sys::Function>;
147    # [wasm_bindgen (structural , method , setter , js_class = "SourceBuffer" , js_name = onupdateend)]
148    #[doc = "Setter for the `onupdateend` field of this object."]
149    #[doc = ""]
150    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/onupdateend)"]
151    #[doc = ""]
152    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
153    pub fn set_onupdateend(this: &SourceBuffer, value: Option<&::js_sys::Function>);
154    # [wasm_bindgen (structural , method , getter , js_class = "SourceBuffer" , js_name = onerror)]
155    #[doc = "Getter for the `onerror` field of this object."]
156    #[doc = ""]
157    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/onerror)"]
158    #[doc = ""]
159    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
160    pub fn onerror(this: &SourceBuffer) -> Option<::js_sys::Function>;
161    # [wasm_bindgen (structural , method , setter , js_class = "SourceBuffer" , js_name = onerror)]
162    #[doc = "Setter for the `onerror` field of this object."]
163    #[doc = ""]
164    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/onerror)"]
165    #[doc = ""]
166    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
167    pub fn set_onerror(this: &SourceBuffer, value: Option<&::js_sys::Function>);
168    # [wasm_bindgen (structural , method , getter , js_class = "SourceBuffer" , js_name = onabort)]
169    #[doc = "Getter for the `onabort` field of this object."]
170    #[doc = ""]
171    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/onabort)"]
172    #[doc = ""]
173    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
174    pub fn onabort(this: &SourceBuffer) -> Option<::js_sys::Function>;
175    # [wasm_bindgen (structural , method , setter , js_class = "SourceBuffer" , js_name = onabort)]
176    #[doc = "Setter for the `onabort` field of this object."]
177    #[doc = ""]
178    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/onabort)"]
179    #[doc = ""]
180    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
181    pub fn set_onabort(this: &SourceBuffer, value: Option<&::js_sys::Function>);
182    # [wasm_bindgen (catch , method , structural , js_class = "SourceBuffer" , js_name = abort)]
183    #[doc = "The `abort()` method."]
184    #[doc = ""]
185    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/abort)"]
186    #[doc = ""]
187    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
188    pub fn abort(this: &SourceBuffer) -> Result<(), JsValue>;
189    # [wasm_bindgen (catch , method , structural , js_class = "SourceBuffer" , js_name = appendBuffer)]
190    #[doc = "The `appendBuffer()` method."]
191    #[doc = ""]
192    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendBuffer)"]
193    #[doc = ""]
194    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
195    pub fn append_buffer_with_array_buffer(
196        this: &SourceBuffer,
197        data: &::js_sys::ArrayBuffer,
198    ) -> Result<(), JsValue>;
199    # [wasm_bindgen (catch , method , structural , js_class = "SourceBuffer" , js_name = appendBuffer)]
200    #[doc = "The `appendBuffer()` method."]
201    #[doc = ""]
202    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendBuffer)"]
203    #[doc = ""]
204    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
205    pub fn append_buffer_with_array_buffer_view(
206        this: &SourceBuffer,
207        data: &::js_sys::Object,
208    ) -> Result<(), JsValue>;
209    # [wasm_bindgen (catch , method , structural , js_class = "SourceBuffer" , js_name = appendBuffer)]
210    #[doc = "The `appendBuffer()` method."]
211    #[doc = ""]
212    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendBuffer)"]
213    #[doc = ""]
214    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
215    pub fn append_buffer_with_u8_array(this: &SourceBuffer, data: &mut [u8])
216        -> Result<(), JsValue>;
217    # [wasm_bindgen (catch , method , structural , js_class = "SourceBuffer" , js_name = appendBuffer)]
218    #[doc = "The `appendBuffer()` method."]
219    #[doc = ""]
220    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendBuffer)"]
221    #[doc = ""]
222    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
223    pub fn append_buffer_with_js_u8_array(
224        this: &SourceBuffer,
225        data: &::js_sys::Uint8Array,
226    ) -> Result<(), JsValue>;
227    # [wasm_bindgen (catch , method , structural , js_class = "SourceBuffer" , js_name = appendBufferAsync)]
228    #[doc = "The `appendBufferAsync()` method."]
229    #[doc = ""]
230    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendBufferAsync)"]
231    #[doc = ""]
232    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
233    pub fn append_buffer_async_with_array_buffer(
234        this: &SourceBuffer,
235        data: &::js_sys::ArrayBuffer,
236    ) -> Result<::js_sys::Promise, JsValue>;
237    # [wasm_bindgen (catch , method , structural , js_class = "SourceBuffer" , js_name = appendBufferAsync)]
238    #[doc = "The `appendBufferAsync()` method."]
239    #[doc = ""]
240    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendBufferAsync)"]
241    #[doc = ""]
242    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
243    pub fn append_buffer_async_with_array_buffer_view(
244        this: &SourceBuffer,
245        data: &::js_sys::Object,
246    ) -> Result<::js_sys::Promise, JsValue>;
247    # [wasm_bindgen (catch , method , structural , js_class = "SourceBuffer" , js_name = appendBufferAsync)]
248    #[doc = "The `appendBufferAsync()` method."]
249    #[doc = ""]
250    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendBufferAsync)"]
251    #[doc = ""]
252    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
253    pub fn append_buffer_async_with_u8_array(
254        this: &SourceBuffer,
255        data: &mut [u8],
256    ) -> Result<::js_sys::Promise, JsValue>;
257    # [wasm_bindgen (catch , method , structural , js_class = "SourceBuffer" , js_name = appendBufferAsync)]
258    #[doc = "The `appendBufferAsync()` method."]
259    #[doc = ""]
260    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/appendBufferAsync)"]
261    #[doc = ""]
262    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
263    pub fn append_buffer_async_with_js_u8_array(
264        this: &SourceBuffer,
265        data: &::js_sys::Uint8Array,
266    ) -> Result<::js_sys::Promise, JsValue>;
267    # [wasm_bindgen (catch , method , structural , js_class = "SourceBuffer" , js_name = changeType)]
268    #[doc = "The `changeType()` method."]
269    #[doc = ""]
270    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/changeType)"]
271    #[doc = ""]
272    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
273    pub fn change_type(this: &SourceBuffer, type_: &str) -> Result<(), JsValue>;
274    # [wasm_bindgen (catch , method , structural , js_class = "SourceBuffer" , js_name = remove)]
275    #[doc = "The `remove()` method."]
276    #[doc = ""]
277    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/remove)"]
278    #[doc = ""]
279    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
280    pub fn remove(this: &SourceBuffer, start: f64, end: f64) -> Result<(), JsValue>;
281    # [wasm_bindgen (catch , method , structural , js_class = "SourceBuffer" , js_name = removeAsync)]
282    #[doc = "The `removeAsync()` method."]
283    #[doc = ""]
284    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer/removeAsync)"]
285    #[doc = ""]
286    #[doc = "*This API requires the following crate features to be activated: `SourceBuffer`*"]
287    pub fn remove_async(
288        this: &SourceBuffer,
289        start: f64,
290        end: f64,
291    ) -> Result<::js_sys::Promise, JsValue>;
292}