Skip to content

Commit

Permalink
fix zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
yashrajbharti committed Jun 12, 2024
1 parent 2dc6fed commit eaf5bd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/stream.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const streamWebCamVideo = (isFrontCamera = true) => {
input.oninput = function (event) {
track.applyConstraints({ advanced: [{ zoom: event.target.value }] });
document.querySelector(".slider").style.left =
((input.value + 2) * 120) / capabilities.zoom.max + "px";
((input.value - 0.8) * 130) / capabilities.zoom.max + "px";
};
input.hidden = false;
document.querySelector(".range-container").style.visibility = "visible";
Expand Down

0 comments on commit eaf5bd4

Please sign in to comment.