In this section we are going to learn about working with multimedia in HTML5. Primarily there are two tags related with multimedia
All these tags have their respective attributes that is explained in respective posts.
Here, let's learn about various events that executes when media elements are handled
loadstart
- executes when media starts loadingprogress
- executes when media data is being loadedsuspend
- exeutes when progress has been suspended and entire media has not been loadedabort
- executes when playback is aborted in between, eg. while playing, the media is restartedemptied
- executes when the media element has been loaded and it has been emptiedstalled
- executes when data is being loaded but unexpectedly not comingplay
- executes when media starts playing, executes after .play() methodpause
- executes when media is paused playing, executes after .pause() methodloadedmetadata
- executes when media duration can be determinedloadedata
- executes when the media can be played from its current positionwaiting
- executes when playback has stopped because next frame is not availableplaying
- executes when playback has startedcanplay
- executes when data is available to play the audio or video canplaythrough
- executes when the entire media is available to play, ie. all data has been downloadeddurationchange
- executes when enough media has been loaded to know at least the duration of the mediatimeupdate
- executes when current playback position changed during normal playbackended
- executes when complete media has been playedratechange
- executes when defaultPlaybackRate
or playbackRate
attributes has been updatederror
- executes when an error occurs while playing volumechange
- executes when volume is changed or muted
attribute value is changedHTML5 audio tag suprots following media format