HTML5 DOM Reference

Share:
HTLM5 has methods, properties, and events. This is for <audio> and <video> elements.

The Methods

MethodExplanation
<addTextTrack()>Adds a new text track
<canPlayType()>Check if browser can play the specified audio and video type
<load()>Re-Load audio video element
<play()>Starts playing
<pause()>Pause the playing
reference : www.w3schools.com

The Properties

PropertiesExplanation
audioTracksReturns an AudioTrackList object representring available audio tracks
autoplaySet wheter the audio / video should start playing as soon as it's loaded
bufferedReturns a TimeRanges object representring the buffered parts of audio video
controllerReturns the MediaController object representing the current media controller of the audio / video
controlsSets or Returns whether the audio / video should display controls (like play / pause, etc)
crossOriginSets or Returns of CORS setting of the audio / video
currentSrcReturns the URL of the current audio / video
currentTimeSets or Returns the current playback position in the audio / video 
defaultMutedSets or returns whether the audio/video should be muted by default
defaultPlaybackRateSets or Returns the default speed of the audio / video playback
durationReturns the length of the current audio / video 
endedReturns whether the playback of audio / video has ended or not
errorReturns a MediaError object representing the error state of the audio / video
loopSet whether the audio / video should start over again when finished
mediaGroupSets or Return the group of audio / video belongs to
mutedSets or Return whether the audio is muted or not
networkStateReturn the network state of audio / video
pausedReturns whether the audio / video is paused or not
playbackRateSets or Returns the speed of audio / video playback
playedreturn a TimeRanges object representing the played parts of audio / video
preloadSets or Returns whether the audio / video should be loaded when the page is load
readyStateReturns the current ready state of the audio / video
seekableReturns a TimeRanges object representing the seekable parts of the audio / video
srcSet or Returns the current source of the audio / video element
startDateReturns a Date object representing the current time offset
textTracksReturns a TextTrackList object representing the available text tracks
videoTracksReturn a VideoTrackList object representing the available video tracks
volumeSets or Returns the volume of audio / video


The Events


EventExplanation
abortFires when loading of an audio / video is aborted
canplayFires when the browser can start playing the audio / video
canplaythroughFires when the browser can play through the audio / video without stopping for buffering
durationchange Fires when the duration of the audio / video is changed
emptiedFires when the current playlist is empty
endedFires when the current playlist is ended
errorFires when an error occured during the loading of an audio / video
loadeddataFires when the browser has loaded the current frame of the audio / video 
loadedmetadataFires when the browser has loaded meta data for the audio / video
loadstartFires when the browser starts looking for the audio / video
pauseFires when the audio / video has been paused 
playFires when the audio / video has been started or is no longer paused
playingFires when audio / video is playing after have been paused or stopped for buffering
progressFires when the browser is downloading the audio / video
ratechangeFires when the playing speed of audio / video is changed
seekedFires when finished moving / skipping to a new position in the audio / video
seekingFires when starts moving / skipping to a new position in the audio / video
stalledFires when the browser is trying to get media data , but data is not available
suspendFires when the browser is intentionally not getting media data
timeupdateFires when the current playback position has changed
volumechangeFires when the volume has been change
waitingFires when the video stops because it needs to buffer the next frame

No comments

Mohon untuk berkomentar yang baik dan bijak