Web/API/HTMLMediaElement

From Get docs


The HTMLMediaElement interface adds to HTMLElement the properties and methods needed to support basic media-related capabilities that are common to audio and video. The HTMLVideoElement and HTMLAudioElement elements both inherit this interface.

Properties

This interface also inherits properties from its ancestors HTMLElement, Element, Node, and EventTarget.

HTMLMediaElement.audioTracks
A AudioTrackList that lists the AudioTrack objects contained in the element.
HTMLMediaElement.autoplay

A Boolean 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.controller
Is a MediaController object that represents the media controller assigned to the element, or null if none is assigned.
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.mediaGroup
A DOMString that reflects the mediagroup HTML attribute, which indicates the name of the group of elements it belongs to. A group of media elements shares a common MediaController.
HTMLMediaElement.mediaKeys Read only '
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 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. This is implemented with prefixes in Firefox (mozPreservesPitch) and WebKit (webkitPreservesPitch).
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 '
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 the list of TextTrack objects contained in the element.
HTMLMediaElement.videoTracks Read only
Returns 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).

Event handlers

HTMLMediaElement.onencrypted
Sets the EventHandler called when the media is encrypted.
HTMLMediaElement.onwaitingforkey
Sets the EventHandler called when playback is blocked while waiting for an encryption key.

Obsolete attributes

These attributes are obsolete and should not be used, even if a browser still supports them.

HTMLMediaElement.initialTime Read only ' '
Returns a double that indicates the initial playback position in seconds.
HTMLMediaElement.mozAudioCaptured Read only '
Returns a Boolean. Related to audio stream capture.
HTMLMediaElement.mozChannels Read only ' '
Returns a double representing the number of channels in the audio resource (e.g., 2 for stereo).
HTMLMediaElement.mozFragmentEnd '
Is a double that provides access to the fragment end time if the media element has a fragment URI for currentSrc, otherwise it is equal to the media duration.
HTMLMediaElement.mozFrameBufferLength ' '

Is a unsigned long that indicates the number of samples that will be returned in the framebuffer of each MozAudioAvailable event. This number is a total for all channels, and by default is set to be the number of channels * 1024 (e.g., 2 channels * 1024 samples = 2048 total).

The mozFrameBufferLength property can be set to a new value for lower latency, larger amounts of data, etc. The size given must be a number between 512 and 16384. Using any other size results in an exception being thrown. The best time to set a new length is after the loadedmetadata event fires, when the audio info is known, but before the audio has started or MozAudioAvailable events have begun firing.

HTMLMediaElement.mozSampleRate Read only ' '
Returns a double representing the number of samples per second that will be played. For example, 44100 samples per second is the sample rate used by CD audio.

Obsolete event handlers

HTMLMediaElement.onmozinterruptbegin ' '
Sets the EventHandler called when the media element is interrupted because of the Audio Channel manager. This was Firefox-specific, having been implemented for Firefox OS, and was removed in Firefox 55.
HTMLMediaElement.onmozinterruptend ' '
Sets the EventHandler called when the interruption is concluded. This was Firefox-specific, having been implemented for Firefox OS, and was removed in Firefox 55.

Methods

This interface also inherits methods from its ancestors HTMLElement, Element, Node, and EventTarget.

HTMLMediaElement.addTextTrack()
Adds a text track (such as a track for subtitles) to a media element.
HTMLMediaElement.captureStream() '
Returns MediaStream, captures a stream of the media content.
HTMLMediaElement.canPlayType()
Given a string specifying a MIME media type (potentially with the codecs parameter included), canPlayType() returns the string probably if the media should be playable, maybe if there's not enough information to determine whether the media will play or not, or an empty string if the media cannot be played.
HTMLMediaElement.fastSeek()
Directly seeks to the given time.
HTMLMediaElement.load()
Resets the media to the beginning and selects the best available source from the sources provided using the src attribute or the <source> element.
HTMLMediaElement.pause()
Pauses the media playback.
HTMLMediaElement.play()
Begins playback of the media.
HTMLMediaElement.seekToNextFrame() ' '
Seeks to the next frame in the media. This non-standard, experimental method makes it possible to manually drive reading and rendering of media at a custom speed, or to move through the media frame-by-frame to perform filtering or other operations.
HTMLMediaElement.setMediaKeys() '
Returns Promise. Sets the MediaKeys keys to use when decrypting media during playback.
HTMLMediaElement.setSinkId() '
Sets the ID of the audio device to use for output and returns a Promise. This only works when the application is authorized to use the specified device.

