How to prevent JsSIP asking for microphone access?

663 views Asked by At

I have to create a webrtc application (using JsSIP) where the goal is only to be able to listen to the remote call.

I am searching a way to setup my JsSIP sip stack / sip session to disable the local microphone. I want to make it that the browser doesn't ask for access to the microphone, as it is not needed.

Thanks.

1

There are 1 answers

3
Emmanuel Aliji On

Currently, it is not possible with JsSip, and to make it clear it is not possible on modern secure browsers. The problem is not with JsSip but with the browsers, for security reasons browsers don't allow websites to access the microphone without the user permission as hackers can use this to monitor user conversations without their permission.

But I have observed from using JsSip on some browsers, the browser will automatically allow the user after permission has been giving to your site for the first time, ( at least on google chrome).

Solution If there is a need to allow a smooth transition of audio permission-giving to your website, you should prompt your users to enable their browsers to always allow the permission. This has worked on chrome mobile and Firefox web browsers. Permissions are giving automatically.

I hope this solves your problem. you can contact me for anything with JsSip, ready to help you.