JavaScript HTMLMediaElement : HTMLElement
Instance Properties
The duration of the media in seconds. May return NaN
or Infinity
if the duration
is not known yet.
Returns a list of ranges of the media that has been played.
Example:
RunResults:
Returns one of HAVE_NOTHING
, HAVE_METADATA
, HAVE_CURRENT_DATA
, HAVE_FUTURE_DATA
, or HAVE_ENOUGH_DATA
based on the amount of data downloaded for the media.
Instance Methods
HTMLMediaElement Properties
Returned by readyState
when the the metadatad for the media has loaded
and some of the data for the current position has loaded. Listen to the loadeddata
event to know when the current data has loaded.
Returned by readyState
when the the metadatad for the media has loaded
and enough of the data for the current position has loaded so the media will play to the end without needing to
pause for buffering. Listen to the canplaythrough
event to know when
enough data has loaded.
Returned by readyState
when the the metadatad for the media has loaded
and enough of the data for the current position has loaded to start playing (but not necessarily enough to play
to the end). Listen to the canplay
event to know when the future data has
loaded.
Returned by readyState
when the metadata for the media has loaded but no
data for the media has loaded yet. Listen to the loadedmetadata
event
to know when the metadata has loaded.