Skip to content

Commit

Permalink
Set FacingMode
Browse files Browse the repository at this point in the history
  • Loading branch information
TheR00st3r committed Nov 12, 2021
1 parent d16cfc3 commit d91d7a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wwwroot/js/webcam.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function startVideo(src) {
if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
navigator.mediaDevices.getUserMedia({ video: true }).then(function (stream) {
navigator.mediaDevices.getUserMedia({ video: { facingMode: "environment" } }).then(function (stream) {
let video = document.getElementById(src);
if ("srcObject" in video) {
video.srcObject = stream;
Expand Down

0 comments on commit d91d7a0

Please sign in to comment.