Does getUserMedia works on iOS?

Since iOS 11, getUserMedia is supposed to finally work on Apple devices.

But in fact it does not work.

The JavaScript sample code below works on all other OS: Blackberry, Android, etc...

Except on iOS as usual.

navigator.getUserMedia = ( navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.mediaDevices.getUserMedia);

navigator.getUserMedia({video: true ,audio: false}, gotStream, noStream);

function gotStream(stream)


video.src = getUrl(stream);


When executed on a https connection, it asks for webcam detection, but nothing appears on the video: blank.

It is the same issue as described by other developers below:

Was somebody able to have getUserMedia works on iOS?

  • Its not working on my WKWebView also , not sure what am I missing. Using iOS14.6

Add a Comment



Did you get getusermedia working on any of the latest IOS 11 versions ?




getusermedia working in iOS 11.3 in the safari browser but not working in chrome browser. if it is possible to make it work on chrome that would be great.anyone have any idea?



It's sad that Apple doesn't fully support WebRTC in the browser on iOS. Will they ever get their act together?

Is there any update on getUserMedia / Stream
Code Block
{ audio: false,
video: {facingMode: { exact: "environment" },
width: 420, height: 1000 } })
.then(function(stream) {
var video = document.querySelector('video');
// Older browsers may not have srcObject
if ("srcObject" in video) {
video.srcObject = stream;
} else {
// Avoid using this in new browsers
video.src = window.URL.createObjectURL(stream);
.catch(function(err) {
console.log( + ": " + err.message);

It doesn't wor on IPhone only