-
HTMLMediaElement.audioTracks
-
A AudioTrackList
that lists the AudioTrack
objects contained in the element.
-
HTMLMediaElement.autoplay
-
A boolean value that reflects the autoplay
HTML attribute, indicating whether playback should automatically begin as soon as enough media is available to do so without interruption.
Note: Automatically playing audio when the user doesn't expect or desire it is a poor user experience and should be avoided in most cases, though there are exceptions. See the Autoplay guide for media and Web Audio APIs for more information. Keep in mind that browsers may ignore autoplay requests, so you should ensure that your code isn't dependent on autoplay working.
-
HTMLMediaElement.buffered
Read only
-
Returns a TimeRanges
object that indicates the ranges of the media source that the browser has buffered (if any) at the moment the buffered
property is accessed.
-
HTMLMediaElement.controls
-
Is a Boolean
that reflects the controls
HTML attribute, indicating whether user interface items for controlling the resource should be displayed.
-
HTMLMediaElement.controlsList
Read only
-
Returns a DOMTokenList
that helps the user agent select what controls to show on the media element whenever the user agent shows its own set of controls. The DOMTokenList
takes one or more of three possible values: nodownload
, nofullscreen
, and noremoteplayback
.
-
HTMLMediaElement.crossOrigin
-
A DOMString
indicating the CORS setting for this media element.
-
HTMLMediaElement.currentSrc
Read only
-
Returns a DOMString
with the absolute URL of the chosen media resource.
-
HTMLMediaElement.currentTime
-
A double-precision floating-point value indicating the current playback time in seconds; if the media has not started to play and has not been seeked, this value is the media's initial playback time. Setting this value seeks the media to the new time. The time is specified relative to the media's timeline.
-
HTMLMediaElement.defaultMuted
-
A Boolean
that reflects the muted
HTML attribute, which indicates whether the media element's audio output should be muted by default.
-
HTMLMediaElement.defaultPlaybackRate
-
A double
indicating the default playback rate for the media.
-
HTMLMediaElement.disableRemotePlayback
-
A Boolean
that sets or returns the remote playback state, indicating whether the media element is allowed to have a remote playback UI.
-
HTMLMediaElement.duration
Read only
-
A read-only double-precision floating-point value indicating the total duration of the media in seconds. If no media data is available, the returned value is NaN
. If the media is of indefinite length (such as streamed live media, a WebRTC call's media, or similar), the value is +Infinity
.
-
HTMLMediaElement.ended
Read only
-
Returns a Boolean
that indicates whether the media element has finished playing.
-
HTMLMediaElement.error
Read only
-
Returns a MediaError
object for the most recent error, or null
if there has not been an error.
-
HTMLMediaElement.loop
-
A Boolean
that reflects the loop
HTML attribute, which indicates whether the media element should start over when it reaches the end.
-
HTMLMediaElement.mediaKeys
Read only
Experimental
-
Returns a MediaKeys
object or null
. MediaKeys is a set of keys that an associated HTMLMediaElement can use for decryption of media data during playback.
-
HTMLMediaElement.muted
-
Is a Boolean
that determines whether audio is muted. true
if the audio is muted and false
otherwise.
-
HTMLMediaElement.networkState
Read only
-
Returns a unsigned short
(enumeration) indicating the current state of fetching the media over the network.
-
HTMLMediaElement.paused
Read only
-
Returns a Boolean
that indicates whether the media element is paused.
-
HTMLMediaElement.playbackRate
-
Is a double
that indicates the rate at which the media is being played back.
-
HTMLMediaElement.played
Read only
-
Returns a TimeRanges
object that contains the ranges of the media source that the browser has played, if any.
-
HTMLMediaElement.preload
-
Is a DOMString
that reflects the preload
HTML attribute, indicating what data should be preloaded, if any. Possible values are: none
, metadata
, auto
.
-
HTMLMediaElement.preservesPitch
-
Is a boolean value that determines if the pitch of the sound will be preserved. If set to false
, the pitch will adjust to the speed of the audio.
-
HTMLMediaElement.readyState
Read only
-
Returns a unsigned short
(enumeration) indicating the readiness state of the media.
-
HTMLMediaElement.seekable
Read only
-
Returns a TimeRanges
object that contains the time ranges that the user is able to seek to, if any.
-
HTMLMediaElement.seeking
Read only
-
Returns a Boolean
that indicates whether the media is in the process of seeking to a new position.
-
HTMLMediaElement.sinkId
Read only
Experimental
-
Returns a DOMString
that is the unique ID of the audio device delivering output, or an empty string if it is using the user agent default. This ID should be one of the MediaDeviceInfo.deviceid
values returned from MediaDevices.enumerateDevices()
, id-multimedia
, or id-communications
.
-
HTMLMediaElement.src
-
Is a DOMString
that reflects the src
HTML attribute, which contains the URL of a media resource to use.
-
HTMLMediaElement.srcObject
-
Is a MediaStream
representing the media to play or that has played in the current HTMLMediaElement
, or null
if not assigned.
-
HTMLMediaElement.textTracks
Read only
-
Returns a TextTrackList
object containing the list of TextTrack
objects contained in the element.
-
HTMLMediaElement.videoTracks
Read only
-
Returns a VideoTrackList
object containing the list of VideoTrack
objects contained in the element.
-
HTMLMediaElement.volume
-
Is a double
indicating the audio volume, from 0.0 (silent) to 1.0 (loudest).