0% found this document useful (0 votes)
45 views

Áudio HTML Video DOM Reference

The document provides reference information on HTML5 audio and video DOM elements. It lists methods, properties, and events that can be used to manipulate <audio> and <video> elements with JavaScript. Some key methods include addTextTrack(), canPlayType(), load(), and play(). Example properties include autoplay, buffered, controls, currentTime, and volume. Events like abort, canplay, durationchange, ended, and timeupdate are also outlined.

Uploaded by

Erika Almeida
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Áudio HTML Video DOM Reference

The document provides reference information on HTML5 audio and video DOM elements. It lists methods, properties, and events that can be used to manipulate <audio> and <video> elements with JavaScript. Some key methods include addTextTrack(), canPlayType(), load(), and play(). Example properties include autoplay, buffered, controls, currentTime, and volume. Events like abort, canplay, durationchange, ended, and timeupdate are also outlined.

Uploaded by

Erika Almeida
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

HTML de udio / vdeo DOM Reference

Anterior

PrximoReferncia

udio HTML e Vdeo DOM Reference


OHTML5DOMtemmtodos,propriedadeseeventosparao<audio>e<video>
elementos.
Estesmtodos,propriedadeseeventospermitemmanipular<audio>e<video>elementos
usandoJavaScript.

udio / Vdeo Mtodos HTML

Method

Description

addTextTrack()

Addsanewtexttracktotheaudio/video

canPlayType()

Checksifthebrowsercanplaythespecifiedaudio/videotype

load()

Reloadstheaudio/videoelement

play()

Startsplayingtheaudio/video

pause()

Pausesthecurrentlyplayingaudio/video

udio HTML / Propriedades de vdeo


Property

Description

audioTracks

ReturnsanAudioTrackListobjectrepresentingavailable
audiotracks

autoplay

Setsorreturnswhethertheaudio/videoshouldstartplaying
assoonasitisloaded

buffered

ReturnsaTimeRangesobjectrepresentingthebuffered

controller

partsoftheaudio/video
ReturnstheMediaControllerobjectrepresentingthecurrent
mediacontrolleroftheaudio/video

controls

Setsorreturnswhethertheaudio/videoshoulddisplay
controls(likeplay/pauseetc.)

crossOrigin

SetsorreturnstheCORSsettingsoftheaudio/video

currentSrc

ReturnstheURLofthecurrentaudio/video

currentTime

Setsorreturnsthecurrentplaybackpositioninthe
audio/video(inseconds)

defaultMuted

Setsorreturnswhethertheaudio/videoshouldbemutedby
default

defaultPlaybackRate

Setsorreturnsthedefaultspeedoftheaudio/video
playback

duration

Returnsthelengthofthecurrentaudio/video(inseconds)

ended

Returnswhethertheplaybackoftheaudio/videohasended
ornot

error

ReturnsaMediaErrorobjectrepresentingtheerrorstateof

theaudio/video
loop

Setsorreturnswhethertheaudio/videoshouldstartover
againwhenfinished

mediaGroup

Setsorreturnsthegrouptheaudio/videobelongsto(used
tolinkmultipleaudio/videoelements)

muted

Setsorreturnswhethertheaudio/videoismutedornot

networkState

Returnsthecurrentnetworkstateoftheaudio/video

paused

Returnswhethertheaudio/videoispausedornot

playbackRate

Setsorreturnsthespeedoftheaudio/videoplayback

played

ReturnsaTimeRangesobjectrepresentingtheplayedparts
oftheaudio/video

preload

Setsorreturnswhethertheaudio/videoshouldbeloaded
whenthepageloads

readyState

Returnsthecurrentreadystateoftheaudio/video

seekable

ReturnsaTimeRangesobjectrepresentingtheseekable
partsoftheaudio/video

seeking

Returnswhethertheuseriscurrentlyseekinginthe
audio/video

src

Setsorreturnsthecurrentsourceoftheaudio/video
element

startDate

ReturnsaDateobjectrepresentingthecurrenttimeoffset

textTracks

ReturnsaTextTrackListobjectrepresentingtheavailable
texttracks

videoTracks

ReturnsaVideoTrackListobjectrepresentingtheavailable
videotracks

volume

Setsorreturnsthevolumeoftheaudio/video

HTML de udio / vdeo Eventos


Event

Description

abort

Fireswhentheloadingofanaudio/videoisaborted

canplay

Fireswhenthebrowsercanstartplayingtheaudio/video

canplaythrough

Fireswhenthebrowsercanplaythroughtheaudio/video
withoutstoppingforbuffering

durationchange

Fireswhenthedurationoftheaudio/videoischanged

emptied

Fireswhenthecurrentplaylistisempty

ended

Fireswhenthecurrentplaylistisended

error

Fireswhenanerroroccurredduringtheloadingofan
audio/video

loadeddata

Fireswhenthebrowserhasloadedthecurrentframeofthe
audio/video

loadedmetadata

Fireswhenthebrowserhasloadedmetadataforthe
audio/video

loadstart

Fireswhenthebrowserstartslookingfortheaudio/video

pause

Fireswhentheaudio/videohasbeenpaused

play

Fireswhentheaudio/videohasbeenstartedorisnolonger
paused

playing

Fireswhentheaudio/videoisplayingafterhavingbeen
pausedorstoppedforbuffering

progress

Fireswhenthebrowserisdownloadingtheaudio/video

ratechange

Fireswhentheplayingspeedoftheaudio/videoischanged

seeked

Fireswhentheuserisfinishedmoving/skippingtoanew
positionintheaudio/video

seeking

Fireswhentheuserstartsmoving/skippingtoanewposition
intheaudio/video

stalled

Fireswhenthebrowseristryingtogetmediadata,butdata
isnotavailable

suspend

Fireswhenthebrowserisintentionallynotgettingmedia
data

timeupdate

Fireswhenthecurrentplaybackpositionhaschanged

volumechange

Fireswhenthevolumehasbeenchanged

waiting

Fireswhenthevideostopsbecauseitneedstobufferthe
nextframe

Anterior
Copyright19992015byRefsnesData.AllRightsReserved.

PrximoReferncia

You might also like