Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed Mar 2, 2024
1 parent 993c2d6 commit a1bca71
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,23 @@
video.srcObject = media;
video.autoplay = true;
})().catch(console.error);

(async () => {
const devices = await navigator.mediaDevices.enumerateDevices({
auido: false,
video: {
//NOTE: crash on android chrome when specified the size
//width: {ideal: 800}, height: {ideal: 800},
facingMode: "environment",
},
});

document.getElementById("media").textContent = JSON.stringify(
devices,
null,
2,
);
})();
},
{ once: true },
);
Expand All @@ -109,6 +126,7 @@
BarcodeDetector demo: <button id="start">start</button>
<div><video id="video" autoplay></video></div>

<pre id="media"></pre>
<pre id="result"></pre>
<pre id="interm"></pre>
<pre id="error"></pre>
Expand Down

0 comments on commit a1bca71

Please sign in to comment.