Open In App

HTML onseeked Attribute

Last Updated : 06 Aug, 2021
Improve
Improve
Like Article
Like
Save
Share
Report

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

Applicable: 

  • <audio> 
  • <video>

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:

html




<!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: 
 

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Apple Safari
  • Opera

 


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads