html tutorial - onloadedmetadata Attribute in HTML - html5 - html code - html form




Onloadedmetadata attribute in html

Learn html - html tutorial - Onloadedmetadata attribute in html - html examples - html programs

  • The onloadedmetadata attribute triggers when the Meta data for the specified audio/video.
  • Meta data consists of duration, dimensions and text tracks.

Syntax for onloadedmetadata attribute in HTML:

<audio onloadedmetadata="script">

Applies To:

Elements Attribute
<audio> onloadedmetadata
<video> onloadedmetadata

onloadedmetadata Attribute Value:

Value Description
script The script to be run on onloadedmetadata

Sample Coding for onloadedmetadata Attribute in HTML:

Tryit<!DOCTYPE html>
<html>
    <head>
        <title>Wikitechy onloadedmetadata attribute</title>
    </head>
    <body>
        <audio controls onloadedmetadata="loadedMetaData()">
           <source src="wikitechy.wav" type="audio/wav">
           <source src="wikitechy.mp3" type="audio/mp3">
        </audio>
        <script>
           function loadedMetaData()
           {
            alert("The Meta Data is loaded!");
           }
        </script>
    </body>
</html>

Code Explanation for onloadedmetadata Attribute in HTML:

onloadedmetadata Attribute Code Explanation

  1. onloadedmetadata attribute used to trigger an event when the Meta data for the audio is loaded.
  2. loadedMetaData JavaScript function show an alert message “The Meta Data is loaded!”.

Output for onloadedmetadata Attribute in HTML:

onloadedmetadata Attribute Output

  1. The output shows "The Meta Data is loaded!” in an alert message.

Browser Support for onloadedmetadata Attribute in HTML:

Yes 9.0 Yes Yes Yes

Related Searches to onloadedmetadata Attribute in html

Adblocker detected! Please consider reading this notice.

We've detected that you are using AdBlock Plus or some other adblocking software which is preventing the page from fully loading.

We don't have any banner, Flash, animation, obnoxious sound, or popup ad. We do not implement these annoying types of ads!

We need money to operate the site, and almost all of it comes from our online advertising.

Please add wikitechy.com to your ad blocking whitelist or disable your adblocking software.

×