HTML DOM Audio played Property Last Updated : 22 Jun, 2023 Comments Improve Suggest changes Like Article Like Report The Audio played property is used for returning a TimeRanges object. The TimeRanges object is used in cases when you want to represent the ranges of audio that have already been played by the user. A played range is a time range of a played audio. If a user skips in the audio, he may get several played ranges. The audio-played property is a read-only property. The TimeRanges Object Properties are: length – It is used to get the number of played ranges in the video.start(index) – It is used to get the start position of a played range.end(index) – It is used to get the end position of a played range. Syntax: audioObject.played The below program illustrates the Audio played Property: Example: Getting the first played range of the audio in seconds. HTML <!DOCTYPE html> <html> <head> <title> Audio played Property </title> </head> <body style="text-align:center"> <h1 style=" color:green"> GeeksforGeeks </h1> <h2 style="font-family: Impact"> Audio played Property </h2> <br> <audio id="Test_Audio" controls> <source src="sample1.ogg" type="audio/ogg"> <source src="beep-01a.wav" type="audio/mpeg"> </audio> <p> To get the first played range of the audio in seconds, double click the "Return Played Range" button. </p> <br> <button ondblclick="MyAudio()" type="button"> Return Played Range </button> <p id="test"></p> <script> let a = document.getElementById("Test_Audio"); function MyAudio() { let a = document.getElementById("Test_Audio"); document.getElementById("test").innerHTML = "Start time: " + a.played.start(0) + " End time: " + a.played.end(0); } </script> </body> </html> Output: Supported Browsers: The browsers supported by DOM Audio played Property are listed below: Google ChromeInternet ExplorerFirefoxOperaApple Safari Comment More infoAdvertise with us Next Article HTML DOM Audio paused Property S Shubrodeep Banerjee Follow Improve Article Tags : Web Technologies HTML HTML-DOM Similar Reads HTML DOM Audio paused Property The Audio paused property is used for returning whether the audio is paused or not. The Audio paused property is a read-only property. Syntax: audioObject.paused Return: The Audio paused property returns a Boolean true if the audio is paused else, it returns false. The below program illustrates the 1 min read HTML DOM Audio preload Property The Audio preload property is used for setting or returning the value of the preload attribute of audio. The preload attribute is used to specify the way the author thinks the audio should be loaded when the page loads. The audio preload attribute allows the author to portray to the browser the way 2 min read HTML DOM Audio muted Property The Audio muted property is used to set or return whether the audio output should be muted or not. Syntax: It returns the muted property.audioObject.mutedIt sets the muted property.audioObject.muted = true|false Property Values: This property accepts values true|false which is used to specify whethe 2 min read HTML DOM Audio playbackRate Property The Audio playbackRate property is used for setting or returning the current playback speed of the audio. Syntax: Return the playbackRate property:audioObject.playbackRateSet the playbackRate property:audioObject.playbackRate = playbackspeed Property Values number: It is used to specify the default 2 min read HTML DOM Audio loop Property The Audio loop property is used for setting or returning whether an audio should start playing over again when it is finished or not. Syntax: Return the loop property:audioObject.loopSet the loop property:audioObject.loop = true | false Property Values: true | false: It is used to specify whether th 2 min read HTML | DOM Audio src Property The DOM Audio src property is used to set or return the value of the src attribute of audio. The src attribute is generally used to specify the location (URL) of the audio file. Syntax: Return the src property: audioObject.src Set the src property: audioObject.src = URL Property Values: URL: It is u 1 min read Like