Problem: Mute all sounds - "How to unmute all sounds.
Saola Animate version: 2.7.1
OS: Windows 10
Notes:
I have a few buttons with sounds attached so that when you click the button the play media command is triggered, and an audio file plays. I have another button programmed with the “Mute All Media” command so if more than one sound is playing all can be muted with that button. After the “mute all media” command is run though, no sound will play again until I “refresh” the page. Is there a way to un-mute all media without refreshing the page?
ToanLS…that worked perfectly! Guess it’s obvious I’m still a newbie when it comes to js coding, I have been trying to figure out how to do that for quite a while, I should have asked sooner.
It’s not possible.
However, you can do that for a list of media if you know the media element names:
var mediaNames = ['media_1', 'media_2']; // update this list
for (var i = 0; i < mediaNames.length; ++i) {
var mediaElement = doc.getElement(mediaNames[i]);
if (mediaElement)
mediaElement.pause();
}