mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 11:33:30 +01:00
voice: set seek parameter before input (#2993)
This commit is contained in:
@@ -48,7 +48,7 @@ class BasePlayer extends EventEmitter {
|
|||||||
const isStream = input instanceof ReadableStream;
|
const isStream = input instanceof ReadableStream;
|
||||||
|
|
||||||
const args = isStream ? FFMPEG_ARGUMENTS.slice() : ['-i', input, ...FFMPEG_ARGUMENTS];
|
const args = isStream ? FFMPEG_ARGUMENTS.slice() : ['-i', input, ...FFMPEG_ARGUMENTS];
|
||||||
if (options.seek) args.push('-ss', String(options.seek));
|
if (options.seek) args.unshift('-ss', String(options.seek));
|
||||||
|
|
||||||
const ffmpeg = new prism.FFmpeg({ args });
|
const ffmpeg = new prism.FFmpeg({ args });
|
||||||
const streams = { ffmpeg };
|
const streams = { ffmpeg };
|
||||||
|
|||||||
Reference in New Issue
Block a user