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 0e13b6d commit 81baaaf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions demo_cam_reader.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,12 @@ <h2>zxing-cpp/wasm live demo</h2>
navigator.mediaDevices
.getUserMedia({ video: { facingMode: deviceId }, audio: false })
.then(function (stream) {
// stream.getTracks().forEach(track => track.stop());
video.srcObject = stream;
video.setAttribute("playsinline", true); // required to tell iOS safari we don't want fullscreen
video.play();
// video.play();
video.onloadedmetadata = () => {
video.play();
};
processFrame();
})
.catch(function (error) {
Expand Down

0 comments on commit 81baaaf

Please sign in to comment.