Open In App

HTML onseeked Attribute

The HTML onseeked Attribute is a event attribute which occurs when the user finishes the skips the media to a new position.

Applicable: 



Syntax:

<element onseeked="Script">

Attribute Value: This attribute contains single value script which works when onseeked event attribute call. This attribute is supported by <audio> and <video> tags.



Example:




<!DOCTYPE html>
<html>
 
<head>
    <title>
        HTML onseeked Attribute
    </title>
</head>
 
<body>
    <center>
        <h1 style="color:green">GeeksforGeeks</h1>
        <h2>HTML onseeked Attribute</h2>
 
            <audio controls id="audio">
            <source src="beep.mp3" type="audio/mpeg">
        </audio>
    </center>
    <script>
        document.getElementById(
        "audio").addEventListener("seeked", GFGfun);
 
        function GFGfun() {
            alert("Media Skipped");
        }
    </script>
 
</body>
 
</html>

Output:

Supported Browsers: 
 

 

Article Tags :