Easy Tutorial
❮ Att Object Hspace Tag Ruby ❯

HTML Audio/Video DOM loadedmetadata Event

HTML Audio/Video DOM Reference Manual

Example

Alerts that the metadata of the video has been loaded:


Definition and Usage

The loadedmetadata event occurs when the metadata of the specified audio/video has been loaded.

The metadata for audio/video includes: duration, dimensions (video only), and text tracks.

The following events occur in sequence when the audio/video is being loaded:


Browser Support

All major browsers support the loadedmetadata event.

Note: Internet Explorer 8 and earlier versions do not support this event.


Syntax

In HTML:

In JavaScript:

Using addEventListener():

Technical Details

Supported HTML tags: <audio>, <video>
Supported JavaScript objects: Audio, Video
--- ---

More Examples

Using the onloadedmetadata attribute on HTML elements

Using addEventListener() to listen for the loadedmetadata event


❮ Att Object Hspace Tag Ruby ❯