]>
git.proxmox.com Git - rustc.git/blob - vendor/web-sys/src/features/gen_HtmlMediaElement.rs
1 #![allow(unused_imports)]
4 use wasm_bindgen
::prelude
::*;
7 # [wasm_bindgen (extends = HtmlElement , extends = Element , extends = Node , extends = EventTarget , extends = :: js_sys :: Object , js_name = HTMLMediaElement , typescript_type = "HTMLMediaElement")]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `HtmlMediaElement` class."]
11 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement)"]
13 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
14 pub type HtmlMediaElement
;
15 #[cfg(feature = "MediaError")]
16 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = error)]
17 #[doc = "Getter for the `error` field of this object."]
19 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/error)"]
21 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaError`*"]
22 pub fn error(this
: &HtmlMediaElement
) -> Option
<MediaError
>;
23 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = src)]
24 #[doc = "Getter for the `src` field of this object."]
26 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/src)"]
28 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
29 pub fn src(this
: &HtmlMediaElement
) -> String
;
30 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = src)]
31 #[doc = "Setter for the `src` field of this object."]
33 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/src)"]
35 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
36 pub fn set_src(this
: &HtmlMediaElement
, value
: &str);
37 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = currentSrc)]
38 #[doc = "Getter for the `currentSrc` field of this object."]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentSrc)"]
42 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
43 pub fn current_src(this
: &HtmlMediaElement
) -> String
;
44 #[cfg(feature = "MediaStream")]
45 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = srcObject)]
46 #[doc = "Getter for the `srcObject` field of this object."]
48 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject)"]
50 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaStream`*"]
51 pub fn src_object(this
: &HtmlMediaElement
) -> Option
<MediaStream
>;
52 #[cfg(feature = "MediaStream")]
53 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = srcObject)]
54 #[doc = "Setter for the `srcObject` field of this object."]
56 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject)"]
58 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaStream`*"]
59 pub fn set_src_object(this
: &HtmlMediaElement
, value
: Option
<&MediaStream
>);
60 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = crossOrigin)]
61 #[doc = "Getter for the `crossOrigin` field of this object."]
63 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/crossOrigin)"]
65 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
66 pub fn cross_origin(this
: &HtmlMediaElement
) -> Option
<String
>;
67 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = crossOrigin)]
68 #[doc = "Setter for the `crossOrigin` field of this object."]
70 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/crossOrigin)"]
72 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
73 pub fn set_cross_origin(this
: &HtmlMediaElement
, value
: Option
<&str>);
74 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = networkState)]
75 #[doc = "Getter for the `networkState` field of this object."]
77 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/networkState)"]
79 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
80 pub fn network_state(this
: &HtmlMediaElement
) -> u16;
81 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = preload)]
82 #[doc = "Getter for the `preload` field of this object."]
84 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/preload)"]
86 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
87 pub fn preload(this
: &HtmlMediaElement
) -> String
;
88 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = preload)]
89 #[doc = "Setter for the `preload` field of this object."]
91 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/preload)"]
93 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
94 pub fn set_preload(this
: &HtmlMediaElement
, value
: &str);
95 #[cfg(feature = "TimeRanges")]
96 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = buffered)]
97 #[doc = "Getter for the `buffered` field of this object."]
99 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/buffered)"]
101 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `TimeRanges`*"]
102 pub fn buffered(this
: &HtmlMediaElement
) -> TimeRanges
;
103 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = readyState)]
104 #[doc = "Getter for the `readyState` field of this object."]
106 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/readyState)"]
108 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
109 pub fn ready_state(this
: &HtmlMediaElement
) -> u16;
110 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = seeking)]
111 #[doc = "Getter for the `seeking` field of this object."]
113 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seeking)"]
115 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
116 pub fn seeking(this
: &HtmlMediaElement
) -> bool
;
117 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = currentTime)]
118 #[doc = "Getter for the `currentTime` field of this object."]
120 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentTime)"]
122 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
123 pub fn current_time(this
: &HtmlMediaElement
) -> f64;
124 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = currentTime)]
125 #[doc = "Setter for the `currentTime` field of this object."]
127 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentTime)"]
129 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
130 pub fn set_current_time(this
: &HtmlMediaElement
, value
: f64);
131 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = duration)]
132 #[doc = "Getter for the `duration` field of this object."]
134 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/duration)"]
136 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
137 pub fn duration(this
: &HtmlMediaElement
) -> f64;
138 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = paused)]
139 #[doc = "Getter for the `paused` field of this object."]
141 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/paused)"]
143 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
144 pub fn paused(this
: &HtmlMediaElement
) -> bool
;
145 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = defaultPlaybackRate)]
146 #[doc = "Getter for the `defaultPlaybackRate` field of this object."]
148 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultPlaybackRate)"]
150 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
151 pub fn default_playback_rate(this
: &HtmlMediaElement
) -> f64;
152 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = defaultPlaybackRate)]
153 #[doc = "Setter for the `defaultPlaybackRate` field of this object."]
155 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultPlaybackRate)"]
157 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
158 pub fn set_default_playback_rate(this
: &HtmlMediaElement
, value
: f64);
159 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = playbackRate)]
160 #[doc = "Getter for the `playbackRate` field of this object."]
162 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playbackRate)"]
164 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
165 pub fn playback_rate(this
: &HtmlMediaElement
) -> f64;
166 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = playbackRate)]
167 #[doc = "Setter for the `playbackRate` field of this object."]
169 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playbackRate)"]
171 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
172 pub fn set_playback_rate(this
: &HtmlMediaElement
, value
: f64);
173 #[cfg(feature = "TimeRanges")]
174 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = played)]
175 #[doc = "Getter for the `played` field of this object."]
177 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/played)"]
179 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `TimeRanges`*"]
180 pub fn played(this
: &HtmlMediaElement
) -> TimeRanges
;
181 #[cfg(feature = "TimeRanges")]
182 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = seekable)]
183 #[doc = "Getter for the `seekable` field of this object."]
185 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seekable)"]
187 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `TimeRanges`*"]
188 pub fn seekable(this
: &HtmlMediaElement
) -> TimeRanges
;
189 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = ended)]
190 #[doc = "Getter for the `ended` field of this object."]
192 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ended)"]
194 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
195 pub fn ended(this
: &HtmlMediaElement
) -> bool
;
196 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = autoplay)]
197 #[doc = "Getter for the `autoplay` field of this object."]
199 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/autoplay)"]
201 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
202 pub fn autoplay(this
: &HtmlMediaElement
) -> bool
;
203 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = autoplay)]
204 #[doc = "Setter for the `autoplay` field of this object."]
206 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/autoplay)"]
208 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
209 pub fn set_autoplay(this
: &HtmlMediaElement
, value
: bool
);
210 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = loop)]
211 #[doc = "Getter for the `loop` field of this object."]
213 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loop)"]
215 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
216 pub fn loop_(this
: &HtmlMediaElement
) -> bool
;
217 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = loop)]
218 #[doc = "Setter for the `loop` field of this object."]
220 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loop)"]
222 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
223 pub fn set_loop(this
: &HtmlMediaElement
, value
: bool
);
224 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = controls)]
225 #[doc = "Getter for the `controls` field of this object."]
227 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/controls)"]
229 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
230 pub fn controls(this
: &HtmlMediaElement
) -> bool
;
231 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = controls)]
232 #[doc = "Setter for the `controls` field of this object."]
234 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/controls)"]
236 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
237 pub fn set_controls(this
: &HtmlMediaElement
, value
: bool
);
238 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = volume)]
239 #[doc = "Getter for the `volume` field of this object."]
241 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volume)"]
243 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
244 pub fn volume(this
: &HtmlMediaElement
) -> f64;
245 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = volume)]
246 #[doc = "Setter for the `volume` field of this object."]
248 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volume)"]
250 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
251 pub fn set_volume(this
: &HtmlMediaElement
, value
: f64);
252 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = muted)]
253 #[doc = "Getter for the `muted` field of this object."]
255 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/muted)"]
257 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
258 pub fn muted(this
: &HtmlMediaElement
) -> bool
;
259 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = muted)]
260 #[doc = "Setter for the `muted` field of this object."]
262 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/muted)"]
264 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
265 pub fn set_muted(this
: &HtmlMediaElement
, value
: bool
);
266 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = defaultMuted)]
267 #[doc = "Getter for the `defaultMuted` field of this object."]
269 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultMuted)"]
271 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
272 pub fn default_muted(this
: &HtmlMediaElement
) -> bool
;
273 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = defaultMuted)]
274 #[doc = "Setter for the `defaultMuted` field of this object."]
276 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultMuted)"]
278 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
279 pub fn set_default_muted(this
: &HtmlMediaElement
, value
: bool
);
280 #[cfg(feature = "AudioTrackList")]
281 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = audioTracks)]
282 #[doc = "Getter for the `audioTracks` field of this object."]
284 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/audioTracks)"]
286 #[doc = "*This API requires the following crate features to be activated: `AudioTrackList`, `HtmlMediaElement`*"]
287 pub fn audio_tracks(this
: &HtmlMediaElement
) -> AudioTrackList
;
288 #[cfg(feature = "VideoTrackList")]
289 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = videoTracks)]
290 #[doc = "Getter for the `videoTracks` field of this object."]
292 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/videoTracks)"]
294 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `VideoTrackList`*"]
295 pub fn video_tracks(this
: &HtmlMediaElement
) -> VideoTrackList
;
296 #[cfg(feature = "TextTrackList")]
297 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = textTracks)]
298 #[doc = "Getter for the `textTracks` field of this object."]
300 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/textTracks)"]
302 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `TextTrackList`*"]
303 pub fn text_tracks(this
: &HtmlMediaElement
) -> Option
<TextTrackList
>;
304 #[cfg(feature = "MediaKeys")]
305 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = mediaKeys)]
306 #[doc = "Getter for the `mediaKeys` field of this object."]
308 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/mediaKeys)"]
310 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaKeys`*"]
311 pub fn media_keys(this
: &HtmlMediaElement
) -> Option
<MediaKeys
>;
312 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = onencrypted)]
313 #[doc = "Getter for the `onencrypted` field of this object."]
315 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/onencrypted)"]
317 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
318 pub fn onencrypted(this
: &HtmlMediaElement
) -> Option
<::js_sys
::Function
>;
319 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = onencrypted)]
320 #[doc = "Setter for the `onencrypted` field of this object."]
322 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/onencrypted)"]
324 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
325 pub fn set_onencrypted(this
: &HtmlMediaElement
, value
: Option
<&::js_sys
::Function
>);
326 # [wasm_bindgen (structural , method , getter , js_class = "HTMLMediaElement" , js_name = onwaitingforkey)]
327 #[doc = "Getter for the `onwaitingforkey` field of this object."]
329 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/onwaitingforkey)"]
331 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
332 pub fn onwaitingforkey(this
: &HtmlMediaElement
) -> Option
<::js_sys
::Function
>;
333 # [wasm_bindgen (structural , method , setter , js_class = "HTMLMediaElement" , js_name = onwaitingforkey)]
334 #[doc = "Setter for the `onwaitingforkey` field of this object."]
336 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/onwaitingforkey)"]
338 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
339 pub fn set_onwaitingforkey(this
: &HtmlMediaElement
, value
: Option
<&::js_sys
::Function
>);
340 #[cfg(all(feature = "TextTrack", feature = "TextTrackKind",))]
341 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = addTextTrack)]
342 #[doc = "The `addTextTrack()` method."]
344 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/addTextTrack)"]
346 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `TextTrack`, `TextTrackKind`*"]
347 pub fn add_text_track(this
: &HtmlMediaElement
, kind
: TextTrackKind
) -> TextTrack
;
348 #[cfg(all(feature = "TextTrack", feature = "TextTrackKind",))]
349 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = addTextTrack)]
350 #[doc = "The `addTextTrack()` method."]
352 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/addTextTrack)"]
354 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `TextTrack`, `TextTrackKind`*"]
355 pub fn add_text_track_with_label(
356 this
: &HtmlMediaElement
,
360 #[cfg(all(feature = "TextTrack", feature = "TextTrackKind",))]
361 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = addTextTrack)]
362 #[doc = "The `addTextTrack()` method."]
364 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/addTextTrack)"]
366 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `TextTrack`, `TextTrackKind`*"]
367 pub fn add_text_track_with_label_and_language(
368 this
: &HtmlMediaElement
,
373 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = canPlayType)]
374 #[doc = "The `canPlayType()` method."]
376 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType)"]
378 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
379 pub fn can_play_type(this
: &HtmlMediaElement
, type_
: &str) -> String
;
380 # [wasm_bindgen (catch , method , structural , js_class = "HTMLMediaElement" , js_name = fastSeek)]
381 #[doc = "The `fastSeek()` method."]
383 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/fastSeek)"]
385 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
386 pub fn fast_seek(this
: &HtmlMediaElement
, time
: f64) -> Result
<(), JsValue
>;
387 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = hasSuspendTaint)]
388 #[doc = "The `hasSuspendTaint()` method."]
390 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/hasSuspendTaint)"]
392 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
393 pub fn has_suspend_taint(this
: &HtmlMediaElement
) -> bool
;
394 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = load)]
395 #[doc = "The `load()` method."]
397 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/load)"]
399 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
400 pub fn load(this
: &HtmlMediaElement
);
401 # [wasm_bindgen (catch , method , structural , js_class = "HTMLMediaElement" , js_name = pause)]
402 #[doc = "The `pause()` method."]
404 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause)"]
406 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
407 pub fn pause(this
: &HtmlMediaElement
) -> Result
<(), JsValue
>;
408 # [wasm_bindgen (catch , method , structural , js_class = "HTMLMediaElement" , js_name = play)]
409 #[doc = "The `play()` method."]
411 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play)"]
413 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
414 pub fn play(this
: &HtmlMediaElement
) -> Result
<::js_sys
::Promise
, JsValue
>;
415 # [wasm_bindgen (catch , method , structural , js_class = "HTMLMediaElement" , js_name = seekToNextFrame)]
416 #[doc = "The `seekToNextFrame()` method."]
418 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seekToNextFrame)"]
420 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
421 pub fn seek_to_next_frame(this
: &HtmlMediaElement
) -> Result
<::js_sys
::Promise
, JsValue
>;
422 #[cfg(feature = "MediaKeys")]
423 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = setMediaKeys)]
424 #[doc = "The `setMediaKeys()` method."]
426 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setMediaKeys)"]
428 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`, `MediaKeys`*"]
429 pub fn set_media_keys(
430 this
: &HtmlMediaElement
,
431 media_keys
: Option
<&MediaKeys
>,
432 ) -> ::js_sys
::Promise
;
433 # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = setVisible)]
434 #[doc = "The `setVisible()` method."]
436 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setVisible)"]
438 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
439 pub fn set_visible(this
: &HtmlMediaElement
, a_visible
: bool
);
441 impl HtmlMediaElement
{
442 #[doc = "The `HTMLMediaElement.NETWORK_EMPTY` const."]
444 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
445 pub const NETWORK_EMPTY
: u16 = 0i64 as u16;
446 #[doc = "The `HTMLMediaElement.NETWORK_IDLE` const."]
448 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
449 pub const NETWORK_IDLE
: u16 = 1u64 as u16;
450 #[doc = "The `HTMLMediaElement.NETWORK_LOADING` const."]
452 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
453 pub const NETWORK_LOADING
: u16 = 2u64 as u16;
454 #[doc = "The `HTMLMediaElement.NETWORK_NO_SOURCE` const."]
456 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
457 pub const NETWORK_NO_SOURCE
: u16 = 3u64 as u16;
458 #[doc = "The `HTMLMediaElement.HAVE_NOTHING` const."]
460 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
461 pub const HAVE_NOTHING
: u16 = 0i64 as u16;
462 #[doc = "The `HTMLMediaElement.HAVE_METADATA` const."]
464 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
465 pub const HAVE_METADATA
: u16 = 1u64 as u16;
466 #[doc = "The `HTMLMediaElement.HAVE_CURRENT_DATA` const."]
468 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
469 pub const HAVE_CURRENT_DATA
: u16 = 2u64 as u16;
470 #[doc = "The `HTMLMediaElement.HAVE_FUTURE_DATA` const."]
472 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
473 pub const HAVE_FUTURE_DATA
: u16 = 3u64 as u16;
474 #[doc = "The `HTMLMediaElement.HAVE_ENOUGH_DATA` const."]
476 #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*"]
477 pub const HAVE_ENOUGH_DATA
: u16 = 4u64 as u16;