Dispatching event when global volume value changes

This commit is contained in:
Pavle Goloskokovic 2018-01-03 21:28:13 +01:00
parent 3967a111a4
commit 3b5289a733

View file

@ -112,6 +112,7 @@ Object.defineProperty(WebAudioSoundManager.prototype, 'volume', {
},
set: function (value) {
this.masterVolumeNode.gain.setValueAtTime(value, 0);
this.events.dispatch(new SoundValueEvent(this, 'SOUND_VOLUME', value));
}
});
module.exports = WebAudioSoundManager;