Obsolete methods

These methods are obsolete and should not be used, even if a browser still supports them.

HTMLMediaElement.mozCaptureStream() '
[enter description]
HTMLMediaElement.mozCaptureStreamUntilEnded() '
[enter description]
HTMLMediaElement.mozGetMetadata() '
Returns Object, which contains properties that represent metadata from the playing media resource as {key: value} pairs. A separate copy of the data is returned each time the method is called. This method must be called after the loadedmetadata event fires.
HTMLMediaElement.mozLoadFrom() ' '
This method, available only in Mozilla's implementation, loads data from another media element. This works similarly to load() except that instead of running the normal resource selection algorithm, the source is simply set to the other element's currentSrc. This is optimized so this element gets access to all of the other element's cached and buffered data; in fact, the two elements share downloaded data, so data downloaded by either element is available to both.

Events

Inherits methods from its parent, HTMLElement , defined in the GlobalEventHandlers mixin. Listen to these events using addEventListener() or by assigning an event listener to the oneventname property of this interface.

abort
Fired when the resource was not fully loaded, but not as the result of an error.
canplay
Fired when the user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content
canplaythrough
Fired when the user agent can play the media, and estimates that enough data has been loaded to play the media up to its end without having to stop for further buffering of content.
durationchange
Fired when the duration attribute has been updated.
emptied
Fired when the media has become empty; for example, when the media has already been loaded (or partially loaded), and the HTMLMediaElement.load() method is called to reload it.
ended
Fired when playback stops when end of the media (<audio> or <video>) is reached or because no further data is available.
error
Fired when the resource could not be loaded due to an error.
loadeddata
Fired when the first frame of the media has finished loading.
loadedmetadata
Fired when the metadata has been loaded
loadstart
Fired when the browser has started to load a resource.
pause
Fired when a request to pause play is handled and the activity has entered its paused state, most commonly occurring when the media's HTMLMediaElement.pause() method is called.
play
Fired when the paused property is changed from true to false, as a result of the HTMLMediaElement.play() method, or the autoplay attribute
playing
Fired when playback is ready to start after having been paused or delayed due to lack of data
progress
Fired periodically as the browser loads a resource.
ratechange
Fired when the playback rate has changed.
seeked
Fired when a seek operation completes
seeking
Fired when a seek operation begins
stalled
Fired when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
suspend
Fired when the media data loading has been suspended.
timeupdate
Fired when the time indicated by the currentTime attribute has been updated.
volumechange
Fired when the volume has changed.
waiting
Fired when playback has stopped because of a temporary lack of data.

Specifications

Specification Status Comment
Encrypted Media ExtensionsThe definition of 'Encrypted Media Extensions' in that specification. Recommendation Adds MediaKeys, MediaEncryptedEvent, setMediaKeys, onencrypted, and onwaitingforkey.
HTML Living StandardThe definition of 'HTMLMediaElement' in that specification. Living Standard No change from HTML5
HTML5The definition of 'HTMLMediaElement' in that specification. Recommendation Initial definition.

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
HTMLMediaElement Chrome

Full support 1

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support 1

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support 11

Safari iOS

Full support 2

Samsung Internet Android

Full support 1.0

abort event Chrome

Full support Yes

Edge

Full support ≤79

Firefox

Full support Yes

IE

?

Opera

Full support Yes

Safari

?

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

?

Safari iOS

?

Samsung Internet Android

Full support Yes

addTextTrack

Chrome Full support 42


Full support 42


Full support 26

Prefixed'

