ontimeupdate event
Examples
JavaScript is executed during playback to change the current position:
try it"
Bottom of this article contains more examples.
Definition and Usage
ontimeupdate event triggers changes in the transmission of video / audio (audio / video) the current playback position.
The event by calling the following ways:
- Playing a video / audio (audio / video)
- Reposition the video / audio (audio / video) playback position.
Note: This event is usually the Video object currentTime use with property, which returns the video / audio (audio / video) of the current playback position.
Browser Support
Figures in the table represent the first browser to support this version of events.
Event | |||||
---|---|---|---|---|---|
ontimeupdate | Yes | 9.0 | Yes | Yes | Yes |
grammar
In HTML:
In JavaScript:
JavaScript, use the addEventListener () method:
Note: Internet Explorer 8 and earlier versions of IE do not support addEventListener () method.
technical details
Whether to support the bubble: | No |
---|---|
It can be canceled: | No |
Event Type: | Event |
Supported HTML tags: | <Audio>, <video> |
More examples
Examples
JavaScript is executed when the user starts playing audio or reposition the audio playback position:
try it"
Examples
Use currentTime property of the current playback position is 5 seconds:
try it"
Event objects