I'm using the following code in an HTML5 page. When I run my page on Android and PC (chrome), the code works fine and I get the correct JavaScript alert();
but when I run the same page on an iOS device like iPhone or iPad, I don't get anything (no alert()
at all).
This is my code:
navigator.getUserMedia = ( navigator.getUserMedia || // use the proper vendor prefix
navigator.webkitGetUserMedia ||
navigator.mozGetUserMedia ||
navigator.msGetUserMedia);
navigator.getUserMedia({video: true}, function() {
alert('camera is supported in your browser');
}, function() {
alert('camera is not supported in your browser!');
});
Is there something that I'm missing?
Any help would be appreciated.