Sample Coding for onloadedmetadata Attribute in HTML:
Tryit<!DOCTYPE html><html><head><title>Wikitechy onloadedmetadata attribute</title></head><body><audiocontrolsonloadedmetadata="loadedMetaData()"><sourcesrc="wikitechy.wav"type="audio/wav"><sourcesrc="wikitechy.mp3"type="audio/mp3"></audio><script>functionloadedMetaData()
{
alert("The Meta Data is loaded!");
}
</script></body></html>
Code Explanation for onloadedmetadata Attribute in HTML:
onloadedmetadata attribute used to trigger an event when the Meta data for the audio is loaded.
loadedMetaData JavaScript function show an alert message “The Meta Data is loaded!”.
Output for onloadedmetadata Attribute in HTML:
The output shows "The Meta Data is loaded!” in an alert message.
Browser Support for onloadedmetadata Attribute in HTML: