Created
March 2, 2021 06:43
-
-
Save fernandocyder/7bcb3038c3a91c7809ca90b61a206d0a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const gotStream = (stream) => { | |
| window.stream = stream; // make stream available to console | |
| window.imageCapture = new ImageCapture(stream.getTracks()[0]); | |
| console.log(window.imageCapture) | |
| const videoElement = document.querySelector('video'); | |
| videoElement.srcObject = stream; | |
| setInterval(checkQrCode, 5000); | |
| // refresh button list in case labels have become available | |
| return navigator.mediaDevices.enumerateDevices(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment