Phaser API Documentation

  Version: 
Event: MUTE
Phaser.Sound.Events.MUTE
MUTE

Description:

The Sound Mute Event.

This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their mute state changes.

Listen to it from a Sound instance using Sound.on('mute', listener), i.e.:

var music = this.sound.add('key');
music.on('mute', listener);
music.play();
music.setMute(true);

Parameters:

name type description
sound Phaser.Sound.WebAudioSound | Phaser.Sound.HTML5AudioSound

A reference to the Sound that emitted the event.

mute boolean

The mute value. true if the Sound is now muted, otherwise false.

Since: 3.0.0