0

I am trying to show the webcam output on an html page on UC Browser v12.13 on Android v6.0.1 Samsung Galaxy A5. The output is just a black background. This is working on other browsers i.e. Chrome and Stock browser on the same device.

I've tried playing the video from within the success block instead of adding the autoplay tag and added some debug; the video element is playing.

<video class="video-element" autoplay muted playsinline></video>
navigator.mediaDevices.getUserMedia = navigator.mediaDevices.getUserMedia
                || navigator.webkitGetUserMedia
                || navigator.mozGetUserMedia
                || navigator.msGetUserMedia
                || navigator.oGetUserMedia
                || navigator.getUserMedia;

        navigator.mediaDevices.getUserMedia(
            cameraMediaConstraints[constraintIndexToTry]
        ).then(function(stream) {
            video.srcObject = stream;
        }).catch(function(DOMException) {
            setCameraError(cameraErrorsEnums.NotAllowedError);
        });

I'm expecting the video to display the output of the webcam but i'm just getting a black background.

AJ72
  • 168
  • 1
  • 12

1 Answers1

0

Looks like camera permissions not being set. It's not obvious, you have to go to settings -> apps and set the permissions there, can't set it through UC browser.

AJ72
  • 168
  • 1
  • 12