fix(Player): add default highWaterMark to try avoiding aborts

This commit is contained in:
DevAndromeda 2021-08-05 15:09:58 +05:45
parent 74faa9bad2
commit 21b5d1d0c5
No known key found for this signature in database
GPG key ID: FA40E3EC5CB6DCD6
2 changed files with 6 additions and 2 deletions

View file

@ -21,7 +21,9 @@ class Player extends EventEmitter<PlayerEvents> {
public readonly client: Client;
public readonly options: PlayerInitOptions = {
autoRegisterExtractor: true,
ytdlOptions: {}
ytdlOptions: {
highWaterMark: 1 << 25
}
};
public readonly queues = new Collection<Snowflake, Queue>();
public readonly voiceUtils = new VoiceUtils();

View file

@ -98,7 +98,9 @@ class Queue<T = unknown> {
leaveOnEmpty: true,
leaveOnEmptyCooldown: 1000,
autoSelfDeaf: true,
ytdlOptions: {},
ytdlOptions: {
highWaterMark: 1 << 25
},
initialVolume: 100,
bufferingTimeout: 1000
} as PlayerOptions,