What is Media Events in HTML5

In this article I have describe about HTML5 Mouse Events.
  • 2230

What is HTML5 Media Events

  • Trigger events is added HTML4 in our browser, like starting Javascript functionality when the event occurs to click on an element.
  • We can respond to an event using an event handler attribute.
  • Each HTML element can support a number of distinct event handler attributes.
  • Global event attributes that can be added to HTML5 elements.

Media Events

Events triggered by medias like videos, images and audio (applies to all HTML5 elements, but is most common in media elements, like audio, embed, img, object, and video)

Attributes

Status

Value

Description

onabort

No change

Script

Script to be run on abort

oncanplay

New

Script

A file is ready to start playing when script to be run

oncanplaythrough

New

Script

A file can be played all the way to the end without pausing for buffering when script to be run

ondurationchange

New

Script

The length of the media changes when script to be run

onemptied

New

Script

Something bad happens and the file is suddenly unavailable when script to be run

onended

New

Script

The media has reach the end when script to be run

onerror

New

Script

An error occurs when the file is being loaded and when script to be run

onloadeddata

New

Script

Media data is loaded when script to be run

onloadedmetadata

New

Script

Meta data are loaded when script to be run

onloadstart

New

Script

Script to be run just as the file begins to load before anything is actually loaded

onpause

New

Script

The media is paused either by the user or programmatically when script to be run

onplay

New

Script

The media is ready to start playing when script to be run

onplaying

New

Script

The media actually has started playing when script to be run

onprogress

New

Script

The browser is in the process of getting the media data when script to be run

onratechange

New

Script

Script to be run each time the playback rate changes

onreadystatechange

New

Script

Script to be run each time the ready state changes

onseeked

New

Script

The seeking attribute is set to false indicating that seeking has ended when script to be run

onseeking

New

Script

The seeking attribute is set to true indicating that seeking is active when script to be run

onstalled

New

Script

The browser is unable to fetch the media data for whatever reason when script to be run

onsuspend

New

Script

The media data is stopped before it is completely loaded for whatever reason when script to be run

ontimeupdate

New

Script

The playing position has changed when script to be run

onvolumechange

New

Script

Script to be run each time the volume is changed

Onwaiting

New

Script

The media has paused but is expected to resume when script to be run

You may also want to  read these related articles :

Ask Your Question 

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.