Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

getUserMedia() is not allowed in localhost - Safari 11

Tags:

safari

webrtc

Trying to call getUserMedia from an insecure document.

I'm testing safari 11 tech preview. Got this error while trying to run basic peer in localhost. Does anyone experience the same or is localhost treated as insecure region in safari 11?

Any flag or settings to allow this in safari? Currently i'm using ngrok to tunnel it via https and accessing in the same machine.

like image 610
Sasi Varunan Avatar asked Jun 13 '17 13:06

Sasi Varunan


1 Answers

Update:

You can now enable this from the Develop menu:

Safari WebRTC Develop menu

Select Allow Media Capture on Insecure Sites


Original Answer:

Yes, you will need to run it with HTTPS, even with localhost, when using Safari.

Do you see get this error even with an ngrok tunnel using HTTPS?

like image 169
aiham Avatar answered Sep 18 '22 18:09

aiham