Prefixed' Implemented with the vendor prefix: webkit

Edge

Full support 12

Firefox

Full support Yes

IE

?

Opera

Full support Yes

Safari

Full support Yes

WebView Android Full support 42


Full support 42


Full support Yes

Prefixed'

Prefixed' Implemented with the vendor prefix: webkit

Chrome Android Full support 42


Full support 42


Full support 32

Prefixed'

Prefixed' Implemented with the vendor prefix: webkit

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android Full support 4.0


Full support 4.0


Full support 3.0

Prefixed'

Prefixed' Implemented with the vendor prefix: webkit

audioTracks

Chrome Full support 37

Disabled'

Full support 37

Disabled'

Disabled' From version 37: this feature is behind the enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in Chrome, visit chrome://flags.

Edge Full support 79

Disabled'

Full support 79

Disabled'

Disabled' From version 79: this feature is behind the enable-experimental-web-platform-features preference (needs to be set to enabled). No support 12 — 79


Firefox Full support 33

Disabled'

Full support 33

Disabled'

Disabled' From version 33: this feature is behind the media.track.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

IE

?

Opera Full support 24

Disabled'

Full support 24

Disabled'

Disabled' From version 24: this feature is behind the enable-experimental-web-platform-features preference (needs to be set to enabled).

Safari

Full support 8

WebView Android

No support No

Chrome Android Full support 37

Disabled'

Full support 37

Disabled'

Disabled' From version 37: this feature is behind the enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in Chrome, visit chrome://flags.

Firefox Android Full support 33

Disabled'

Full support 33

Disabled'

Disabled' From version 33: this feature is behind the media.track.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

Opera Android Full support 24

Disabled'

Full support 24

Disabled'

Disabled' From version 24: this feature is behind the enable-experimental-web-platform-features preference (needs to be set to enabled).

Safari iOS

Full support 8

Samsung Internet Android

No support No

autoplay Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 30

Safari

Full support 6

WebView Android

Full support 43

Chrome Android

Full support 43

Firefox Android

Full support Yes

Opera Android

Full support 30

Safari iOS

Full support Yes

Samsung Internet Android

Full support 4.0

buffered Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 4

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support 43

Chrome Android

Full support 43

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 4.0

canplay event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

canplaythrough event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

canPlayType() Chrome

Full support Yes

Edge

Full support 12

Firefox Full support 3.5

Notes'

Full support 3.5

Notes'

Notes' Prior to Firefox 28, canPlayType() returned probably when asked about WebM audio or video files without the codecs parameter. Since multiple codecs are supported, this is not enough information to determine if a file can be played, so maybe is now correctly returned.

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

captureStream Chrome

Full support 62

Edge

Full support 79

Firefox Full support 15

Prefixed'

Full support 15

Prefixed'

Prefixed' Implemented with the vendor prefix: moz

IE

No support No

Opera

Full support 49

Safari

No support No

WebView Android

Full support 62

Chrome Android

Full support 62

Firefox Android Full support 15

Prefixed'

Full support 15

Prefixed'

Prefixed' Implemented with the vendor prefix: moz

Opera Android

Full support 46

Safari iOS

No support No

Samsung Internet Android

Full support 8.0

controller Chrome

No support No

Edge

No support No

Firefox No support No

Notes'

No support No

Notes'

Notes' Firefox doesn't implement this yet. See bug 847377.

IE

?

Opera

No support No

Safari

?

WebView Android

No support No

Chrome Android

No support No

Firefox Android No support No

Notes'

No support No

Notes'

Notes' Firefox doesn't implement this yet. See bug 847377.

Opera Android

No support No

Safari iOS

?

Samsung Internet Android

No support No

controls Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support 43

Chrome Android

Full support 43

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 4.0

controlsList Chrome

Full support 58

Edge

Full support ≤79

Firefox

?

IE

?

Opera

Full support 45

Safari

?

WebView Android

Full support 58

Chrome Android

Full support 58

Firefox Android

?

Opera Android

Full support 43

Safari iOS

?

Samsung Internet Android

