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