English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
HTML Audio/Video DOM Reference Manual
Get the current timeline offset of the video:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>HTML Audio/Video startDate Attribute Usage-Basic Tutorial(oldtoolbag.com)</title> </head> <body> <button onclick="getTimeOffset()" type="button">Get the current timeline offset of the video</button> <br> <video id="video1" controls="controls"> <source src="movie.mp4" type="video/mp4"> <source src="movie.ogg" type="video/ogg"> Your browser does not support HTML5 video tag. </video> <script> myVid=document.getElementById("video1"); function getTimeOffset() { alert(myVid.startDate); } </script> </body> </html>Test to see ‹/›
The startDate attribute returns a Date object representing the audio/The current timeline offset of the video.
The startDate attribute is used to enable audio streaming from the Internet in real time./Accurate synchronization of the video.
IEFirefoxOperaChromeSafari
All mainstream browsers do not support the startDate attribute.
audio|video.startDate
Return value: | A Date object representing the current timeline offset. |
---|