HTMLMediaElement
An abstract superclass for media classes that display audio or video in webpages. This class defines common properties and methods inherited by the Htmlaudioelement and Htmlvideoelement classes representing the HTML audio and video elements.
Declaration
interface HTMLMediaElementOverview
Handling Events
The different types of media events that can occur are described in Table 1.
Event | Description |
|---|---|
| Sent when the browser stops fetching the media data before the media resource was completely downloaded. |
| Sent when the browser can resume playback of the media data, but estimates that if playback is started now, the media resource could not be rendered at the current playback rate up to its end without having to stop for further buffering of content. |
| Sent when the browser estimates that if playback is started now, the media resource could be rendered at the current playback rate all the way to its end without having to stop for further buffering. |
| Sent when the 1630916 Duration property changes. |
| Sent when the media element network state changes to the 1629429 Network_empty state. |
| Sent when playback has stopped at the end of the media resource and the 1630452 Ended property is set to |
| Sent when an error occurs while fetching the media data. Use the 1630743 Error property to get the current error. |
| Sent when the browser can render the media data at the current playback position for the first time. |
| Sent when the browser knows the duration and dimensions of the media resource. |
| Sent when the browser begins loading the media data. |
| Sent when playback pauses after the 1633571 Pause method returns. |
| Sent when playback starts after the 1630114 Play method returns. |
| Sent when playback starts. |
| Sent when the browser is fetching the media data. |
| Sent when either the 1631650 Defaultplaybackrate or the 1629746 Playbackrate property changes. |
| Sent when the 1634314 Seeking property is set to |
| Sent when the 1634314 Seeking property is set to |
| Sent when the browser is fetching media data but it has stopped arriving. |
| Sent when the browser suspends loading the media data and does not have the entire media resource downloaded. |
| Sent when the 1631307 Currenttime property changes as part of normal playback or because of some other condition. |
| Sent when either the 1631549 Volume property or the 1630580 Muted property changes. |
| Sent when the browser stops playback because it is waiting for the next frame. |
Topics
Getting and Setting Properties
Getting State
Controlling Playback
Constants
Instance Properties
audioTrackscontrollercrossOrigindefaultMutedkindmediaGroupsessionsrcObjecttextTracksvideoTrackswebkitClosedCaptionsVisiblewebkitCurrentPlaybackTargetIsWirelesswebkitHasClosedCaptionswebkitKeyswebkitPreservesPitch