1 | #![allow (unused_imports)] |
2 | #![allow (clippy::all)] |
3 | use super::*; |
4 | use wasm_bindgen::prelude::*; |
5 | #[wasm_bindgen ] |
6 | extern "C" { |
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." ] |
10 | #[doc = "" ] |
11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement)" ] |
12 | #[doc = "" ] |
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." ] |
18 | #[doc = "" ] |
19 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/error)" ] |
20 | #[doc = "" ] |
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." ] |
25 | #[doc = "" ] |
26 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/src)" ] |
27 | #[doc = "" ] |
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." ] |
32 | #[doc = "" ] |
33 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/src)" ] |
34 | #[doc = "" ] |
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." ] |
39 | #[doc = "" ] |
40 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentSrc)" ] |
41 | #[doc = "" ] |
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." ] |
47 | #[doc = "" ] |
48 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/srcObject)" ] |
49 | #[doc = "" ] |
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." ] |
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 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." ] |
62 | #[doc = "" ] |
63 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/crossOrigin)" ] |
64 | #[doc = "" ] |
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." ] |
69 | #[doc = "" ] |
70 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/crossOrigin)" ] |
71 | #[doc = "" ] |
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." ] |
76 | #[doc = "" ] |
77 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/networkState)" ] |
78 | #[doc = "" ] |
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." ] |
83 | #[doc = "" ] |
84 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/preload)" ] |
85 | #[doc = "" ] |
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." ] |
90 | #[doc = "" ] |
91 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/preload)" ] |
92 | #[doc = "" ] |
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." ] |
98 | #[doc = "" ] |
99 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/buffered)" ] |
100 | #[doc = "" ] |
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." ] |
105 | #[doc = "" ] |
106 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/readyState)" ] |
107 | #[doc = "" ] |
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." ] |
112 | #[doc = "" ] |
113 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seeking)" ] |
114 | #[doc = "" ] |
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." ] |
119 | #[doc = "" ] |
120 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentTime)" ] |
121 | #[doc = "" ] |
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." ] |
126 | #[doc = "" ] |
127 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/currentTime)" ] |
128 | #[doc = "" ] |
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." ] |
133 | #[doc = "" ] |
134 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/duration)" ] |
135 | #[doc = "" ] |
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." ] |
140 | #[doc = "" ] |
141 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/paused)" ] |
142 | #[doc = "" ] |
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." ] |
147 | #[doc = "" ] |
148 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultPlaybackRate)" ] |
149 | #[doc = "" ] |
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." ] |
154 | #[doc = "" ] |
155 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultPlaybackRate)" ] |
156 | #[doc = "" ] |
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." ] |
161 | #[doc = "" ] |
162 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playbackRate)" ] |
163 | #[doc = "" ] |
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." ] |
168 | #[doc = "" ] |
169 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/playbackRate)" ] |
170 | #[doc = "" ] |
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." ] |
176 | #[doc = "" ] |
177 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/played)" ] |
178 | #[doc = "" ] |
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." ] |
184 | #[doc = "" ] |
185 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seekable)" ] |
186 | #[doc = "" ] |
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." ] |
191 | #[doc = "" ] |
192 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/ended)" ] |
193 | #[doc = "" ] |
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." ] |
198 | #[doc = "" ] |
199 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/autoplay)" ] |
200 | #[doc = "" ] |
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." ] |
205 | #[doc = "" ] |
206 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/autoplay)" ] |
207 | #[doc = "" ] |
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." ] |
212 | #[doc = "" ] |
213 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loop)" ] |
214 | #[doc = "" ] |
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." ] |
219 | #[doc = "" ] |
220 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loop)" ] |
221 | #[doc = "" ] |
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." ] |
226 | #[doc = "" ] |
227 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/controls)" ] |
228 | #[doc = "" ] |
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." ] |
233 | #[doc = "" ] |
234 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/controls)" ] |
235 | #[doc = "" ] |
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." ] |
240 | #[doc = "" ] |
241 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volume)" ] |
242 | #[doc = "" ] |
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." ] |
247 | #[doc = "" ] |
248 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/volume)" ] |
249 | #[doc = "" ] |
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." ] |
254 | #[doc = "" ] |
255 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/muted)" ] |
256 | #[doc = "" ] |
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." ] |
261 | #[doc = "" ] |
262 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/muted)" ] |
263 | #[doc = "" ] |
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." ] |
268 | #[doc = "" ] |
269 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultMuted)" ] |
270 | #[doc = "" ] |
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." ] |
275 | #[doc = "" ] |
276 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/defaultMuted)" ] |
277 | #[doc = "" ] |
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." ] |
283 | #[doc = "" ] |
284 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/audioTracks)" ] |
285 | #[doc = "" ] |
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." ] |
291 | #[doc = "" ] |
292 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/videoTracks)" ] |
293 | #[doc = "" ] |
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." ] |
299 | #[doc = "" ] |
300 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/textTracks)" ] |
301 | #[doc = "" ] |
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." ] |
307 | #[doc = "" ] |
308 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/mediaKeys)" ] |
309 | #[doc = "" ] |
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." ] |
314 | #[doc = "" ] |
315 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/onencrypted)" ] |
316 | #[doc = "" ] |
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." ] |
321 | #[doc = "" ] |
322 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/onencrypted)" ] |
323 | #[doc = "" ] |
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." ] |
328 | #[doc = "" ] |
329 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/onwaitingforkey)" ] |
330 | #[doc = "" ] |
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." ] |
335 | #[doc = "" ] |
336 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/onwaitingforkey)" ] |
337 | #[doc = "" ] |
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." ] |
343 | #[doc = "" ] |
344 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/addTextTrack)" ] |
345 | #[doc = "" ] |
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." ] |
351 | #[doc = "" ] |
352 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/addTextTrack)" ] |
353 | #[doc = "" ] |
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, |
357 | kind: TextTrackKind, |
358 | label: &str, |
359 | ) -> TextTrack; |
360 | #[cfg (all(feature = "TextTrack" , feature = "TextTrackKind" ,))] |
361 | # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = addTextTrack)] |
362 | #[doc = "The `addTextTrack()` method." ] |
363 | #[doc = "" ] |
364 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/addTextTrack)" ] |
365 | #[doc = "" ] |
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, |
369 | kind: TextTrackKind, |
370 | label: &str, |
371 | language: &str, |
372 | ) -> TextTrack; |
373 | # [wasm_bindgen (method , structural , js_class = "HTMLMediaElement" , js_name = canPlayType)] |
374 | #[doc = "The `canPlayType()` method." ] |
375 | #[doc = "" ] |
376 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/canPlayType)" ] |
377 | #[doc = "" ] |
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." ] |
382 | #[doc = "" ] |
383 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/fastSeek)" ] |
384 | #[doc = "" ] |
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." ] |
389 | #[doc = "" ] |
390 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/hasSuspendTaint)" ] |
391 | #[doc = "" ] |
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." ] |
396 | #[doc = "" ] |
397 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/load)" ] |
398 | #[doc = "" ] |
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." ] |
403 | #[doc = "" ] |
404 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause)" ] |
405 | #[doc = "" ] |
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." ] |
410 | #[doc = "" ] |
411 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play)" ] |
412 | #[doc = "" ] |
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." ] |
417 | #[doc = "" ] |
418 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/seekToNextFrame)" ] |
419 | #[doc = "" ] |
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." ] |
425 | #[doc = "" ] |
426 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setMediaKeys)" ] |
427 | #[doc = "" ] |
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." ] |
435 | #[doc = "" ] |
436 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setVisible)" ] |
437 | #[doc = "" ] |
438 | #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*" ] |
439 | pub fn set_visible(this: &HtmlMediaElement, a_visible: bool); |
440 | } |
441 | impl HtmlMediaElement { |
442 | #[doc = "The `HTMLMediaElement.NETWORK_EMPTY` const." ] |
443 | #[doc = "" ] |
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." ] |
447 | #[doc = "" ] |
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." ] |
451 | #[doc = "" ] |
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." ] |
455 | #[doc = "" ] |
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." ] |
459 | #[doc = "" ] |
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." ] |
463 | #[doc = "" ] |
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." ] |
467 | #[doc = "" ] |
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." ] |
471 | #[doc = "" ] |
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." ] |
475 | #[doc = "" ] |
476 | #[doc = "*This API requires the following crate features to be activated: `HtmlMediaElement`*" ] |
477 | pub const HAVE_ENOUGH_DATA: u16 = 4u64 as u16; |
478 | } |
479 | |