Update MediaPlayer.js
This commit is contained in:
@@ -74,16 +74,19 @@ class MediaPlayer extends EventEmitter {
|
||||
const args = isStream ? FFMPEG_ARGUMENTS.slice() : ['-i', input, ...FFMPEG_ARGUMENTS];
|
||||
if (options.seek) args.unshift('-ss', String(options.seek));
|
||||
|
||||
args.unshift(
|
||||
'-reconnect',
|
||||
'1',
|
||||
'-reconnect_at_eof',
|
||||
'1',
|
||||
'-reconnect_streamed',
|
||||
'1',
|
||||
'-reconnect_delay_max',
|
||||
'4294',
|
||||
);
|
||||
// Check input
|
||||
if (typeof input == 'string' && URL.canParse(input)) {
|
||||
args.unshift(
|
||||
'-reconnect',
|
||||
'1',
|
||||
'-reconnect_at_eof',
|
||||
'1',
|
||||
'-reconnect_streamed',
|
||||
'1',
|
||||
'-reconnect_delay_max',
|
||||
'4294',
|
||||
);
|
||||
}
|
||||
|
||||
const ffmpeg = new prism.FFmpeg({ args });
|
||||
streams.ffmpeg = ffmpeg;
|
||||
@@ -146,17 +149,19 @@ class MediaPlayer extends EventEmitter {
|
||||
|
||||
if (options.seek) args.unshift('-ss', String(options.seek));
|
||||
|
||||
// Fix connection
|
||||
args.unshift(
|
||||
'-reconnect',
|
||||
'1',
|
||||
'-reconnect_at_eof',
|
||||
'1',
|
||||
'-reconnect_streamed',
|
||||
'1',
|
||||
'-reconnect_delay_max',
|
||||
'4294',
|
||||
);
|
||||
// Check input
|
||||
if (typeof input == 'string' && URL.canParse(input)) {
|
||||
args.unshift(
|
||||
'-reconnect',
|
||||
'1',
|
||||
'-reconnect_at_eof',
|
||||
'1',
|
||||
'-reconnect_streamed',
|
||||
'1',
|
||||
'-reconnect_delay_max',
|
||||
'4294',
|
||||
);
|
||||
}
|
||||
|
||||
// Get stream type
|
||||
if (this.voiceConnection.videoCodec == 'VP8') {
|
||||
|
||||
Reference in New Issue
Block a user