HTML5 > Multimedia

HTML5 > Multimedia


In this section we are going to learn about working with multimedia in HTML5. Primarily there are two tags related with multimedia

  1. <audio> - used to play audio
  2. <video> - used to play video

All these tags have their respective attributes that is explained in respective posts.

HTML5 Multimedia (audio / video) events

Here, let's learn about various events that executes when media elements are handled

  1. loadstart - executes when media starts loading
  2. progress - executes when media data is being loaded
  3. suspend - exeutes when progress has been suspended and entire media has not been loaded
  4. abort - executes when playback is aborted in between, eg. while playing, the media is restarted
  5. emptied - executes when the media element has been loaded and it has been emptied
  6. stalled - executes when data is being loaded but unexpectedly not coming
  7. play - executes when media starts playing, executes after .play() method
  8. pause - executes when media is paused playing, executes after .pause() method
  9. loadedmetadata - executes when media duration can be determined
  10. loadedata - executes when the media can be played from its current position
  11. waiting - executes when playback has stopped because next frame is not available
  12. playing - executes when playback has started
  13. canplay - executes when data is available to play the audio or video
  14. canplaythrough - executes when the entire media is available to play, ie. all data has been downloaded
  15. durationchange - executes when enough media has been loaded to know at least the duration of the media
  16. timeupdate - executes when current playback position changed during normal playback
  17. ended - executes when complete media has been played
  18. ratechange - executes when defaultPlaybackRate or playbackRate attributes has been updated
  19. error - executes when an error occurs while playing
  20. volumechange - executes when volume is changed or muted attribute value is changed

HTML5 Audio format support

HTML5 audio tag suprots following media format

  1. webm - audio/webm
  2. ogg - audio/ogg
  3. mp3 - audio/mp3
  4. wav - audio/wav or audio/x-wav or audio/x-pn-wav

HTML5 video format support

  1. webm - video/webm
  2. ogg - video/ogg
  3. mp4 - video/mp4

Read posts under HTML5 > Multimedia

6 posts found
  1. Audio
  2. Custom audio player
  3. Background Audio
  4. Video
  5. Custom video player
  6. Video background



Write for us






Hosting Recommendations