I've been developing a web app to scan the barcode in live stream. I have used the following code for video streaming:
navigator.mediaDevices.getUserMedia({ video: constraints }).then(function(stream) {
// video.src = window.URL.createObjectURL(stream);
video.srcObject = stream;
video.play();
// ...
}
It works as expected in Android chrome browser, and also in ios safari browser. But, when i tried it in ios Chrome browser, it is not working. I have also tried adding the following constraints:
video.setAttribute('autoplay', '');
video.setAttribute('muted', '');
video.setAttribute('playsinline', '');
But no use on it. Can anyone please suggest me the right solution to do it.