From 21b5d1d0c557a73604af55d1a646cb6a08b1ec31 Mon Sep 17 00:00:00 2001 From: DevAndromeda <46562212+DevAndromeda@users.noreply.github.com> Date: Thu, 5 Aug 2021 15:09:58 +0545 Subject: [PATCH] fix(Player): add default highWaterMark to try avoiding aborts --- src/Player.ts | 4 +++- src/Structures/Queue.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Player.ts b/src/Player.ts index 7db8d73..7e1869b 100644 --- a/src/Player.ts +++ b/src/Player.ts @@ -21,7 +21,9 @@ class Player extends EventEmitter { public readonly client: Client; public readonly options: PlayerInitOptions = { autoRegisterExtractor: true, - ytdlOptions: {} + ytdlOptions: { + highWaterMark: 1 << 25 + } }; public readonly queues = new Collection(); public readonly voiceUtils = new VoiceUtils(); diff --git a/src/Structures/Queue.ts b/src/Structures/Queue.ts index fabe0b3..365a46a 100644 --- a/src/Structures/Queue.ts +++ b/src/Structures/Queue.ts @@ -98,7 +98,9 @@ class Queue { leaveOnEmpty: true, leaveOnEmptyCooldown: 1000, autoSelfDeaf: true, - ytdlOptions: {}, + ytdlOptions: { + highWaterMark: 1 << 25 + }, initialVolume: 100, bufferingTimeout: 1000 } as PlayerOptions,