H
H
html-css2020-02-28 11:34:03
Layout
html-css, 2020-02-28 11:34:03

In the audio tag in html - can I set the initial volume?

In the audio tag in html - can I set the initial volume?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
html-css, 2020-02-28
@html-css

found on a toaster

<video id="myaudio" controls="" loop="" autoplay="" name="media" preload="auto" hidden>
<source src="music.mp3" type="audio/mp3">
</video>
  <script>
    var audio = document.getElementById("myaudio");
  		audio.volume = 0.2;
  </script>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question