Skip to content

Commit

Permalink
Added volumeChange event to VoiceInterface (discordjs#1207)
Browse files Browse the repository at this point in the history
VoiceBroadcast relies on this event to initialize a new Opus engine
  • Loading branch information
aemino authored and amishshah committed Feb 22, 2017
1 parent c4138e6 commit f716128
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/client/voice/util/VolumeInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ class VolumeInterface extends EventEmitter {
* @param {number} volume The volume that you want to set
*/
setVolume(volume) {
/**
* Emitted when the volume of this interface changes
* @event VolumeInterface#volumeChange
* @param {number} oldVolume The old volume of this interface
* @param {number} newVolume The new volume of this interface
*/
this.emit('volumeChange', this._volume, volume);
this._volume = volume;
}

Expand Down

0 comments on commit f716128

Please sign in to comment.