Full support 7.0

crossOrigin Chrome

Full support 43

Edge

Full support 13

Firefox Full support 22


Full support 22


No support 12 — 22

Alternate Name'

Alternate Name' Uses the non-standard name: crossorigin

IE

Full support 9

Opera

Full support Yes

Safari

Full support 10

WebView Android

Full support 43

Chrome Android

Full support 43

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 4.0

currentSrc Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support 43

Chrome Android

Full support 43

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 4.0

currentTime Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support 43

Chrome Android

Full support 43

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 4.0

defaultMuted Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 11

IE

No support No

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support 43

Chrome Android

Full support 43

Firefox Android

Full support 14

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 4.0

defaultPlaybackRate Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 20

IE

Full support 9

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support 43

Chrome Android

Full support 43

Firefox Android

Full support 20

Opera Android

?

Safari iOS

?

Samsung Internet Android

Full support 4.0

disableRemotePlayback Chrome

Full support 49

Edge

Full support 12

Firefox

Full support 20

IE

Full support 9

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support 49

Chrome Android

Full support 49

Firefox Android

Full support 15

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 5.0

duration Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support 43

Chrome Android

Full support 43

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 4.0

durationchange event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

emptied event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

ended Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support 43

Chrome Android

Full support 43

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 4.0

ended event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

error Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support 43

Chrome Android

Full support 43

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 4.0

error event Chrome

Full support Yes

Edge

Full support ≤79

Firefox

Full support Yes

IE

?

Opera

Full support Yes

Safari

?

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

?

Safari iOS

?

Samsung Internet Android

Full support Yes

fastSeek Chrome

No support No

Edge

No support No

Firefox

Full support 31

IE

No support No

Opera

?

Safari

Full support Yes

WebView Android

?

Chrome Android

?

Firefox Android

Full support 31

Opera Android

?

Safari iOS

?

Samsung Internet Android

?

initialTime

Deprecated'Non-standard'

Chrome

?

Edge

?

Firefox

No support 9 — 23

IE

?

Opera

?

Safari

?

WebView Android

?

Chrome Android

?

Firefox Android

No support 9 — 23

Opera Android

?

Safari iOS

?

Samsung Internet Android

?

load Chrome

Full support 1

Edge

Full support 12

Firefox

Full support 3.6

IE

?

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support 1

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

loadeddata event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

loadedmetadata event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

loadstart event Chrome

Full support Yes

Edge

Full support ≤79

Firefox

Full support Yes

IE

?

Opera

Full support Yes

Safari

?

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

?

Safari iOS

?

Samsung Internet Android

Full support Yes

loop Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 11

IE

Full support 9

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support 43

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

?

Safari iOS

?

Samsung Internet Android

Full support Yes

mediaGroup Chrome

No support No

Edge

No support No

Firefox No support No

Notes'

No support No

Notes'

Notes' Firefox doesn't implement this yet. See bug 847377.

IE

?

Opera

?

Safari

?

WebView Android

No support No

Chrome Android

No support No

Firefox Android No support No

Notes'

No support No

Notes'

Notes' Firefox doesn't implement this yet. See bug 847377.

Opera Android

?

Safari iOS

?

Samsung Internet Android

No support No

mediaKeys Chrome

Full support Yes

Edge

Full support 13

Firefox

Full support Yes

IE

No support No

Opera

Full support Yes

Safari

?

WebView Android

?

Chrome Android

?

Firefox Android

?

Opera Android

?

Safari iOS

?

Samsung Internet Android

?

mozAudioCaptured

Deprecated'Non-standard'

Chrome

?

Edge

?

Firefox

?

IE

?

Opera

?

Safari

?

WebView Android

?

Chrome Android

?

Firefox Android

?

Opera Android

?

Safari iOS

?

Samsung Internet Android

?

mozCaptureStreamUntilEnded

Deprecated'Non-standard'

Chrome

?

Edge

?

Firefox

?

IE

?

Opera

?

Safari

?

WebView Android

?

Chrome Android

?

Firefox Android

?

Opera Android

?

Safari iOS

