0

I am developing web-app on mobile which is using user camera & microphone.

When I want to run it on mobile in same network. I am running server on --host 0.0.0.0 to be able to run it on mobile.

The problem is that my dev server is running on http protocol, and mobile browser is not allowing getUserMedia in that case.

What is good solution to solve it?

I know I can set flags on my mobile browser to allow insecure connection, but it is also my private phone, so I don't want to go this path.

gkucmierz
  • 1,055
  • 1
  • 9
  • 26

1 Answers1

0

You wrote

dev server is running on http protocol, and mobile browser is not allowing getUserMedia in that case.

You Can't Do That™. You must use https to serve your web pages and Javascript for this kind of application, or all browsers deny access to getUserMedia() and other similar browser-resident APIs.

True for desktop and mobile browsers.

Because cybercreeps.

O. Jones
  • 103,626
  • 17
  • 118
  • 172