getUserMedia frozen at first frame on Android Chrome

I have a working code on desktop browsers supporting getUserMedia Api, I can correctly see a video preview of my webcam in the div videoPreview. However, when running on Android device, this same code takes a picture with my front camera when I accept to share it in Chrome browser, then the preview keeps frozen on this first frame.

navigator.getMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia);

        // constraints
        {video:true, audio:false},

        // success callback
        function (mediaStream) {
            var video = document.getElementById('videoPreview');
            video.src = window.URL.createObjectURL(mediaStream);
        //handle error
        function (error) {

Source: html5

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.