HTML onseeking Attribute
Definition and Usage
The onseeking
attribute defines a script to run when the user starts moving/skipping to a new
position in the audio/video.
Tip: Use the currentTime property of the Audio/Video Object to get the current playback position.
Applies to
The onseeking
attribute is part of the Event Attributes, and can be used on the following elements:
Elements | Event |
---|---|
<audio> | seeking |
<video> | seeking |
Examples
Audio Example
Run "myFunction" when the user starts changing the position of the audio:
<audio onseeking="myFunction()">
Try it Yourself »
Video Example
Run "myFunction" when the user starts changing the position of the video:
<video onseeking="myFunction()">
Try it Yourself »
Browser Support
The onseeking
attribute has the following browser support for each element:
Element | |||||
---|---|---|---|---|---|
audio | Yes | 9.0 | Yes | Yes | Yes |
video | Yes | 9.0 | Yes | Yes | Yes |
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.