HTML and CSS Reference
In-Depth Information
Media Event Handlers
Media event handlers can be used to control audio and video playback (see Table 3-12 ).
Table 3-12. Media Event Attributes
Attribute
Runs the Script...
onabort
When element loading is aborted
oncanplay
When the media data can be started to play with potential buffering
oncanplaythrough
When the media data can be played to the end without buffering
oncuechange
When the text of the track cue is changed
ondurationchange
When the length of the media object is changed
onemptied
When the media resource becomes empty
onended
When the media object has reached the end
onerror
When file loading is unsuccessful
onloadeddata
When the media data is loaded
onloadedmetadata
When media metadata such as duration is loaded
onloadstart
When the browser starts to load the media data
onpause
When the media data is paused
onplay
When the media data is going to start playing
onplaying
When the media data has started playing
onprogress
When the browser is fetching the media data
onratechange
When the playing rate of the media data has changed
onseeked
When the seeking attribute is no longer true and seeking has ended
onseeking
When the seeking attribute is true and seeking has begun
onstalled
When the media data cannot be fetched
onsuspend
When fetching media data has been started but stopped before the entire media file was
fetched
ontimeupdate
When the media object changes its playing position
onvolumechange
When the media object changes the volume or when volume is set to mute
onwaiting
When the media content has stopped playing but is expected to resume
 
 
Search WWH ::




Custom Search