From f77e44131a62e26cd77147c61c1962c64d7414b4 Mon Sep 17 00:00:00 2001 From: yashrajbharti Date: Wed, 12 Jun 2024 17:26:53 +0530 Subject: [PATCH] fix zoom multiplier --- js/stream.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/stream.mjs b/js/stream.mjs index a0d4bfb..576802a 100644 --- a/js/stream.mjs +++ b/js/stream.mjs @@ -45,7 +45,7 @@ export const streamWebCamVideo = (isFrontCamera = true) => { input.oninput = function (event) { track.applyConstraints({ advanced: [{ zoom: event.target.value }] }); - document.querySelector(".slider").style.left = input.value * 12 + "px"; + document.querySelector(".slider").style.left = input.value * 120 / capabilities.zoom.max + "px"; } input.hidden = false; document.querySelector(".range-container").style.visibility = "visible"