``` More examples are included at the bottom"> ``` More examples are included at the bottom" />
Easy Tutorial
❮ Jsref Search Prop Textarea Defaultvalue ❯

onloadedmetadata Event

Event Object

Example

Execute JavaScript after the metadata of the video has loaded:

<video onloadedmetadata="myFunction()">

More examples are included at the bottom of this page.


Definition and Usage

The onloadedmetadata event is triggered after the metadata of the specified video/audio (audio/video) has loaded.

The metadata of the video/audio (audio/video) includes: duration, dimensions (video), text tracks.

The sequence of events triggered during the loading process of the video/audio (audio/video) is as follows:


Browser Support

The numbers in the table specify the first browser version that supports the event.

Event Chrome IE Firefox Safari Opera
onloadedmetadata Yes 9.0 Yes Yes Yes

Syntax

In HTML:

In JavaScript:

In JavaScript, using the addEventListener() method:

Note: The addEventListener() method is not supported in Internet Explorer 8 and earlier versions.


Bubbles: No
Cancelable: No
--- ---
Event Type: Event
--- ---
Supported HTML Tags: <audio>, <video>
--- ---

More Examples

Example

Execute JavaScript after the metadata of the audio has loaded:

<audio onloadedmetadata="myFunction()">

❮ Jsref Search Prop Textarea Defaultvalue ❯