Interface

HTMLMediaElement

HTMLMediaElement

Adds to HTMLElement the properties and methods needed to support basic media-related capabilities that are common to audio and video.

View Source js/lib.dom.d.ts, line 3082

Members

boolean

# autoplay

Gets or sets a value that indicates whether to start playing the media automatically.

View Source js/lib.dom.d.ts, line 3085

TimeRanges

# buffered

Gets a collection of buffered time ranges.

View Source js/lib.dom.d.ts, line 3090

CanPlayTypeResult

# canPlayType

Returns a string that specifies whether the client can play a given media resource type.

View Source js/lib.dom.d.ts, line 3185

boolean

# controls

Gets or sets a flag that indicates whether the client provides a set of controls for the media (in case the developer does not include controls for the player).

View Source js/lib.dom.d.ts, line 3095

string

# currentSrc

Gets the address or URL of the current media resource that is selected by IHTMLMediaElement.

View Source js/lib.dom.d.ts, line 3100

number

# currentTime

Gets or sets the current playback position, in seconds.

View Source js/lib.dom.d.ts, line 3105

number

# defaultPlaybackRate

Gets or sets the default playback rate when the user is not using fast forward or reverse for a video or audio resource.

View Source js/lib.dom.d.ts, line 3110

number

# duration

Returns the duration in seconds of the current media resource. A NaN value is returned if duration is not available, or Infinity if the media resource is streaming.

View Source js/lib.dom.d.ts, line 3115

boolean

# ended

Gets information about whether the playback has ended or not.

View Source js/lib.dom.d.ts, line 3120

MediaError | null

# error

Returns an object representing the current error state of the audio or video element.

View Source js/lib.dom.d.ts, line 3125

void

# load

Resets the audio or video object and loads a new media resource.

View Source js/lib.dom.d.ts, line 3190

boolean

# loop

Gets or sets a flag to specify whether playback should restart after it completes.

View Source js/lib.dom.d.ts, line 3130

boolean

# muted

Gets or sets a flag that indicates whether the audio (either audio or the audio track on video media) is muted.

View Source js/lib.dom.d.ts, line 3135

number

# networkState

Gets the current network activity for the element.

View Source js/lib.dom.d.ts, line 3140

void

# pause

Pauses the current playback and sets paused to TRUE. This can be used to test whether the media is playing or paused. You can also use the pause or play events to tell whether the media is playing or not.

View Source js/lib.dom.d.ts, line 3195

boolean

# paused

Gets a flag that specifies whether playback is paused.

View Source js/lib.dom.d.ts, line 3145

Promise.<void>

# play

Loads and starts playback of a media resource.

View Source js/lib.dom.d.ts, line 3200

number

# playbackRate

Gets or sets the current rate of speed for the media resource to play. This speed is expressed as a multiple of the normal speed of the media resource.

View Source js/lib.dom.d.ts, line 3150

TimeRanges

# played

Gets TimeRanges for the current media resource that has been played.

View Source js/lib.dom.d.ts, line 3155

string

# preload

Gets or sets the current playback position, in seconds.

View Source js/lib.dom.d.ts, line 3160

TimeRanges

# seekable

Returns a TimeRanges object that represents the ranges of the current media resource that can be seeked.

View Source js/lib.dom.d.ts, line 3165

boolean

# seeking

Gets a flag that indicates whether the client is currently moving to a new playback position in the media resource.

View Source js/lib.dom.d.ts, line 3170

string

# src

The address or URL of the a media resource that is to be considered.

View Source js/lib.dom.d.ts, line 3175

number

# volume

Gets or sets the volume level for audio portions of the media element.

View Source js/lib.dom.d.ts, line 3180