Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

368
Views
Audio mute and unmute button in html

I am creating an HTML page with multiple audios. I want a mute button which can mute all audios of that page together so that even we play another audio even if it plays but we can not hear anything.

I am referring the code mentioned here.

But it only creates a Toggle button, but not mute the audio.

The audio tags used on the page are like below:

            <audio id="audio_playo24">
                <source src="voice/vo3.mp3" type="audio/mp3" />
            </audio>

Can anyone please point me in the correct direction?

Thank you.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try once with this code it will work fine.

JavaScript Code

function toggleMute() {
   var myAudio = document.getElementById('audio_playo24');
   myAudio.muted = !myAudio.muted;
}

HTML Code

<audio id="audio_playo24" controls>
   <source src="voice/vo3.mp3" type="audio/mp3" />
</audio>
<a href="javascript:void(0);" onclick="toggleMute()">Mute/Unmute</a>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!