mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
voice: add documentation to VoiceBroadcast
This commit is contained in:
@@ -27,6 +27,10 @@ class VoiceBroadcast extends EventEmitter {
|
|||||||
* @type {Client}
|
* @type {Client}
|
||||||
*/
|
*/
|
||||||
this.client = client;
|
this.client = client;
|
||||||
|
/**
|
||||||
|
* The dispatchers playing this broadcast
|
||||||
|
* @type {Set<StreamDispatcher>}
|
||||||
|
*/
|
||||||
this.dispatchers = new DispatcherSet(this);
|
this.dispatchers = new DispatcherSet(this);
|
||||||
this.player = new BroadcastAudioPlayer(this);
|
this.player = new BroadcastAudioPlayer(this);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,12 @@ class BroadcastDispatcher extends StreamDispatcher {
|
|||||||
super._destroy(err, cb);
|
super._destroy(err, cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the bitrate of the current Opus encoder if using a compatible Opus stream.
|
||||||
|
* @param {number} value New bitrate, in kbps
|
||||||
|
* If set to 'auto', 48kbps will be used
|
||||||
|
* @returns {boolean} true if the bitrate has been successfully changed.
|
||||||
|
*/
|
||||||
setBitrate(value) {
|
setBitrate(value) {
|
||||||
if (!value || !this.streams.opus || !this.streams.opus.setBitrate) return false;
|
if (!value || !this.streams.opus || !this.streams.opus.setBitrate) return false;
|
||||||
const bitrate = value === 'auto' ? 48 : value;
|
const bitrate = value === 'auto' ? 48 : value;
|
||||||
|
|||||||
Reference in New Issue
Block a user