mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Another attempted fix (w/ help from izy521) (#386)
* Fix my very silly mistake * Another FFMPEG issue fix attempt * Add a missing semicolon Yes, I really did make a commit just for this. :) * Another attempted fix (w/ help from izy521)
This commit is contained in:
@@ -138,9 +138,17 @@ var AudioEncoder = (function () {
|
||||
var ffmpegErrors = "";
|
||||
|
||||
enc.stdout.pipe(this.volume);
|
||||
|
||||
enc.stderr.on("data", function (data) {
|
||||
ffmpegErrors += "\n" + new Buffer(data).toString().trim();
|
||||
});
|
||||
|
||||
enc.stdout.on("end", function () {
|
||||
killProcess();
|
||||
|
||||
reject("end");
|
||||
});
|
||||
|
||||
enc.once("exit", function (code, signal) {
|
||||
if (code) {
|
||||
reject(new Error("FFMPEG: " + ffmpegErrors));
|
||||
|
||||
@@ -127,9 +127,17 @@ export default class AudioEncoder {
|
||||
var ffmpegErrors = "";
|
||||
|
||||
enc.stdout.pipe(this.volume);
|
||||
|
||||
enc.stderr.on("data", (data) => {
|
||||
ffmpegErrors += "\n" + new Buffer(data).toString().trim();
|
||||
});
|
||||
|
||||
enc.stdout.on("end", () => {
|
||||
killProcess();
|
||||
|
||||
reject("end");
|
||||
});
|
||||
|
||||
enc.once("exit", (code, signal) => {
|
||||
if (code) {
|
||||
reject(new Error("FFMPEG: " + ffmpegErrors));
|
||||
|
||||
Reference in New Issue
Block a user