ontimeupdate Event in JavaScript
ontimeupdate Event in JavaScript
The ontimeupdate event is used to trigger when the playing position of an audio or video has changed. It is invoked by:-
- Playing the audio or video.
- Moving the playback position.
It is often used with currentTime property which is used to returns the current position of audio/video playback in seconds of Audio/Video Object.
Syntax:-
Its syntax is:- <element ontimeupdate="my_script"> OR object.ontimeupdate= function(){my_script} OR object.addEventListener("timeupdate", my_script)