Name
MediaElement — a media player element
Inherits from
Node, Element
Synopsis
MediaElement is the common superclass of the <audio> and <video> elements. Those two elements
define almost exactly the same API, which is described here, but see
Audio and Video for
audio- and video-specific details. And see Scripting Audio and Video
for an introduction to these media elements.
Constants
The NETWORK constants are
the possible values of the networkState, and the HAVE constants are the possible values of
the readyState
property.
unsigned shortNETWORK_EMPTY= 0The element has not started using the network. This would be the state before the
srcattribute was set.unsigned shortNETWORK_IDLE= 1The element is not currently loading data from the network. It might have loaded the complete resource, or it might have buffered all the data it currently needs. Or it might have
preloadset to “none” and not yet have been asked to load or play the media.unsigned shortNETWORK_LOADING= 2The element is currently using the network to load media data.
unsigned shortNETWORK_NO_SOURCE= 3The element is not using the network because it was not able to find a media source that it is able to play.
unsigned shortHAVE_NOTHING= 0No media data or metadata has been loaded.
unsigned shortHAVE_METADATA= 1The media metadata has been loaded, but no data for the current playback position has been loaded. This means that you can query the
durationof the media or the dimensions of a video and you can seek by setting ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access