Skip to content

Commit

Permalink
fix zoom multiplier
Browse files Browse the repository at this point in the history
  • Loading branch information
yashrajbharti committed Jun 12, 2024
1 parent 473b613 commit b3bf417
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/stream.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 + "px";
document.querySelector(".slider").style.left = input.value * 100 + "px";
}
input.hidden = false;
document.querySelector(".range-container").style.visibility = "visible"
Expand Down
5 changes: 3 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ video.flip {
display: flex;
justify-content: center;
word-spacing: 15px;
/* visibility: hidden; */
visibility: hidden;
}
.zoom-multiplier{
position: absolute;
Expand All @@ -222,9 +222,10 @@ video.flip {
}
.range-container img{
position: absolute;
opacity: 0.9;
pointer-events: none;
}
.range-container .slider{
position: absolute;
left: 0;
padding: 0 3px;
}

0 comments on commit b3bf417

Please sign in to comment.