HTMLMediaElement

翻译不完整。 请帮助我们翻译这篇文章!

HTML媒体元素接口在属性和方法中添加了 HTML元素来支持基础的媒体相关的能力,就像audio和video一样。HTML 视频元素和 HTML 音频元素元素都继承自此接口。

特性

从父级 HTMLElement, Element, Node, 和 EventTarget 继承属性

名称 类型 描述
audioTracks AudioTrackList

表示在该元素中包含的AudioTrack对象列表

autoplay Boolean

表示autoplay的HTML属性,表明在视频加载可用时是否不中断地自动播放资源

buffered 只读 TimeRanges buffered属性会告诉浏览器哪一部分的媒体已经被下载(如果浏览器支持的话),按照标准会返回一个TimeRanges对象
controller MediaController

返回当前媒体控制器的MediaController 对象,如果没有连接就返回null

controls Boolean 映射在HTML标签。controls属性控制是否显示用户播放界面的控制 HTML
crossOrigin DOMString 一个表示媒体元素 CORS 设置DOMString。从 CORS settings attributes 查看更多详情
currentSrc 只读 DOMString DOMString表示媒体文件的绝对URL。如果networkStateEMPTY,那么值为空字符串。
currentTime double 当前播放时间,单位为秒。为其赋值将会使媒体跳到一个新的时间。
defaultMuted Boolean 映射在HTML标签上。 muted 属性表示媒体声音被播放时是否应该被静音。这个属性不能动态设置静音/不静音,如果希望设置静音/不静音,请使用 muted 属性
defaultPlaybackRate double 控制媒体的播放速度。1.0表示正常的播放速度,如果值小于1.0,则播放速度会比”正常速度“慢,如果值大于1.0,则播放速度会比”正常速度“快。0.0是一个无效的值,并且会抛出 NOT_SUPPORTED_ERR 错误。
duration 只读 double 媒体以秒为单位的总长度时间,如果媒体不可用,则为0.  如果媒体可用,但时间长度未知, 值为NAN. 如果媒体是以stream形式传输并且没有预定长度,则值为Inf。
ended 只读 Boolean 表示媒体是否已经播放完毕。
error 只读 MediaError MediaError 对象表示最近的错误,如果没有错误则值为 null
initialTime 只读 double 初始播放位置(以秒为单位)。
loop Boolean 会映射在HTML标签  loop 属性 , 决定该媒体是否循环播放.
mediaGroup DOMString 反映在HTML mediagroup 标签上。 表示元素所归属的分组,同一组的媒体元素会共享同一个控制器(controller)。
mediaKeys 只读 MediaKeys Returns a reference to the MediaKeys interface, which is a set of keys that an associated HTMLMediaElement can use for decription of media data during playback.
mozAudioChannelType DOMString Can be used to set the audio channel that the sound coming from an <audio> or <video> element will play in, on a Firefox OS device. See Using the AudioChannels API for more details.
mozChannels 只读 long 声道数 (比如 2 是立体声).
mozFrameBufferLength long

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, or 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.

mozSampleRate 只读 long 播放内容的采样率(每秒采样次数)。比如,44100 就是一张CD的采样率。
mozSrcObject MediaStream Lets you set or get the Media Stream to be played or being played.
muted Boolean 静音时为true ,否则是false .
networkState unsigned short 获取媒体时的网络状态
常量定义 描述
NETWORK_EMPTY 0 还没数据。readyState 是 HAVE_NOTHING.
NETWORK_IDLE 1
NETWORK_LOADING 2 正在加载.
NETWORK_NO_SOURCE[1] 3
paused 只读 Boolean 指示媒体元素是否被暂停。
playbackRate double

The current rate at which the media is being played back. This is used to implement user controls for fast forward, slow motion, and so forth. The normal playback rate is multiplied by this value to obtain the current rate, so a value of 1.0 indicates normal speed.

If the playbackRate is negative, the media is played backwards.
The audio is muted when the media plays backwards or if the fast forward or slow motion is outside a useful range (E.g. Gecko mute the sound outside the range 0.25 and 5.0).

The pitch of the audio is corrected by default and is the same for every speed. Some browsers implement the non-standard preservespitch property to control this.

