English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Manual de referência HTML

大全 de etiquetas HTML

HTML Audio/Propriedade startDate do DOM do vídeo

 HTML Audio/Video DOM Reference Manual

Exemplo online

Obter o deslocamento atual da linha de tempo do vídeo:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Áudio HTML/Uso da propriedade startDate do vídeo-Tutorial básico(oldtoolbag.com)</title>
</head>
<body>
<button onclick="getTimeOffset()" type="button">Obter o deslocamento atual da linha de tempo do vídeo</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 and see ‹/›

Definition and usage

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 video.

Browser compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers do not support the startDate attribute.

Syntax

audio|video.startDate

Technical details

Return value:A Date object representing the current timeline offset.
 HTML Audio/Video DOM Reference Manual