mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 08:33:30 +01:00
Make docs technically correct
This commit is contained in:
@@ -38,7 +38,27 @@ class VoiceBroadcast extends EventEmitter {
|
||||
return this.player.dispatcher;
|
||||
}
|
||||
|
||||
play() {} // eslint-disable-line no-empty-function
|
||||
/**
|
||||
* Play an audio resource.
|
||||
* @param {ReadableStream|string} resource The resource to play.
|
||||
* @param {StreamOptions} [options] The options to play.
|
||||
* @example
|
||||
* // Play a local audio file
|
||||
* connection.play('/home/hydrabolt/audio.mp3', { volume: 0.5 });
|
||||
* @example
|
||||
* // Play a ReadableStream
|
||||
* connection.play(ytdl('https://www.youtube.com/watch?v=ZlAU_w7-Xp8', { filter: 'audioonly' }));
|
||||
* @example
|
||||
* // Play a voice broadcast
|
||||
* const broadcast = client.createVoiceBroadcast();
|
||||
* broadcast.play('/home/hydrabolt/audio.mp3');
|
||||
* connection.play(broadcast);
|
||||
* @example
|
||||
* // Using different protocols: https://ffmpeg.org/ffmpeg-protocols.html
|
||||
* connection.play('http://www.sample-videos.com/audio/mp3/wave.mp3');
|
||||
* @returns {BroadcastDispatcher}
|
||||
*/
|
||||
play() { return null; }
|
||||
}
|
||||
|
||||
PlayInterface.applyToClass(VoiceBroadcast);
|
||||
|
||||
Reference in New Issue
Block a user