played 只读 TimeRanges 媒体可被播放的范围。
preload DOMString Reflects the preload HTML attribute, indicating what data should be preloaded, if any. Possible values are: none, metadata, auto. See preload attribute documentation for details.
readyState 只读 unsigned short The readiness state of the media.
Constant Value Description
HAVE_NOTHING 0 No information is available about the media resource.
HAVE_METADATA 1 Enough of the media resource has been retrieved that the metadata attributes are initialized.  Seeking will no longer raise an exception.
HAVE_CURRENT_DATA 2 Data is available for the current playback position, but not enough to actually play more than one frame.
HAVE_FUTURE_DATA 3 Data for the current playback position as well as for at least a little bit of time into the future is available (in other words, at least two frames of video, for example).
HAVE_ENOUGH_DATA 4 Enough data is available—and the download rate is high enough—that the media can be played through to the end without interruption.
seekable 只读 TimeRanges The time ranges that the user is able to seek to, if any.
seeking 只读 Boolean Indicates whether the media is in the process of seeking to a new position.
sinkId 只读 DOMString 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.enumeratedDevices(), id-multimedia, or id-communications.
src DOMString Reflects the src HTML attribute, containing the URL of a media resource to use. Gecko implements a similar functionality for streams: mozSrcObject.
textTracks TextTrackList Represents the list of TextTrack objects contained in the element.
videoTracks VideoTrackList Represents the list of VideoTrack objects contained in the element.

Note: Yet Gecko supports only single track playback, and the parsing of tracks' metadata is only available for media with Ogg container foramt.

volume double 表示音频的音量。值从0.0(静音)到1.0(最大音量)。

Methods

Inherits methods from its parent, HTMLElement.

Name & Arguments Return Description
canPlayType(in DOMString type)

DOMString

  • probably: if the specified type appears to be playable.
  • maybe: if it's impossible to tell whether the type is playable without playing it.
  • The empty string: if the specified type definitely cannot be played.
Determines whether the specified media type can be played back.

Note: Previously canPlayType('video/webm') returned 'probably'. Starting with Gecko 28 (Firefox 28 / Thunderbird 28 / SeaMonkey 2.25 / Firefox OS 1.3), it returns 'maybe'. (bug 884275)

fastSeek(double time) void Directly seek to the given time.
load() void Reset the media element and restart selecting the media resource.  Any pending events are discarded.  How much media data is fetched is still affected by the preload attribute.  This method can be useful for releasing resources after any src attribute and source element descendants have been removed.  Otherwise, it is usually unnecessary to use this method, unless required to rescan source element children after dynamic changes.
mozGetMetadata() Object The mozGetMetadata method returns a javascript object whose properties 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.
mozLoadFrom(HTMLMediaElement other) void This method, available only in old 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 that data downloaded by either element is available to both.
pause() void 暂停播放。
play() void 开始播放。
setMediaKeys  Promise Sets the MediaKeys keys to use when decrypting media during playback.
setSinkId Promise Sets the ID of the audio device through which audio output should be rendered if the application is authorized to play out of a given device.

Events

Audio and Video elements can fire quite a few different events.

Specifications

