Skip to content

Commit

Permalink
Update webcam.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jjwwcc authored Nov 8, 2023
1 parent 4de365a commit 7c4f47a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mt/webcam.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let isCapturing = false;
// Initialize the webcam and set event listeners
function initializeWebcam() {
const video = document.getElementById('webcam');
navigator.mediaDevices.getUserMedia({ video: true })
navigator.mediaDevices.getUserMedia({ video: { facingMode: "environment" } })
.then(stream => {
video.srcObject = stream;
})
Expand Down

0 comments on commit 7c4f47a

Please sign in to comment.