Reputation: 2623
I am using Twilio Client softphone in my application and it is working fine on my local system for both inbound and outbound call but when I deployed it on Server (AWS ec2 instance) always I am getting below error on chrome for inbound and outbound call.
getUserMedia() no longer works on insecure origins. To use this feature, you should consider switching your application to a secure origin, such as HTTPS. See (google url) for more details.
I am including twilio.min.js in following manner.
<script type="text/javascript" src="https://media.twiliocdn.com/sdk/js/client/v1.3/twilio.min.js"></script>
<script type="text/javascript" src="https://media.twiliocdn.com/taskrouter/js/v1.4/taskrouter.min.js"></script>
You can see I am including js file by using HTTPS. Even after that I have downloaded twilio.min.js file and added in local directory and included js file by using local directory also but still getting the same error. So how can I solve this issue.
Upvotes: 0
Views: 1301
Reputation: 3811
From the docs: https://www.twilio.com/docs/api/client/twilio-js
You should use HTTPS to serve your page. Starting with Google Chrome 47, HTTP applications will no longer be allowed to call getUserMedia() and will not be given access to the user's camera and microphone.
Upvotes: 0
Reputation: 17295
The getUserMedia API requires you to use HTTPS on your site in Chrome (i.e. the script that executes getUserMedia). That has been the case for quite a while, see here for a detailed explanation.
Upvotes: 3