Add internal support for @discordjs/opus to v11 (#3700)

* Add internal support for @discordjs/opus

* Remove redundant try/catch

* fix: use setBitrate method in @discordjs/opus

* chore: tidy up opus imports

* fix: correct imports for DiscordJsOpusEngine

* chore: update docs to prefer @discordjs/opus

* chore: bump prism-media to 0.0.4 to allow ffmpeg-static
This commit is contained in:
Amish Shah
2020-01-17 20:58:49 +00:00
committed by GitHub
parent 36c0496ea5
commit 6ab46491c8
10 changed files with 62 additions and 33 deletions

View File

@@ -8,8 +8,8 @@ Update to Node.js 6.0.0 or newer.
## How do I get voice working?
- Install FFMPEG.
- Install either the `node-opus` package or the `opusscript` package.
node-opus is greatly preferred, due to it having significantly better performance.
- Install either the `@discordjs/opus` package or the `opusscript` package.
@discordjs/opus is greatly preferred, due to it having significantly better performance.
## How do I install FFMPEG?
- **npm:** `npm install ffmpeg-binaries`
@@ -17,7 +17,7 @@ Update to Node.js 6.0.0 or newer.
- **Ubuntu 14.04:** `sudo apt-get install libav-tools`
- **Windows:** `npm install ffmpeg-binaries` or see the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).
## How do I set up node-opus?
- **Ubuntu:** Simply run `npm install node-opus`, and it's done. Congrats!
## How do I set up @discordjs/opus?
- **Ubuntu:** Simply run `npm install @discordjs/opus`, and it's done. Congrats!
- **Windows:** Run `npm install --global --production windows-build-tools` in an admin command prompt or PowerShell.
Then, running `npm install node-opus` in your bot's directory should successfully build it. Woo!
Then, running `npm install @discordjs/opus` in your bot's directory should successfully build it. Woo!