Open In App

HTML | DOM Audio startDate Property

The startDate property is used to return the Date object that represents the current timeline of audio. It is used to enable accurate synchronization of audio streamed live over the internet.

Syntax:



audio.startDate

Return Value: A Date Object, representing current timeline offset.

Example:




<!DOCTYPE html>
<html>
  
<head>
    <title>
        HTML DOM Audio startDate Property
    </title>
</head>
  
<body style="text-align:center;">
  
    <h1 style="color:green">GeeksforGeeks</h1>
      
    <h2>DOM Audio startDate Property</h2>
      
    <audio id="my_Audio" controls autoplay>
        <source id="mp4_src" src=
                type="audio/mp3">
  
        <source id="ogg_src" src=
                type="audio/ogg">
    </audio>
    <br>
      
    <button onclick="myAudio()" type="button">
        Click It
    </button>
    <br>
  
    <script>
        var a = document.getElementById("my_Audio");
  
        function myAudio() {
            alert("StartDate: " + a.startDate);
        }
    </script>
</body>
  
</html>

Output:



Supported Browsers: The HTML DOM Audio startDate Property is not supported by any browsers.


Article Tags :