html tutorial - onseeking Attribute in HTML - html5 - html code - html form
Learn html - html tutorial - onseeking attribute in html - html examples - html programs
- The onseeking attribute specifies a script to run though the user starts moving to a new position in the audio/video.
- The onseeking attribute is a section of the Event Attributes.
Syntax for onseeking attribute in HTML:
Differences between HTML 4.01 and HTML5 for onseeking attribute:
|script||The script to be run on onseeking|
Sample Coding for onseeking Attribute in HTML:
Code Explanation for onseeking Attribute in HTML:
- <video> tag is used to display the video and it has id as “wikiVideo”.
- <source> tag defines the source of video resource.
- onSeeking() JavaSript function used to display the position of the video seeking by its time in <p> tag which has id as “position”.
Output for onseeking Attribute in HTML:
- The video file has been displayed.
- The output shows the playing video with its duration in seconds.
- The seconds of video is displayed as Position has been moved to 9.196897.
Browser Support for onseeking Attribute in HTML:
Tips and Notes
- The currentTime property of the Audio/Video Object is used to get the present playback position