Audio object property paused in Javascript
The audio object property paused is a read only property that used to retrieve whether a audio is paused. It returns a boolean value true, if the audio is paused, otherwise false.
Syntax
 1 <audio>.paused // to retrieve
audio : A audio element object to retrieve paused property
Audio property paused
 1 <html>
 2 <style>
 3   .container {
 4     margin: 10px 0;
 5   }  
 6 </style>
 7 <body>
 8 	<h1>The Audio Object</h1>
 9 	<h2>Example</h2>
 10 	
 11 	<div>
 12 	  <audio id="audio" controls >
 13 	    <source src="audio.mp3" type="audio/mpeg">
 14 	    Your browser does not support the audio tag.
 15 	  </audio>
 16 	</div>
 17 	<p>
 18 	  <button onclick="access()">Access</button>
 19 	</p>
 20 	<p id="result"></p>
 21 	
 22 	<script>
 23 	function access() {
 24 	  const audio = document.getElementById("audio");
 25 	  const str = `Is audio paused ? <b>${audio.paused}</b>`;
 26 	  document.getElementById("result").innerHTML = str;
 27 	}
 28 	</script>
 29 </body>
 30 </html>
Audio property paused
Privacy Policy
Terms of Service
Disclaimer
Contact us
About us