HTML and CSS Reference
In-Depth Information
Attribute/method
Description
currentTime
The offset, in seconds, from the start of the media to the point currently playing.
defaultMuted
Corresponding DOM attribute to the muted content attribute.
The default playback rate of the media; if this differs from the playbackRate, then the user
is using fast forward or slow motion.
defaultPlaybackRate
duration
The playing time, in seconds, of the media (if available).
ended
Boolean attribute that returns true if the media has reached the end of playback.
If any error has occurred, this attribute will be set to a MediaError object, which can be
examined for the details.
error
Resets the media element, clearing any currently playing media and rerunning the media-
selection algorithm as if the page had just been loaded.
load()
loop
Corresponding DOM attribute to the loop content attribute.
Corresponding DOM attribute to the mediagroup content attribute. Allows the grouping
of multiple media elements for synchronized playback.
mediaGroup
muted
Boolean value indicating whether or not the current media is muted.
The state of any interaction between the media element and the network. Returns an in-
teger value from 0 to 3, which corresponds to the constants NETWORK_EMPTY,
NETWORK_IDLE, NETWORK_LOADING, and NETWORK_NO_SOURCE, respect-
ively.
networkState
pause()
Sets the paused attribute to true, loading the media resource if necessary.
paused
Boolean value indicating whether or not the media is paused.
Sets the paused attribute to false, loading the media and beginning playback if necessary.
If the playback had ended, will restart it from the beginning.
play()
playbackRate
The current effective playback rate; 1.0 is normal speed.
Returns a TimeRanges object (an array of start and end times) that represents the ranges
of the media resource that the browser has played.
played
Corresponds to the value of the preload content attribute; can have the value none,
metadata, or auto.
preload
The readiness of the element to play media. Returns an integer value from 0 to 4, which
corresponds to the constants HAVE_NOTHING, HAVE_METADATA,
HAVE_CURRENT_DATA, HAVE_FUTURE_DATA, and HAVE_ENOUGH_DATA, re-
spectively.
readyState
Returns a TimeRanges object (an array of start and end times) that represents the ranges
of the media resource that the browser is able to seek to (if any).
seekable
Boolean value indicating whether or not the browser is seeking (i.e., loading new data)
because the playback position has been skipped forward.
seeking
src
Corresponds to the value of the src content attribute.
If the media has an embedded explicit time (for example, timestamped CCTV footage),
this attribute will return the start date. This attribute was previously called startOff-
setTime.
startDate
volume
Returns the current playback volume as a value between 0.0 and 1.0, inclusive.
Search WWH ::




Custom Search