Specification Status Comment
HTML Living Standard
HTMLMediaElement
Living Standard No change from HTML5
HTML5
HTMLMediaElement
Recommendation Initial definition.
Unknown
Encrypted Media Extensions
Unknown Adds MediaKeys,  MediaEncryptedEvent, and setMediaKeys.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
HTMLMediaElementChrome Full support 1Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support 1Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 11Safari iOS Full support 2Samsung Internet Android Full support 1.0
abort eventChrome Full support YesEdge Full support ≤79Firefox Full support YesIE ? Opera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android Full support Yes
addTextTrackChrome Full support 42
Full support 42
Full support 26
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Edge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support YesWebView 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 YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 4.0
Full support 4.0
Full support 3.0
Prefixed
Prefixed Implemented with the vendor prefix: webkit
audioTracksChrome 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 8WebView Android No support NoChrome 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 8Samsung Internet Android No support No
autoplayChrome Full support 43Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 30Safari Full support 6WebView Android Full support 43Chrome Android Full support 43Firefox Android Full support YesOpera Android Full support 30Safari iOS Full support YesSamsung Internet Android Full support 4.0
bufferedChrome Full support 43Edge Full support 12Firefox Full support 4IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 4.0
canplay eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
canplaythrough eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
canPlayType()Chrome Full support YesEdge Full support 12Firefox 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 9Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
captureStreamChrome Full support 62Edge Full support 79Firefox Full support 15
Prefixed
Full support 15
Prefixed
Prefixed Implemented with the vendor prefix: moz
IE No support NoOpera Full support 49Safari No support NoWebView Android Full support 62Chrome Android Full support 62Firefox Android Full support 15
Prefixed
Full support 15
Prefixed
Prefixed Implemented with the vendor prefix: moz
Opera Android Full support 46Safari iOS No support NoSamsung Internet Android Full support 8.0
controllerChrome No support NoEdge No support NoFirefox No support No
Notes
No support No
Notes
Notes Firefox doesn't implement this yet. See bug 847377.
IE ? Opera No support NoSafari ? WebView Android No support NoChrome Android No support NoFirefox Android No support No
Notes
No support No
Notes
Notes Firefox doesn't implement this yet. See bug 847377.
Opera Android No support NoSafari iOS ? Samsung Internet Android No support No
controlsChrome Full support 43Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 4.0
controlsListChrome Full support 58Edge Full support ≤79Firefox ? IE ? Opera Full support 45Safari ? WebView Android Full support 58Chrome Android Full support 58Firefox Android ? Opera Android Full support 43Safari iOS ? Samsung Internet Android Full support 7.0
crossOriginChrome Full support 43Edge Full support 13Firefox Full support 22
Full support 22
No support 12 — 22
Alternate Name
Alternate Name Uses the non-standard name: crossorigin
IE Full support 9Opera Full support YesSafari Full support 10WebView Android Full support 43Chrome Android Full support 43Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 4.0
currentSrcChrome Full support 43Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 4.0
currentTimeChrome Full support 43Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 4.0
defaultMutedChrome Full support 43Edge Full support 12Firefox Full support 11IE No support NoOpera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Firefox Android Full support 14Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 4.0
defaultPlaybackRateChrome Full support 43Edge Full support 12Firefox Full support 20IE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support 43Chrome Android Full support 43Firefox Android Full support 20Opera Android ? Safari iOS ? Samsung Internet Android Full support 4.0
disableRemotePlaybackChrome Full support 49Edge Full support 12Firefox Full support 20IE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support 49Chrome Android Full support 49Firefox Android Full support 15Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 5.0
durationChrome Full support 43Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 4.0
durationchange eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
emptied eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
endedChrome Full support 43Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 4.0
ended eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
errorChrome Full support 43Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 4.0
error eventChrome Full support YesEdge Full support ≤79Firefox Full support YesIE ? Opera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android Full support Yes
fastSeekChrome No support NoEdge No support NoFirefox Full support 31IE No support NoOpera ? Safari Full support YesWebView Android ? Chrome Android ? Firefox Android Full support 31Opera Android ? Safari iOS ? Samsung Internet Android ?
initialTime
DeprecatedNon-standard
Chrome ? Edge ? Firefox No support 9 — 23IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android No support 9 — 23Opera Android ? Safari iOS ? Samsung Internet Android ?
loadChrome Full support 1Edge Full support 12Firefox Full support 3.6IE ? Opera Full support YesSafari Full support 6WebView Android Full support 1Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
loadeddata eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
loadedmetadata eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
loadstart eventChrome Full support YesEdge Full support ≤79Firefox Full support YesIE ? Opera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android Full support Yes
loopChrome Full support 43Edge Full support 12Firefox Full support 11IE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support 43Chrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android Full support Yes
mediaGroupChrome No support NoEdge No support NoFirefox 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 NoChrome Android No support NoFirefox 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
mediaKeysChrome Full support YesEdge Full support 13Firefox Full support YesIE No support NoOpera Full support YesSafari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
mozAudioCaptured
DeprecatedNon-standard
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
mozCaptureStreamUntilEnded
DeprecatedNon-standard
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
mozChannels
DeprecatedNon-standard
Chrome No support NoEdge No support NoFirefox Full support 4IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
mozFragmentEnd
DeprecatedNon-standard
Chrome ? Edge ? Firefox ? IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
mozFrameBufferLength
DeprecatedNon-standard
Chrome No support NoEdge No support NoFirefox Full support 4IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
mozGetMetadataChrome No support NoEdge No support NoFirefox Full support 17IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android Full support 17Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
mozLoadFrom
DeprecatedNon-standard
Chrome No support NoEdge No support NoFirefox No support 3.6 — 24IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android No support 4 — 24Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
mozSampleRate
DeprecatedNon-standard
Chrome No support NoEdge No support NoFirefox Full support 4IE No support NoOpera No support NoSafari No support NoWebView Android No support NoChrome Android No support NoFirefox Android Full support 4Opera Android No support NoSafari iOS No support NoSamsung Internet Android No support No
mutedChrome Full support 43Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
networkStateChrome Full support 43Edge Full support 12Firefox 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 9Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onencryptedChrome Full support YesEdge Full support 13Firefox Full support YesIE No support NoOpera Full support YesSafari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
onerrorChrome Full support YesEdge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
onmozinterruptbegin
DeprecatedNon-standard
Chrome ? Edge ? Firefox No support ? — 55IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android No support ? — 55Opera Android ? Safari iOS ? Samsung Internet Android ?
onmozinterruptendChrome ? Edge ? Firefox No support ? — 55IE ? Opera ? Safari ? WebView Android ? Chrome Android ? Firefox Android No support ? — 55Opera Android ? Safari iOS ? Samsung Internet Android ?
onwaitingforkeyChrome Full support 55Edge Full support 79Firefox Full support YesIE No support NoOpera Full support 42Safari ? WebView Android Full support 55Chrome Android Full support 55Firefox Android ? Opera Android Full support 42Safari iOS ? Samsung Internet Android Full support 6.0
pauseChrome Full support YesEdge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
pause eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
pausedChrome Full support 43Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
playChrome Full support 1Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 6WebView Android Full support 1Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 11Safari iOS Full support 6Samsung Internet Android Full support 1.0
play eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
playbackRateChrome Full support 43Edge Full support 12Firefox Full support 20IE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 20Opera Android ? Safari iOS ? Samsung Internet Android Full support Yes
playedChrome Full support 43Edge Full support 12Firefox Full support 15IE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 15Opera Android ? Safari iOS ? Samsung Internet Android Full support Yes
playing eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
preloadChrome Full support 43Edge Full support 12Firefox Full support 4IE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4Opera 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 NoOpera No support NoSafari Full support 4
Prefixed
Full support 4
Prefixed
Prefixed Implemented with the vendor prefix: webkit
WebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android No support NoSafari iOS Full support 4
Prefixed
Full support 4
Prefixed
Prefixed Implemented with the vendor prefix: webkit
Samsung Internet Android Full support Yes
progress eventChrome Full support YesEdge Full support ≤79Firefox Full support YesIE ? Opera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android ? Safari iOS ? Samsung Internet Android Full support Yes
ratechange eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
readyStateChrome Full support 43Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support 43Chrome Android Full support 43Firefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 4.0
seekableChrome Full support 43Edge Full support 12Firefox Full support 8IE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support 8Opera Android ? Safari iOS ? Samsung Internet Android Full support Yes
seeked eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
seekingChrome Full support 43Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
seeking eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
seekToNextFrame
ExperimentalDeprecated
Chrome No support NoEdge No support NoFirefox 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 NoChrome 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 ?
setMediaKeysChrome Full support YesEdge Full support 13Firefox Full support YesIE No support NoOpera Full support YesSafari ? WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android ?
setSinkIdChrome Full support 49Edge Full support 17Firefox 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 NoOpera Full support 36Safari ? 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 36Safari 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 49Edge Full support 17Firefox ? IE No support NoOpera Full support YesSafari ? WebView Android Full support 49Chrome Android Full support 49Firefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android Full support 5.0
srcChrome Full support 43Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
srcObjectChrome 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 NoOpera Partial support 39
Notes
Partial support 39
Notes
Notes Currently only supports MediaStream objects.
Safari Full support 11WebView 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 11Samsung Internet Android Partial support 6.0
Notes
Partial support 6.0
Notes
Notes Currently only supports MediaStream objects.
stalled eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
suspend eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
textTracksChrome Full support YesEdge Full support 12Firefox Full support YesIE ? Opera Full support YesSafari Full support 8WebView Android ? Chrome Android ? Firefox Android ? Opera Android ? Safari iOS Full support 8Samsung Internet Android ?
timeupdate eventChrome Full support 3Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support 10.5Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support 1.0
videoTracksChrome 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 NoOpera 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 8WebView Android No support NoChrome 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 8Samsung Internet Android No support No
volumeChrome Full support 43Edge Full support 12Firefox Full support 3.5IE Full support 9Opera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
volumechange eventChrome Full support YesEdge Full support 12Firefox Full support YesIE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes
waiting eventChrome Full support YesEdge Full support 12Firefox Full support YesIE Full support 9Opera Full support YesSafari Full support YesWebView Android Full support YesChrome Android Full support YesFirefox Android Full support YesOpera Android Full support YesSafari iOS Full support YesSamsung 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