WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

HTML Audio/Video DOM Reference


HTML Audio and Video DOM Reference

The HTML5 DOM has strategies, properties, and occasions for the <audio> and <video> elements.

These strategies, properties, and occasions enable you to control <audio> and <video> components utilizing JavaScript.


HTML Audio/Video Methods

Method Description
addTextTrack() Adds another content track to the sound/video
canPlayType() Checks if the program can play the predefined sound/video type
load() Re-loads the sound/video element
play() Starts playing the sound/video
pause() Pauses the presently playing sound/video

HTML Audio/Video Properties

Property Description
audioTracks Returns an AudioTrackList object speaking to accessible sound tracks
autoplay Sets or returns whether the sound/video should begin playing when it is loaded
buffered Returns a TimeRanges object speaking to the cushioned pieces of the sound/video
controller Returns the MediaController object speaking to the present media controller of the sound/video
controls Sets or returns whether the sound/video should show controls (like play/stop etc.)
crossOrigin Sets or returns the CORS settings of the sound/video
currentSrc Returns the URL of the present sound/video
currentTime Sets or returns the present playback position in the sound/video (in seconds)
defaultMuted Sets or returns whether the sound/video ought to be quieted by default
defaultPlaybackRate Sets or returns the default speed of the sound/video playback
duration Returns the length of the present sound/video (in seconds)
ended Returns whether the playback of the sound/video has finished or not
error Returns a MediaError object speaking to the blunder condition of the sound/video
loop Sets or returns whether the sound/video should begin once again when finished
mediaGroup Sets or returns the gathering the sound/video has a place with (used to connect various sound/video elements)
muted Sets or returns whether the sound/video is quieted or not
networkState Returns the present system condition of the sound/video
paused Returns whether the sound/video is delayed or not
playbackRate Sets or returns the speed of the sound/video playback
played Returns a TimeRanges object speaking to the played pieces of the sound/video
preload Sets or returns whether the sound/video ought to be stacked when the page loads
readyState Returns the present prepared condition of the sound/video
seekable Returns a TimeRanges object speaking to the seekable pieces of the sound/video
seeking Returns whether the client is right now looking for in the sound/video
src Sets or returns the present wellspring of the sound/video element
startDate Returns a Date object speaking to the present time offset
textTracks Returns a TextTrackList object speaking to the accessible content tracks
videoTracks Returns a VideoTrackList object speaking to the accessible video tracks
volume Sets or returns the volume of the sound/video

HTML Audio/Video Events

Event Description
abort Fires when the stacking of a sound/video is aborted
canplay Fires when the program can begin playing the sound/video
canplaythrough Fires when the program can play through the sound/video ceaselessly for buffering
durationchange Fires when the span of the sound/video is changed
emptied Fires when the present playlist is empty
ended Fires when the present playlist is ended
error Fires when a mistake happened amid the stacking of a sound/video
loadeddata Fires when the program has stacked the present edge of the sound/video
loadedmetadata Fires when the program has stacked meta information for the sound/video
loadstart Fires when the program begins searching for the sound/video
pause Fires when the sound/video has been paused
play Fires when the sound/video has been begun or is no longer paused
playing Fires when the sound/video is playing in the wake of having been delayed or ceased for buffering
progress Fires when the program is downloading the sound/video
ratechange Fires when the playing velocity of the sound/video is changed
seeked Fires when the client is done moving/jumping to another situation in the sound/video
seeking Fires when the client begins moving/jumping to another situation in the sound/video
stalled Fires when the program is attempting to get media information, yet information isn't available
suspend Fires when the program is deliberately not getting media data
timeupdate Fires when the present playback position has changed
volumechange Fires when the volume has been changed
waiting Fires when the video stops since it needs to cushion the following frame