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:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!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>

chevron_right


Output:

  • Before Click on Button:
  • After Click on Button:

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

full-stack-img




My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.


Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.