From a6c7e2da8b7017f16fca691a887c7d50907f6f21 Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Fri, 26 Jan 2018 15:06:33 +0100 Subject: [PATCH] Added volume event docs --- src/sound/webaudio/WebAudioSound.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sound/webaudio/WebAudioSound.js b/src/sound/webaudio/WebAudioSound.js index 66d22b833..16d0c8de2 100644 --- a/src/sound/webaudio/WebAudioSound.js +++ b/src/sound/webaudio/WebAudioSound.js @@ -458,6 +458,11 @@ Object.defineProperty(WebAudioSound.prototype, 'volume', { set: function (value) { this.currentConfig.volume = value; this.volumeNode.gain.setValueAtTime(value, 0); + /** + * @event Phaser.Sound.WebAudioSound#volume + * @param {Phaser.Sound.WebAudioSound} sound - Reference to the sound that emitted event. + * @param {number} value - An updated value of Phaser.Sound.WebAudioSound#volume property. + */ this.emit('volume', this, value); } });