?

Samsung Internet Android

?

mozChannels

Deprecated'Non-standard'

Chrome

No support No

Edge

No support No

Firefox

Full support 4

IE

No support No

Opera

No support No

Safari

No support No

WebView Android

No support No

Chrome Android

No support No

Firefox Android

Full support 4

Opera Android

No support No

Safari iOS

No support No

Samsung Internet Android

No support No

mozFragmentEnd

Deprecated'Non-standard'

Chrome

?

Edge

?

Firefox

?

IE

?

Opera

?

Safari

?

WebView Android

?

Chrome Android

?

Firefox Android

?

Opera Android

?

Safari iOS

?

Samsung Internet Android

?

mozFrameBufferLength

Deprecated'Non-standard'

Chrome

No support No

Edge

No support No

Firefox

Full support 4

IE

No support No

Opera

No support No

Safari

No support No

WebView Android

No support No

Chrome Android

No support No

Firefox Android

Full support 4

Opera Android

No support No

Safari iOS

No support No

Samsung Internet Android

No support No

mozGetMetadata Chrome

No support No

Edge

No support No

Firefox

Full support 17

IE

No support No

Opera

No support No

Safari

No support No

WebView Android

No support No

Chrome Android

No support No

Firefox Android

Full support 17

Opera Android

No support No

Safari iOS

No support No

Samsung Internet Android

No support No

mozLoadFrom

Deprecated'Non-standard'

Chrome

No support No

Edge

No support No

Firefox

No support 3.6 — 24

IE

No support No

Opera

No support No

Safari

No support No

WebView Android

No support No

Chrome Android

No support No

Firefox Android

No support 4 — 24

Opera Android

No support No

Safari iOS

No support No

Samsung Internet Android

No support No

mozSampleRate

Deprecated'Non-standard'

Chrome

No support No

Edge

No support No

Firefox

Full support 4

IE

No support No

Opera

No support No

Safari

No support No

WebView Android

No support No

Chrome Android

No support No

Firefox Android

Full support 4

Opera Android

No support No

Safari iOS

No support No

Samsung Internet Android

No support No

muted Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

networkState Chrome

Full support 43

Edge

Full support 12

Firefox Full support 3.5

Notes'

Full support 3.5

Notes'

Notes' The NETWORK_LOADED state was removed to align with the HTML spec in Firefox 4.

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

onencrypted Chrome

Full support Yes

Edge

Full support 13

Firefox

Full support Yes

IE

No support No

Opera

Full support Yes

Safari

?

WebView Android

?

Chrome Android

?

Firefox Android

?

Opera Android

?

Safari iOS

?

Samsung Internet Android

?

onerror Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

onmozinterruptbegin

Deprecated'Non-standard'

Chrome

?

Edge

?

Firefox

No support ? — 55

IE

?

Opera

?

Safari

?

WebView Android

?

Chrome Android

?

Firefox Android

No support ? — 55

Opera Android

?

Safari iOS

?

Samsung Internet Android

?

onmozinterruptend Chrome

?

Edge

?

Firefox

No support ? — 55

IE

?

Opera

?

Safari

?

WebView Android

?

Chrome Android

?

Firefox Android

No support ? — 55

Opera Android

?

Safari iOS

?

Samsung Internet Android

?

onwaitingforkey Chrome

Full support 55

Edge

Full support 79

Firefox

Full support Yes

IE

No support No

Opera

Full support 42

Safari

?

WebView Android

Full support 55

Chrome Android

Full support 55

Firefox Android

?

Opera Android

Full support 42

Safari iOS

?

Samsung Internet Android

Full support 6.0

pause Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

pause event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

paused Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

play Chrome

Full support 1

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 6

WebView Android

Full support 1

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support 11

Safari iOS

Full support 6

Samsung Internet Android

Full support 1.0

play event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

playbackRate Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 20

IE

Full support 9

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support 20

Opera Android

?

Safari iOS

?

Samsung Internet Android

Full support Yes

played Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 15

IE

Full support 9

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support 15

Opera Android

?

