Q:

Front camera error with getUsermedia() Error: "Notreadableerror: could not start video source"

In my html code i have 3 video labels , in desktop the videos work fine but when i try in mobile, only works the two first cameras, when i specify the "user" camera in the last one jumps the next error in android "Notreadableerror: could not start video source".
function enableCam() {

video = document.getElementById('video');
// Get access to the camera!
if(navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {

    var constraints;
    var isMobile = /iPhone|iPad|iPod|Android/i.test(navigator.userAgent);
    if (isMobile) {
        constraints = {video: {width: {
            exact: 256
        },
        height: {
            exact: 192
        }, facingMode: "user"}};

    }else {
       constraints = {video: {width: {
           exact: 256
       },
       height: {
           exact: 192
       }, facingMode: "environment"}};
    }

    navigator.mediaDevices.getUserMedia(constraints).then(function(stream) {

        readFile(video,stream);//This method plays the video and save the image
    });
}
}

A:

This error will occur on iOS 13.3 if getUserMedia gets run too much. 13.4 fixes it.
Also, stopping previous streams might be helpful before running getUserMedia again. 
ie) Since you are running getUserMedia twice in a row, perhaps capturing the stream the first time, stopping it, and then running the second getUserMedia with a setTimeout delay might help unblock things.
The constraints might also be an issue: passing an empty constraint "{}" might help. Passing "{audio:true,video:true}" might help also.
Trying a different browser might help too; chrome, firefox, Safari, and even Opera.
I have a mobile web-app that is open-source that makes use of smartphone cameras. I've had to account for a lot of particularities of different browsers, cameras, phones, and constraints. The code might come in handy if you get stuck again: https://github.com/steveseguin/obsninja

