Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

On Error Event DOMException: Could not start video source #60

Open
larbijirari opened this issue Aug 7, 2020 · 3 comments
Open

On Error Event DOMException: Could not start video source #60

larbijirari opened this issue Aug 7, 2020 · 3 comments

Comments

@larbijirari
Copy link

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

@alexandremsouza1
Copy link

alexandremsouza1 commented Oct 19, 2020

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

image

Device : asus_z00lda , android 8.1.0

@VinceG
Copy link
Owner

VinceG commented Oct 30, 2020

@larbijirari @alexandremsouza1 If console log navigator.mediaDevices.enumerateDevices() does it return anything at all?

@hendriady
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants