[SOLVED] Mute ALL Audio when playing

Hello fellow PlayCanvas developers!

I am currently developing a game and in a game you usually have an option to mute the in-Game audio. Now PlayCanvas has some cool Audio-Listener stuff and I already disable the AudioListener which is active (cause only one can be active, I loop through all of the AudioListeners and disable the active one). But You can hear sounds even if you have no Audio-Listener. See my project: https://playcanvas.com/project/581137/overview/firetest

Does anyone know an easy way to disable and re-enable all Audio when playing ?

Cheers!

If you are muting all audio, in a previous project I did this.app.systems.sound.volume = 0

4 Likes

Worked perfectly thank you very much

This works great for simply muting all audio in the game, but doesn’t mute video textures when created like this: https://developer.playcanvas.com/en/tutorials/video-textures/

Anyways, thanks for the hint

As video textures are from a video element on the page in that tutorial, it has to be muted separately from the engine API.