DOM Properties
HTMLMediaElement.currentTime
Read/write. Represents playback position in seconds. Assigning a value requests a seek, or sets the starting position when metadata is not yet available. Available seek positions depend on the media timeline and seekable ranges. Example result: 0.
Formal Syntax & Structure
html syntaxhtml
element.currentTimeReturn Value
number
Property value. Read/write.
Working Example
Example Snippethtml
<video id="demo" controls></video><p> Result: <output id="result"></output></p><script> const e = document.getElementById('demo'); const result = value => { document.getElementById("result").textContent = String(value); }; result(e.currentTime);</script>