Safari iOS

?

Samsung Internet Android

Full support Yes

playing event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

preload Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 4

IE

Full support 9

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support 4

Opera Android

?

Safari iOS

?

Samsung Internet Android

Full support Yes

preservesPitch

Deprecated'

Chrome Full support Yes

Prefixed'

Full support Yes

Prefixed'

Prefixed' Implemented with the vendor prefix: webkit

Edge Full support 79

Prefixed'

Full support 79

Prefixed'

Prefixed' Implemented with the vendor prefix: webkit

Firefox Full support 20

Prefixed'

Full support 20

Prefixed'

Prefixed' Implemented with the vendor prefix: moz

IE

No support No

Opera

No support No

Safari Full support 4

Prefixed'

Full support 4

Prefixed'

Prefixed' Implemented with the vendor prefix: webkit

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

No support No

Safari iOS Full support 4

Prefixed'

Full support 4

Prefixed'

Prefixed' Implemented with the vendor prefix: webkit

Samsung Internet Android

Full support Yes

progress event Chrome

Full support Yes

Edge

Full support ≤79

Firefox

Full support Yes

IE

?

Opera

Full support Yes

Safari

?

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

?

Safari iOS

?

Samsung Internet Android

Full support Yes

ratechange event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

readyState Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support 43

Chrome Android

Full support 43

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 4.0

seekable Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 8

IE

Full support 9

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support 8

Opera Android

?

Safari iOS

?

Samsung Internet Android

Full support Yes

seeked event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

seeking Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

seeking event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

seekToNextFrame

Experimental'Deprecated'

Chrome

No support No

Edge

No support No

Firefox Full support 49

Disabled'

Full support 49

Disabled'

Disabled' From version 49: this feature is behind the media.seekToNextFrame preference (needs to be set to true). To change preferences in Firefox, visit about:config.

IE

?

Opera

?

Safari

?

WebView Android

No support No

Chrome Android

?

Firefox Android Full support 49

Disabled'

Full support 49

Disabled'

Disabled' From version 49: this feature is behind the media.seekToNextFrame preference (needs to be set to true). To change preferences in Firefox, visit about:config.

Opera Android

?

Safari iOS

?

Samsung Internet Android

?

setMediaKeys Chrome

Full support Yes

Edge

Full support 13

Firefox

Full support Yes

IE

No support No

Opera

Full support Yes

Safari

?

WebView Android

?

Chrome Android

?

Firefox Android

?

Opera Android

?

Safari iOS

?

Samsung Internet Android

?

setSinkId Chrome

Full support 49

Edge

Full support 17

Firefox Full support 64

Disabled'

Full support 64

Disabled'

Disabled' From version 64: this feature is behind the media.setsinkid.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

IE

No support No

Opera

Full support 36

Safari

?

WebView Android No support No

Notes'

No support No

Notes'

Notes' Not availabe due to a limitation in Android.

Chrome Android No support No

Notes'

No support No

Notes'

Notes' Not availabe due to a limitation in Android.

Firefox Android Full support 64

Disabled'

Full support 64

Disabled'

Disabled' From version 64: this feature is behind the media.setsinkid.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

Opera Android

Full support 36

Safari iOS

?

Samsung Internet Android No support No

Notes'

No support No

Notes'

Notes' Not availabe due to a limitation in Android.

sinkId

Experimental'

Chrome

Full support 49

Edge

Full support 17

Firefox

?

IE

No support No

Opera

Full support Yes

Safari

?

WebView Android

Full support 49

Chrome Android

Full support 49

Firefox Android

?

Opera Android

?

Safari iOS

?

Samsung Internet Android

Full support 5.0

src Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

srcObject

Chrome Partial support 52

Notes'

Partial support 52

Notes'

Notes' Currently only supports MediaStream objects.

Edge Partial support 12

Notes'

Partial support 12

Notes'

Notes' Currently only supports MediaStream objects.

Firefox Partial support 42

Notes'

Partial support 42

Notes'

Notes' Currently only supports MediaStream objects. No support 18 — 58

