mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 01:23:31 +01:00
Fix arbitrary ffmpeg
This commit is contained in:
@@ -124,11 +124,11 @@ var AudioEncoder = (function () {
|
||||
});
|
||||
};
|
||||
|
||||
AudioEncoder.prototype.encodeArbitraryFFmpeg = function encodeArbitraryFFmpeg(ffmpegOptions, volume) {
|
||||
AudioEncoder.prototype.encodeArbitraryFFmpeg = function encodeArbitraryFFmpeg(ffmpegOptions, options) {
|
||||
var _this3 = this;
|
||||
|
||||
return new Promise(function (resolve, reject) {
|
||||
_this3.volume = new _VolumeTransformer2["default"](volume);
|
||||
_this3.volume = new _VolumeTransformer2["default"](options.volume);
|
||||
|
||||
var command = _this3.getCommand();
|
||||
|
||||
@@ -136,8 +136,8 @@ var AudioEncoder = (function () {
|
||||
if (!command) return reject(new Error('FFMPEG not found. Make sure it is installed and in path.'));
|
||||
|
||||
// add options discord.js needs
|
||||
var options = ffmpegOptions.concat(['-f', 's16le', '-ar', '48000', '-ac', 2, 'pipe:1']);
|
||||
var enc = _child_process2["default"].spawn(command, options);
|
||||
var ffmpegOptions = ffmpegOptions.concat(['-f', 's16le', '-ar', '48000', '-ac', 2, 'pipe:1']);
|
||||
var enc = _child_process2["default"].spawn(command, ffmpegOptions);
|
||||
|
||||
_this3.hookEncodingProcess(resolve, reject, enc);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user