Forum Discussion
anithaduraisamy
8 years agoCommunity Member
Mute audio using javascript
Hi guys,
i want to create my own mute/unmute audio button using articulate.i done this but i have a small problem.
problem:
i have three to four audio within a single slide.
when i click mut...
SamHill
3 years agoSuper Hero
REDUNDANT :: DO NOT USE
This method uses vanilla JavaScript and so is future proof.
To mute all audio on the page (audio/video elements)
document.querySelectorAll("video, audio").forEach(elem => elem.muted = true);
And to unmute
document.querySelectorAll("video, audio").forEach(elem => elem.muted = false);