On Error Event DOMException: Could not start video source
larbijirari opened this issue · 3 comments
Hello everybody,
i'm facing a problem, i think it's due to version of chrome :
i have two versions of chrome on my laptop
Version 84.0.4147.105 (Build officiel) (64 bits) => WORKING
Version 86.0.4221.3 (Build officiel) dev (64 bits) => NOT WORKING
Error:
On Error Event DOMException: Could not start video source
Complementing:
a similar problem happened to me
when executing the code on a mobile device
if (navigator.mediaDevices.getUserMedia) {
console.log('getUserMedia supported.');
const constraints = {audio: true};
let chunks = [];
let onSuccess = function (stream) {
if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {
console.log("enumerateDevices() not supported.");
return false;
}
//List microphones.
navigator.mediaDevices.enumerateDevices().then(function (devices) {
devices.forEach(function (device) {
if (device.kind === "audioinput") {
console.log(device.label);//Other parameters device.kind/device.deviceId
}
});
}).catch(function (err) {
console.log(err.name + ": " + err.message);
});
}
let onError = function (err) {
console.log('The following error occured: ' + err);
}
navigator.mediaDevices.getUserMedia(constraints).then(onSuccess, onError);
} else {
console.log('getUserMedia not supported on your browser!');
}
the following error appears
- The following error occured: NotReadableError: Could not start audio source
Device : asus_z00lda , android 8.1.0
@larbijirari @alexandremsouza1 If console log navigator.mediaDevices.enumerateDevices()
does it return anything at all?
Hi, i get the same error, but i not sure it due to the same problem. Previously I added the "resolution" parameter on component:
<vue-web-cam
ref="webcam"
:device-id="deviceId"
width="100%"
height="100%"
:resolution = {width: 720, height: 720}
@error="onError"
@cameras="onCameras"
@camera-change="onCameraChange"
/>
but this causes problems on some mobile phone. After remove "resolution" parameter than application goes normally