Skip to content

Commit

Permalink
Update demo_cam_reader.html
Browse files Browse the repository at this point in the history
  • Loading branch information
549393092 authored Apr 26, 2024
1 parent 50ca45c commit b4066f3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions demo_cam_reader.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ <h2>zxing-cpp/wasm live demo</h2>
};

const updateVideoStream = function (deviceId) {
alert(deviceId);
navigator.mediaDevices
.getUserMedia({ video: { facingMode: deviceId }, audio: false })
.then(function (stream) {
Expand All @@ -140,6 +141,7 @@ <h2>zxing-cpp/wasm live demo</h2>
})
.catch(function (error) {
console.error("Error accessing camera:", error);
alert(error);
});
};

Expand Down

0 comments on commit b4066f3

Please sign in to comment.