From 6a8255d08a26920d2139ee53e5e325ecac055ca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20=C5=A0ediv=C3=BD?= Date: Thu, 24 Jun 2021 15:25:56 +0200 Subject: [PATCH] auto downgrade on packet loss. --- src/component/internal/connection.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/component/internal/connection.ts b/src/component/internal/connection.ts index 79e53c69..173eee31 100644 --- a/src/component/internal/connection.ts +++ b/src/component/internal/connection.ts @@ -73,8 +73,8 @@ export class NekoConnection extends EventEmitter { // current quality is not known if (this._state.webrtc.video == null) return - // check if video is not playing - if (stats.fps) { + // check if video is not playing smoothly + if (stats.fps > 1 && stats.packetLoss < 50) { webrtcCongestion = 0 return }