diff --git a/src/client/voice/dispatcher/StreamDispatcher.js b/src/client/voice/dispatcher/StreamDispatcher.js index b4a8ab4b2..173e6576e 100644 --- a/src/client/voice/dispatcher/StreamDispatcher.js +++ b/src/client/voice/dispatcher/StreamDispatcher.js @@ -161,6 +161,13 @@ class StreamDispatcher extends Writable { this.emit('speaking', value); } + get volumeEditable() { return Boolean(this.player.streams.volume); } + + /** + * Whether or not the Opus bitrate of this stream is editable + */ + get bitrateEditable() { return this.streams.opus && this.streams.opus.setBitrate; } + get volume() { return this.player.streams.volume ? this.player.streams.volume.volume : 1; } diff --git a/src/client/voice/util/VolumeInterface.js b/src/client/voice/util/VolumeInterface.js index 8146bb913..7c25aaa56 100644 --- a/src/client/voice/util/VolumeInterface.js +++ b/src/client/voice/util/VolumeInterface.js @@ -10,6 +10,13 @@ class VolumeInterface extends EventEmitter { this.setVolume(volume || 1); } + /** + * Whether or not the volume of this stream is editable + */ + get volumeEditable() { + return true; + } + /** * The current volume of the broadcast * @readonly