From f728d2be692813c43802c438506b1216b137bdb5 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Sat, 20 Jan 2018 16:31:34 +0000 Subject: [PATCH] Update voice docs --- docs/topics/voice.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/topics/voice.md b/docs/topics/voice.md index 2493ff380..0bfe45054 100644 --- a/docs/topics/voice.md +++ b/docs/topics/voice.md @@ -79,12 +79,16 @@ Discord.js allows you to play a lot of things: ```js // ReadableStreams, in this example YouTube audio +const ytdl = require('ytdl-core'); connection.play(ytdl( 'https://www.youtube.com/watch?v=ZlAU_w7-Xp8', { filter: 'audioonly' })); // Files on the internet -connection.play('http://www.sample-videos.com/audio/mp3/wave.mp3') +connection.play('http://www.sample-videos.com/audio/mp3/wave.mp3'); + +// Local files +connection.play('/home/discord/audio.mp3'); ``` New to v12 is the ability to play OggOpus and WebmOpus streams with much better performance by skipping out Ffmpeg. Note this comes at the cost of no longer having volume control over the stream: