Video startDate Property - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Video

Description

The startDate property returns a Date object representing the current timeline offset of the video.

Return Value

A Date Object, representing current timeline offset

The following code shows how to get the current timeline offset of the video:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<video id="myVideo" width="320" height="240" controls>
  <source src="your.mp4" type="video/mp4">
  <source src="your.ogg" type="video/ogg">
  Your browser does not support the video tag.
</video>//from ww w.j a v  a2  s  .  c  o  m

<button onclick="myFunction()">Test</button>

<p id="demo"></p>

<script>
function myFunction() {
     var x = document.getElementById("myVideo").startDate;
     document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials