Media Event Attributes

title=text

Explanation

Media Event Attributes are the events/actions happens by audio or video files and even images.
These events are applicable to all the HTML5 elements.
These events are more suitable for the "Media Elements" (Audio, Video, img, embed and object) in HTML5.
List of available attributes:
AttributeValueDescription
onabort Script Script will be executed when a media file is stopped.
oncanplay Script When a audio/video file is ready to play i.e. while buffering the script will be executed.
oncanplaythrough Script Script will be executed while the media file is playing.
ondurationchange Script When user changes the duration of a media file, then the script will be executed.
onemptied Script Script will be executed when a media file have not run or the file is not displayed.
onended Script If the duration of a media file comes to an end then the script will be executed.
onerror Script In case error occurs at the time when media file gets loaded then the script will be executed.
onloadeddata Script When the related information of a media file is unavailable then the script will be executed.
onloadedmetadata Script When the metadata i.e. file size, length/duration of a file is loaded, then the script will be executed.
onloadstart Script When the file begins to load before rest of the things is loaded then script will be executed.
onpause Script If the audio/video file is paused by user then the script will be executed.
onplay Script When the audio/video file is ready to play after buffering has ended then the script will be executed.
onplaying Script If the audio/video file started playing then the script will be executed.
onprogress Script While the media file was progressing then the script will be executed.
onratechange Script When a media file is constantly forwarded or backward then the script will be executed.
onreadystatechangeScriptWhenever the readystate was modified then the script will be executed.
onseeked Script Script will be executed when seeked was disabled by setting the seeked attribute as "False".
onseeking Script Script will be executed, if the seeking attribute was set as "True" and then the seeking is enabled.
onstalledScriptIf a media file is not applicable in a browser then the script will be executed.
onsuspendScriptWhen there is any interruption from external side i.e. due to internet connection disconnected, then the script will be execeuted.
ontimeupdate ScriptIf any changes was done in duration of the media file then the script will be executed.
onvolumechange ScriptWhen the sound of a media file is raised or minimized or even muted then the script will be executed.
onwaiting ScriptScript will be executed when the selected audio/video files were ready to play as per order.

Ask Questions

Ask Question