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