From 3724bad03fb2e55249a6e64f2b64a704075b850c Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Sat, 30 Jan 2021 20:16:50 +0100 Subject: [PATCH] Improve framerate definition --- assets/js/components/calls/window.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/components/calls/window.js b/assets/js/components/calls/window.js index 7703521b..536105be 100644 --- a/assets/js/components/calls/window.js +++ b/assets/js/components/calls/window.js @@ -993,7 +993,7 @@ class CallWindow extends CustomEvents { else { canvas.drawImage(videoTarget, 0, 0, videoTarget.width, videoTarget.height); - await new Promise((res, rej) => setTimeout(() => res(), 40)); + await new Promise((res, rej) => setTimeout(() => res(), 1000 / videoTrack.getSettings().frameRate)); } } }