mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
Add example for creating VoiceBroadcasts
This commit is contained in:
@@ -13,6 +13,16 @@ const ffmpegArguments = [
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A voice broadcast can be played across multiple voice connections for improved shared-stream efficiency.
|
* A voice broadcast can be played across multiple voice connections for improved shared-stream efficiency.
|
||||||
|
*
|
||||||
|
* Example usage:
|
||||||
|
* ```js
|
||||||
|
* const broadcast = client.createVoiceBroadcast();
|
||||||
|
* broadcast.playFile('./music.mp3');
|
||||||
|
* // play "music.mp3" in all voice connections that the client is in
|
||||||
|
* for (const connection of client.voiceConnections.values()) {
|
||||||
|
* connection.playBroadcast(broadcast);
|
||||||
|
* }
|
||||||
|
* ```
|
||||||
* @implements {VolumeInterface}
|
* @implements {VolumeInterface}
|
||||||
*/
|
*/
|
||||||
class VoiceBroadcast extends VolumeInterface {
|
class VoiceBroadcast extends VolumeInterface {
|
||||||
|
|||||||
Reference in New Issue
Block a user