HTML Audio/Video DOM currentTime Property
Example
Set the time position to 5 seconds:
myVid=document.getElementById("video1"); myVid.currentTime=5;
Definition and Usage
The currentTime attribute sets or returns the current position of the audio/video playback (in seconds).
When this property is set, playback will jump to the specified position.
Browser Support
All major browsers support the currentTime attribute.
Note:Internet Explorer 8 and earlier browsers do not support this attribute.
Syntax
Set currentTime attribute:
audio|video.currentTime="seconds"
Return currentTime attribute:
audio|video.currentTime
Attribute Value
Value | Description |
---|---|
seconds | Indicates the current position of the audio/video playback (in seconds). |
Technical Details
Return value | Numeric value, representing seconds |
---|