1#![allow(unused_imports)]
2use super::*;
3use wasm_bindgen::prelude::*;
4#[wasm_bindgen]
5extern "C" {
6 # [wasm_bindgen (extends = HtmlElement , extends = Element , extends = Node , extends = EventTarget , extends = :: js_sys :: Object , js_name = HTMLMediaElement , typescript_type = "HTMLMediaElement")]
7 #[derive(Debug, Clone, PartialEq, Eq)]
8 #[doc = "The `HtmlMediaElement` class."]
9 #[doc = ""]
10 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement)"]
11 #[doc = ""]
12 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
13 pub type HtmlMediaElement;
14 #[cfg(feature = "MediaError")]
15 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = error)]
16 #[doc = "Getter for the `error` field of this object."]
17 #[doc = ""]
18 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/error)"]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaError`*"]
21 pub fn error(this: &HtmlMediaElement) -> Option<MediaError>;
22 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = src)]
23 #[doc = "Getter for the `src` field of this object."]
24 #[doc = ""]
25 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/src)"]
26 #[doc = ""]
27 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
28 pub fn src(this: &HtmlMediaElement) -> String;
29 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = src)]
30 #[doc = "Setter for the `src` field of this object."]
31 #[doc = ""]
32 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/src)"]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
35 pub fn set_src(this: &HtmlMediaElement, value: &str);
36 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = currentSrc)]
37 #[doc = "Getter for the `currentSrc` field of this object."]
38 #[doc = ""]
39 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentSrc)"]
40 #[doc = ""]
41 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
42 pub fn current_src(this: &HtmlMediaElement) -> String;
43 #[cfg(feature = "MediaStream")]
44 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = srcObject)]
45 #[doc = "Getter for the `srcObject` field of this object."]
46 #[doc = ""]
47 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject)"]
48 #[doc = ""]
49 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaStream`*"]
50 pub fn src_object(this: &HtmlMediaElement) -> Option<MediaStream>;
51 #[cfg(feature = "MediaStream")]
52 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = srcObject)]
53 #[doc = "Setter for the `srcObject` field of this object."]
54 #[doc = ""]
55 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject)"]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaStream`*"]
58 pub fn set_src_object(this: &HtmlMediaElement, value: Option<&MediaStream>);
59 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = crossOrigin)]
60 #[doc = "Getter for the `crossOrigin` field of this object."]
61 #[doc = ""]
62 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/crossOrigin)"]
63 #[doc = ""]
64 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
65 pub fn cross_origin(this: &HtmlMediaElement) -> Option<String>;
66 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = crossOrigin)]
67 #[doc = "Setter for the `crossOrigin` field of this object."]
68 #[doc = ""]
69 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/crossOrigin)"]
70 #[doc = ""]
71 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
72 pub fn set_cross_origin(this: &HtmlMediaElement, value: Option<&str>);
73 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = networkState)]
74 #[doc = "Getter for the `networkState` field of this object."]
75 #[doc = ""]
76 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/networkState)"]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
79 pub fn network_state(this: &HtmlMediaElement) -> u16;
80 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = preload)]
81 #[doc = "Getter for the `preload` field of this object."]
82 #[doc = ""]
83 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/preload)"]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
86 pub fn preload(this: &HtmlMediaElement) -> String;
87 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = preload)]
88 #[doc = "Setter for the `preload` field of this object."]
89 #[doc = ""]
90 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/preload)"]
91 #[doc = ""]
92 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
93 pub fn set_preload(this: &HtmlMediaElement, value: &str);
94 #[cfg(feature = "TimeRanges")]
95 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = buffered)]
96 #[doc = "Getter for the `buffered` field of this object."]
97 #[doc = ""]
98 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/buffered)"]
99 #[doc = ""]
100 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `TimeRanges`*"]
101 pub fn buffered(this: &HtmlMediaElement) -> TimeRanges;
102 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = readyState)]
103 #[doc = "Getter for the `readyState` field of this object."]
104 #[doc = ""]
105 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/readyState)"]
106 #[doc = ""]
107 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
108 pub fn ready_state(this: &HtmlMediaElement) -> u16;
109 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = seeking)]
110 #[doc = "Getter for the `seeking` field of this object."]
111 #[doc = ""]
112 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seeking)"]
113 #[doc = ""]
114 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
115 pub fn seeking(this: &HtmlMediaElement) -> bool;
116 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = currentTime)]
117 #[doc = "Getter for the `currentTime` field of this object."]
118 #[doc = ""]
119 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentTime)"]
120 #[doc = ""]
121 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
122 pub fn current_time(this: &HtmlMediaElement) -> f64;
123 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = currentTime)]
124 #[doc = "Setter for the `currentTime` field of this object."]
125 #[doc = ""]
126 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentTime)"]
127 #[doc = ""]
128 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
129 pub fn set_current_time(this: &HtmlMediaElement, value: f64);
130 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = duration)]
131 #[doc = "Getter for the `duration` field of this object."]
132 #[doc = ""]
133 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/duration)"]
134 #[doc = ""]
135 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
136 pub fn duration(this: &HtmlMediaElement) -> f64;
137 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = paused)]
138 #[doc = "Getter for the `paused` field of this object."]
139 #[doc = ""]
140 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/paused)"]
141 #[doc = ""]
142 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
143 pub fn paused(this: &HtmlMediaElement) -> bool;
144 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = defaultPlaybackRate)]
145 #[doc = "Getter for the `defaultPlaybackRate` field of this object."]
146 #[doc = ""]
147 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultPlaybackRate)"]
148 #[doc = ""]
149 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
150 pub fn default_playback_rate(this: &HtmlMediaElement) -> f64;
151 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = defaultPlaybackRate)]
152 #[doc = "Setter for the `defaultPlaybackRate` field of this object."]
153 #[doc = ""]
154 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultPlaybackRate)"]
155 #[doc = ""]
156 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
157 pub fn set_default_playback_rate(this: &HtmlMediaElement, value: f64);
158 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = playbackRate)]
159 #[doc = "Getter for the `playbackRate` field of this object."]
160 #[doc = ""]
161 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playbackRate)"]
162 #[doc = ""]
163 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
164 pub fn playback_rate(this: &HtmlMediaElement) -> f64;
165 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = playbackRate)]
166 #[doc = "Setter for the `playbackRate` field of this object."]
167 #[doc = ""]
168 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playbackRate)"]
169 #[doc = ""]
170 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
171 pub fn set_playback_rate(this: &HtmlMediaElement, value: f64);
172 #[cfg(feature = "TimeRanges")]
173 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = played)]
174 #[doc = "Getter for the `played` field of this object."]
175 #[doc = ""]
176 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/played)"]
177 #[doc = ""]
178 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `TimeRanges`*"]
179 pub fn played(this: &HtmlMediaElement) -> TimeRanges;
180 #[cfg(feature = "TimeRanges")]
181 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = seekable)]
182 #[doc = "Getter for the `seekable` field of this object."]
183 #[doc = ""]
184 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seekable)"]
185 #[doc = ""]
186 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `TimeRanges`*"]
187 pub fn seekable(this: &HtmlMediaElement) -> TimeRanges;
188 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = ended)]
189 #[doc = "Getter for the `ended` field of this object."]
190 #[doc = ""]
191 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ended)"]
192 #[doc = ""]
193 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
194 pub fn ended(this: &HtmlMediaElement) -> bool;
195 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = autoplay)]
196 #[doc = "Getter for the `autoplay` field of this object."]
197 #[doc = ""]
198 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/autoplay)"]
199 #[doc = ""]
200 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
201 pub fn autoplay(this: &HtmlMediaElement) -> bool;
202 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = autoplay)]
203 #[doc = "Setter for the `autoplay` field of this object."]
204 #[doc = ""]
205 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/autoplay)"]
206 #[doc = ""]
207 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
208 pub fn set_autoplay(this: &HtmlMediaElement, value: bool);
209 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = loop)]
210 #[doc = "Getter for the `loop` field of this object."]
211 #[doc = ""]
212 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loop)"]
213 #[doc = ""]
214 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
215 pub fn loop_(this: &HtmlMediaElement) -> bool;
216 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = loop)]
217 #[doc = "Setter for the `loop` field of this object."]
218 #[doc = ""]
219 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loop)"]
220 #[doc = ""]
221 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
222 pub fn set_loop(this: &HtmlMediaElement, value: bool);
223 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = controls)]
224 #[doc = "Getter for the `controls` field of this object."]
225 #[doc = ""]
226 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/controls)"]
227 #[doc = ""]
228 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
229 pub fn controls(this: &HtmlMediaElement) -> bool;
230 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = controls)]
231 #[doc = "Setter for the `controls` field of this object."]
232 #[doc = ""]
233 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/controls)"]
234 #[doc = ""]
235 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
236 pub fn set_controls(this: &HtmlMediaElement, value: bool);
237 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = volume)]
238 #[doc = "Getter for the `volume` field of this object."]
239 #[doc = ""]
240 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volume)"]
241 #[doc = ""]
242 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
243 pub fn volume(this: &HtmlMediaElement) -> f64;
244 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = volume)]
245 #[doc = "Setter for the `volume` field of this object."]
246 #[doc = ""]
247 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volume)"]
248 #[doc = ""]
249 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
250 pub fn set_volume(this: &HtmlMediaElement, value: f64);
251 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = muted)]
252 #[doc = "Getter for the `muted` field of this object."]
253 #[doc = ""]
254 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/muted)"]
255 #[doc = ""]
256 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
257 pub fn muted(this: &HtmlMediaElement) -> bool;
258 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = muted)]
259 #[doc = "Setter for the `muted` field of this object."]
260 #[doc = ""]
261 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/muted)"]
262 #[doc = ""]
263 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
264 pub fn set_muted(this: &HtmlMediaElement, value: bool);
265 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = defaultMuted)]
266 #[doc = "Getter for the `defaultMuted` field of this object."]
267 #[doc = ""]
268 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultMuted)"]
269 #[doc = ""]
270 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
271 pub fn default_muted(this: &HtmlMediaElement) -> bool;
272 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = defaultMuted)]
273 #[doc = "Setter for the `defaultMuted` field of this object."]
274 #[doc = ""]
275 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultMuted)"]
276 #[doc = ""]
277 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
278 pub fn set_default_muted(this: &HtmlMediaElement, value: bool);
279 #[cfg(feature = "AudioTrackList")]
280 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = audioTracks)]
281 #[doc = "Getter for the `audioTracks` field of this object."]
282 #[doc = ""]
283 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/audioTracks)"]
284 #[doc = ""]
285 #[doc = "*This API requires the following crate features to be activated: `AudioTrackList`, `HtmlMediaElement`*"]
286 pub fn audio_tracks(this: &HtmlMediaElement) -> AudioTrackList;
287 #[cfg(feature = "VideoTrackList")]
288 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = videoTracks)]
289 #[doc = "Getter for the `videoTracks` field of this object."]
290 #[doc = ""]
291 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/videoTracks)"]
292 #[doc = ""]
293 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `VideoTrackList`*"]
294 pub fn video_tracks(this: &HtmlMediaElement) -> VideoTrackList;
295 #[cfg(feature = "TextTrackList")]
296 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = textTracks)]
297 #[doc = "Getter for the `textTracks` field of this object."]
298 #[doc = ""]
299 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/textTracks)"]
300 #[doc = ""]
301 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `TextTrackList`*"]
302 pub fn text_tracks(this: &HtmlMediaElement) -> Option<TextTrackList>;
303 #[cfg(feature = "MediaKeys")]
304 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = mediaKeys)]
305 #[doc = "Getter for the `mediaKeys` field of this object."]
306 #[doc = ""]
307 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/mediaKeys)"]
308 #[doc = ""]
309 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaKeys`*"]
310 pub fn media_keys(this: &HtmlMediaElement) -> Option<MediaKeys>;
311 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = onencrypted)]
312 #[doc = "Getter for the `onencrypted` field of this object."]
313 #[doc = ""]
314 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/onencrypted)"]
315 #[doc = ""]
316 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
317 pub fn onencrypted(this: &HtmlMediaElement) -> Option<::js_sys::Function>;
318 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = onencrypted)]
319 #[doc = "Setter for the `onencrypted` field of this object."]
320 #[doc = ""]
321 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/onencrypted)"]
322 #[doc = ""]
323 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
324 pub fn set_onencrypted(this: &HtmlMediaElement, value: Option<&::js_sys::Function>);
325 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = onwaitingforkey)]
326 #[doc = "Getter for the `onwaitingforkey` field of this object."]
327 #[doc = ""]
328 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/onwaitingforkey)"]
329 #[doc = ""]
330 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
331 pub fn onwaitingforkey(this: &HtmlMediaElement) -> Option<::js_sys::Function>;
332 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = onwaitingforkey)]
333 #[doc = "Setter for the `onwaitingforkey` field of this object."]
334 #[doc = ""]
335 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/onwaitingforkey)"]
336 #[doc = ""]
337 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
338 pub fn set_onwaitingforkey(this: &HtmlMediaElement, value: Option<&::js_sys::Function>);
339 #[cfg(all(feature = "TextTrack", feature = "TextTrackKind",))]
340 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = addTextTrack)]
341 #[doc = "The `addTextTrack()` method."]
342 #[doc = ""]
343 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/addTextTrack)"]
344 #[doc = ""]
345 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `TextTrack`, `TextTrackKind`*"]
346 pub fn add_text_track(this: &HtmlMediaElement, kind: TextTrackKind) -> TextTrack;
347 #[cfg(all(feature = "TextTrack", feature = "TextTrackKind",))]
348 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = addTextTrack)]
349 #[doc = "The `addTextTrack()` method."]
350 #[doc = ""]
351 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/addTextTrack)"]
352 #[doc = ""]
353 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `TextTrack`, `TextTrackKind`*"]
354 pub fn add_text_track_with_label(
355 this: &HtmlMediaElement,
356 kind: TextTrackKind,
357 label: &str,
358 ) -> TextTrack;
359 #[cfg(all(feature = "TextTrack", feature = "TextTrackKind",))]
360 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = addTextTrack)]
361 #[doc = "The `addTextTrack()` method."]
362 #[doc = ""]
363 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/addTextTrack)"]
364 #[doc = ""]
365 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `TextTrack`, `TextTrackKind`*"]
366 pub fn add_text_track_with_label_and_language(
367 this: &HtmlMediaElement,
368 kind: TextTrackKind,
369 label: &str,
370 language: &str,
371 ) -> TextTrack;
372 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = canPlayType)]
373 #[doc = "The `canPlayType()` method."]
374 #[doc = ""]
375 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType)"]
376 #[doc = ""]
377 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
378 pub fn can_play_type(this: &HtmlMediaElement, type_: &str) -> String;
379 # [wasm_bindgen (catch , method , structural , js_class = "HTMLMediaElement" , js_name = fastSeek)]
380 #[doc = "The `fastSeek()` method."]
381 #[doc = ""]
382 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/fastSeek)"]
383 #[doc = ""]
384 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
385 pub fn fast_seek(this: &HtmlMediaElement, time: f64) -> Result<(), JsValue>;
386 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = hasSuspendTaint)]
387 #[doc = "The `hasSuspendTaint()` method."]
388 #[doc = ""]
389 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/hasSuspendTaint)"]
390 #[doc = ""]
391 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
392 pub fn has_suspend_taint(this: &HtmlMediaElement) -> bool;
393 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = load)]
394 #[doc = "The `load()` method."]
395 #[doc = ""]
396 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/load)"]
397 #[doc = ""]
398 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
399 pub fn load(this: &HtmlMediaElement);
400 # [wasm_bindgen (catch , method , structural , js_class = "HTMLMediaElement" , js_name = pause)]
401 #[doc = "The `pause()` method."]
402 #[doc = ""]
403 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause)"]
404 #[doc = ""]
405 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
406 pub fn pause(this: &HtmlMediaElement) -> Result<(), JsValue>;
407 # [wasm_bindgen (catch , method , structural , js_class = "HTMLMediaElement" , js_name = play)]
408 #[doc = "The `play()` method."]
409 #[doc = ""]
410 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play)"]
411 #[doc = ""]
412 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
413 pub fn play(this: &HtmlMediaElement) -> Result<::js_sys::Promise, JsValue>;
414 # [wasm_bindgen (catch , method , structural , js_class = "HTMLMediaElement" , js_name = seekToNextFrame)]
415 #[doc = "The `seekToNextFrame()` method."]
416 #[doc = ""]
417 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seekToNextFrame)"]
418 #[doc = ""]
419 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
420 pub fn seek_to_next_frame(this: &HtmlMediaElement) -> Result<::js_sys::Promise, JsValue>;
421 #[cfg(feature = "MediaKeys")]
422 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = setMediaKeys)]
423 #[doc = "The `setMediaKeys()` method."]
424 #[doc = ""]
425 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setMediaKeys)"]
426 #[doc = ""]
427 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaKeys`*"]
428 pub fn set_media_keys(
429 this: &HtmlMediaElement,
430 media_keys: Option<&MediaKeys>,
431 ) -> ::js_sys::Promise;
432 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = setVisible)]
433 #[doc = "The `setVisible()` method."]
434 #[doc = ""]
435 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setVisible)"]
436 #[doc = ""]
437 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
438 pub fn set_visible(this: &HtmlMediaElement, a_visible: bool);
439}
440impl HtmlMediaElement {
441 #[doc = "The `HTMLMediaElement.NETWORK_EMPTY` const."]
442 #[doc = ""]
443 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
444 pub const NETWORK_EMPTY: u16 = 0i64 as u16;
445 #[doc = "The `HTMLMediaElement.NETWORK_IDLE` const."]
446 #[doc = ""]
447 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
448 pub const NETWORK_IDLE: u16 = 1u64 as u16;
449 #[doc = "The `HTMLMediaElement.NETWORK_LOADING` const."]
450 #[doc = ""]
451 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
452 pub const NETWORK_LOADING: u16 = 2u64 as u16;
453 #[doc = "The `HTMLMediaElement.NETWORK_NO_SOURCE` const."]
454 #[doc = ""]
455 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
456 pub const NETWORK_NO_SOURCE: u16 = 3u64 as u16;
457 #[doc = "The `HTMLMediaElement.HAVE_NOTHING` const."]
458 #[doc = ""]
459 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
460 pub const HAVE_NOTHING: u16 = 0i64 as u16;
461 #[doc = "The `HTMLMediaElement.HAVE_METADATA` const."]
462 #[doc = ""]
463 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
464 pub const HAVE_METADATA: u16 = 1u64 as u16;
465 #[doc = "The `HTMLMediaElement.HAVE_CURRENT_DATA` const."]
466 #[doc = ""]
467 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
468 pub const HAVE_CURRENT_DATA: u16 = 2u64 as u16;
469 #[doc = "The `HTMLMediaElement.HAVE_FUTURE_DATA` const."]
470 #[doc = ""]
471 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
472 pub const HAVE_FUTURE_DATA: u16 = 3u64 as u16;
473 #[doc = "The `HTMLMediaElement.HAVE_ENOUGH_DATA` const."]
474 #[doc = ""]
475 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
476 pub const HAVE_ENOUGH_DATA: u16 = 4u64 as u16;
477}