Prefixed'

Prefixed' Implemented with the vendor prefix: moz

IE

No support No

Opera Partial support 39

Notes'

Partial support 39

Notes'

Notes' Currently only supports MediaStream objects.

Safari

Full support 11

WebView Android Partial support 52

Notes'

Partial support 52

Notes'

Notes' Currently only supports MediaStream objects.

Chrome Android Partial support 52

Notes'

Partial support 52

Notes'

Notes' Currently only supports MediaStream objects.

Firefox Android Partial support 42

Notes'

Partial support 42

Notes'

Notes' Currently only supports MediaStream objects. No support 18 — 58

Prefixed'

Prefixed' Implemented with the vendor prefix: moz

Opera Android Partial support 41

Notes'

Partial support 41

Notes'

Notes' Currently only supports MediaStream objects.

Safari iOS

Full support 11

Samsung Internet Android Partial support 6.0

Notes'

Partial support 6.0

Notes'

Notes' Currently only supports MediaStream objects.

stalled event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

suspend event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

textTracks Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support Yes

IE

?

Opera

Full support Yes

Safari

Full support 8

WebView Android

?

Chrome Android

?

Firefox Android

?

Opera Android

?

Safari iOS

Full support 8

Samsung Internet Android

?

timeupdate event Chrome

Full support 3

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support 10.5

Safari

Full support 3.1

WebView Android

Full support Yes

Chrome Android

Full support 18

Firefox Android

Full support 4

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support 1.0

videoTracks

Chrome Full support 37

Disabled'

Full support 37

Disabled'

Disabled' From version 37: this feature is behind the enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in Chrome, visit chrome://flags.

Edge Full support 79

Disabled'

Full support 79

Disabled'

Disabled' From version 79: this feature is behind the enable-experimental-web-platform-features preference (needs to be set to enabled). No support 12 — 79


Firefox Full support 33

Disabled'

Full support 33

Disabled'

Disabled' From version 33: this feature is behind the media.track.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

IE

No support No

Opera Full support 24

Disabled'

Full support 24

Disabled'

Disabled' From version 24: this feature is behind the enable-experimental-web-platform-features preference (needs to be set to enabled).

Safari

Full support 8

WebView Android

No support No

Chrome Android Full support 37

Disabled'

Full support 37

Disabled'

Disabled' From version 37: this feature is behind the enable-experimental-web-platform-features preference (needs to be set to enabled). To change preferences in Chrome, visit chrome://flags.

Firefox Android Full support 33

Disabled'

Full support 33

Disabled'

Disabled' From version 33: this feature is behind the media.track.enabled preference (needs to be set to true). To change preferences in Firefox, visit about:config.

Opera Android Full support 24

Disabled'

Full support 24

Disabled'

Disabled' From version 24: this feature is behind the enable-experimental-web-platform-features preference (needs to be set to enabled).

Safari iOS

Full support 8

Samsung Internet Android

No support No

volume Chrome

Full support 43

Edge

Full support 12

Firefox

Full support 3.5

IE

Full support 9

Opera

Full support Yes

Safari

Full support 6

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

volumechange event Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support Yes

IE

Full support 9

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

waiting event Chrome

Full support Yes

Edge

Full support 12

Firefox

Full support Yes

IE

Full support 9

Opera

Full support Yes

Safari

Full support Yes

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox Android

Full support Yes

Opera Android

Full support Yes

Safari iOS

Full support Yes

Samsung Internet Android

Full support Yes

Legend

Full support  
Full support
Partial support  
Partial support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.'
Experimental. Expect behavior to change in the future.
Non-standard. Expect poor cross-browser support.'
Non-standard. Expect poor cross-browser support.
Deprecated. Not for use in new websites.'
Deprecated. Not for use in new websites.
See implementation notes.'
See implementation notes.
User must explicitly enable this feature.'
User must explicitly enable this feature.
Uses a non-standard name.'
Uses a non-standard name.
Requires a vendor prefix or different name for use.'
Requires a vendor prefix or different name for use.


See also

References

Guides