Audio controls Property - Find out if the audio controls are displayed: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Audio

Description

Audio controls Property - Find out if the audio controls are displayed:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<audio id="myAudio" controls>
  <source src="your.ogg" type="audio/ogg">
  <source src="your.mp3" type="audio/mpeg">
  Your browser does not support the audio element.
</audio>/*from w w w  .  ja  v  a 2 s  .co m*/


<button onclick="myFunction()">Test</button>

<p id="demo"></p>

<script>
function myFunction() {
    var x = document.getElementById("myAudio").controls;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials