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




onseeked attribute in html

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

  • The onseeked attribute specifies a script to run though the user is finished skipping to a new position in the audio/video.
  • The onseeked attribute is a section of the Event Attributes.

Syntax for onseeked attribute in HTML:

<element onseeked ="script">

Difference between HTML 4.01 and HTML 5 for onseeked Attribute:

HTML 4.01

HTML 5

Applies To:

Elements Attribute
<audio> onseeked
<video> onseeked

onseeked Attribute Value:

Value Description
script The script to be run on onseeked

Sample Coding for onseeked Attribute in HTML:

Tryit<!DOCTYPE html>
<html>
    <head>
        <title>Wikitechy HTML onseeked Attribute</title>
    </head>
    <body>
        <h1>Wikitechy HTML  onseeked Attribute</h1>
        <video id =“wikiVideo” width="300" height="300" 
        controls onseeked ="onSeeked()">
            <source src="hibiscus.mp4" type="video/mp4">
        </video>
        <script>
           function onSeeked() {
                document.getElementById("position").innerHTML = " Position has been 
                moved to " + document.getElementById("wikiVideo").currentTime;
           }
        </script>
        <p id="position">The video moves to a new position :</p>
    </body>
</html>

Code Explanation for onseeked Attribute in HTML:

onseeked Attribute Code Explanation

  1. <video> tag is used to display the video and it has id as “wikiVideo”.
  2. The onseeked attribute used to call onSeeked() JavaScript function, when user try to seeking the video.
  3. <source> tag defines the source of video resource.
  4. onSeeked() JavaSript function used to display the position of the video seeked by its time in <p> tag which has id as “position”.
  5. The <p> tag display the position of video seeking by JavaScript function.

Output for onseeked Attribute in HTML:

onseeked Attribute Output

  1. The video file has been displayed.
onseeked Attribute Output
  1. Here the output shows the playing video with its duration in seconds.
  2. The seconds of video is displayed as Position has been moved to 12.00426.

Browser Support for onseeked Attribute in HTML:

Yes Yes Yes Yes Yes

Tips and Notes

  • The currentTime property of the Audio/Video Object is used to get the present playback position.

Related Searches to onseeked 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.

×