DOMException: Requested device not found
See original GitHub issueHere is the code I have used in my react component.
import Quagga from 'quagga'
componentDidMount() {
Quagga.init({
inputStream : {
name : "Live",
type : "LiveStream",
target: document.querySelector('#barcode-scanner'),
constraints: {
width: 520,
height: 400,
facingMode: "user" //"environment" for back camera, "user" front camera
}
},
decoder : {
readers : ["code_128_reader","code_39_reader"]
}
}, function(err) {
if (err) {
console.log(err)
return
}
Quagga.start()
Quagga.onDetected(function(result) {
var last_code = result.codeResult.code;
console.log("last_code ");
})
})
}
Which gives me following error
DOMException: Requested device not found
Please help!!!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
DOMException: Requested device not found GetUserMedia
This happens when you dont have any device to capture video or capture audio. try checking if your webcam and your microphone are...
Read more >getUserMedia--DOMException: Requested device not found
My computer has no microphone,so I got an error from 'err'(DOMException: Requested device not found). how can I handle this error if I...
Read more >error with camera: requested device not found - YouTube
How to Fix Camera Not Found Error - error with camera: requested device not found.
Read more >Connect to WebCam using JavaScript
DOMException : Requested device not found. Enable HTTPS for local development using vue-cli-service vue-cli-service serve --https.
Read more >Camera: Setup & troubleshooting - Applicant Help Center
NotFoundError: Requested device not found ... If you're seeing this error, your camera and/or microphone cannot be found by your browser. This ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Had the same issue.
Simply restarted my laptop and now it works again.
It’s telling you you don’t have a device that fits the constraints that you’ve given, width, height, and/or facingMode.
What device/browser/camera?