I tried getusermedia on mobile browser and it works fine, however when putting it in webview I always get permission denied error on all 3 of my android devices I'm pretty sure the app has successfully granted camera access
const constraints = { audio: false, video: { facingMode: "user" } }
navigator.mediaDevices.getUserMedia(constraints)
.then(function(mediaStream) {
video.srcObject = mediaStream;
video.onloadedmetadata = function(e) {
video.play();
};
})
.catch(function(err) { showAlert(err.name + ": " + err.message); });
Can anyone point out what I am missing?