Skip to content

HTMLMediaElement

Generated from idl/html.webidl when the site was built at 7aa23e2.

HTMLMediaElement is an interface in idl/html.webidl, inheriting HTMLElement, exposed in Window. What it does is on MDN; this page says what niso has of it.

The web features its members belong to, each with its Baseline status on the web and how much of the feature’s WPT suite passes in niso (see Web platform support).

Feature On the web In niso Members
<video> Widely available Partial 38% 25 of 65 subtests pass 17
attribute
attribute USVString src;
int32_t niso_html_media_element_get_src(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_html_media_element_set_src(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute
readonly attribute USVString currentSrc;
int32_t niso_html_media_element_get_current_src(niso_dom* dom, niso_handle self, niso_str* out);
attribute
attribute DOMString preload;
int32_t niso_html_media_element_get_preload(niso_dom* dom, niso_handle self, niso_str* out);
int32_t niso_html_media_element_set_preload(niso_dom* dom, niso_handle self, const char* value, size_t value_len);
attribute
readonly attribute unsigned short readyState;
int32_t niso_html_media_element_get_ready_state(niso_dom* dom, niso_handle self, uint16_t* out);
attribute
readonly attribute boolean paused;
int32_t niso_html_media_element_get_paused(niso_dom* dom, niso_handle self, bool* out);
attribute
readonly attribute boolean ended;
int32_t niso_html_media_element_get_ended(niso_dom* dom, niso_handle self, bool* out);
attribute
attribute double currentTime;
int32_t niso_html_media_element_get_current_time(niso_dom* dom, niso_handle self, double* out);
int32_t niso_html_media_element_set_current_time(niso_dom* dom, niso_handle self, double value);
attribute
readonly attribute unrestricted double duration;
int32_t niso_html_media_element_get_duration(niso_dom* dom, niso_handle self, double* out);
attribute
attribute double volume;
int32_t niso_html_media_element_get_volume(niso_dom* dom, niso_handle self, double* out);
int32_t niso_html_media_element_set_volume(niso_dom* dom, niso_handle self, double value);
attribute
attribute boolean muted;
int32_t niso_html_media_element_get_muted(niso_dom* dom, niso_handle self, bool* out);
int32_t niso_html_media_element_set_muted(niso_dom* dom, niso_handle self, bool value);
attribute
attribute boolean autoplay;
int32_t niso_html_media_element_get_autoplay(niso_dom* dom, niso_handle self, bool* out);
int32_t niso_html_media_element_set_autoplay(niso_dom* dom, niso_handle self, bool value);
attribute
attribute boolean loop;
int32_t niso_html_media_element_get_loop(niso_dom* dom, niso_handle self, bool* out);
int32_t niso_html_media_element_set_loop(niso_dom* dom, niso_handle self, bool value);
attribute
attribute double playbackRate;
int32_t niso_html_media_element_get_playback_rate(niso_dom* dom, niso_handle self, double* out);
int32_t niso_html_media_element_set_playback_rate(niso_dom* dom, niso_handle self, double value);
operation
undefined load();
int32_t niso_html_media_element_load(niso_dom* dom, niso_handle self);
operation
Promise<undefined> play();
int32_t niso_html_media_element_play(niso_dom* dom, niso_handle self);
operation
undefined pause();
int32_t niso_html_media_element_pause(niso_dom* dom, niso_handle self);

Members the web has, by the BCD keys web-features 3.45.0 lists, that idl/ doesn’t declare. The list is partial: web-features lists only the keys it maps to a feature.

  • abort event (<video>)
  • addTextTrack (Text tracks)
  • audioTracks (Audio and video tracks)
  • buffered (<video>)
  • canPlayType (<video>)
  • canplay event (<video>)
  • canplaythrough event (<video>)
  • captureStream (captureStream() for <audio> and <video>)
  • controller (MediaController)
  • controls (<video>)
  • controlsList (controlslist)
  • crossOrigin (<video>)
  • defaultMuted (<video>)
  • defaultPlaybackRate (<video>)
  • disableRemotePlayback (Remote playback)
  • durationchange event (<video>)
  • emptied event (<video>)
  • encrypted event (Encrypted media extensions)
  • ended event (<video>)
  • error (<video>)
  • error event (<video>)
  • fastSeek (fastSeek())
  • loadeddata event (<video>)
  • loadedmetadata event (<video>)
  • loading (Lazy-loading media)
  • loadstart event (<video>)
  • mediaKeys (Encrypted media extensions)
  • networkState (<video>)
  • pause event (<video>)
  • play event (<video>)
  • played (<video>)
  • playing event (<video>)
  • preservesPitch (preservesPitch)
  • progress event (<video>)
  • ratechange event (<video>)
  • remote (Remote playback)
  • seekable (<video>)
  • seeked event (<video>)
  • seeking (<video>)
  • seeking event (<video>)
  • setMediaKeys (Encrypted media extensions)
  • srcObject (Media source)
  • stalled event (<video>)
  • suspend event (<video>)
  • textTracks (Text tracks)
  • timeupdate event (<video>)
  • videoTracks (Audio and video tracks)
  • volumechange event (<video>)
  • waiting event (<video>)
  • waitingforkey event (Encrypted media extensions)