Skip to content

Commit

Permalink
Update voice docs
Browse files Browse the repository at this point in the history
  • Loading branch information
amishshah committed Jan 20, 2018
1 parent ac65ea4 commit f728d2b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion docs/topics/voice.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f728d2b

Please sign in to comment.