Shuail_CR007
Shuail_CR007

Reputation: 312

Webrtc video chat doesn't works in my IP?

WebRTC video chatting application runs perfectly fine in local host. but when I try to run the same code in a specific IP im not able to perform the same task, Error : getUserMedia() no longer works on insecure origins Any ideas on how can I fix this issue?

Upvotes: 0

Views: 383

Answers (1)

Anand S
Anand S

Reputation: 1138

In the recent chrome release getUserMedia() is deprecated on insecure origins to improve browser security.

Deprecating Powerful Features on Insecure Origins.

You can disable this by opening the chrome with following flags.

You can run chrome with the --unsafely-treat-insecure-origin-as-secure="example.com" flag (replacing "example.com" with the origin you actually want to test), which will treat that origin as secure for this session. Note that you also need to include the --user-data-dir=/test/only/profile/dir to create a fresh testing profile for the flag to work.

To open chrome with above flags refer this.

If you want to make this work in production without any of this workarounds, you should buy a ssl certificate and setup HTTPS connection on your server.

Upvotes: 1

Related Questions