Anmol Anmol - 3 years ago 38
HTML Question

Browser asks for "share the device" permission every time and on all pages while using sinch for web-to-web calling?

I'm using

for web-to-web calling and I want online users to be able to accept a call no matter on which page they are! Im using
for backend and since I want all pages with this "call listening" property, I've initialized sinchClient on the main page which is common to all other pages(typically a "base.html").

I have this little problem wherein my browser is asking permission to
share the microphone
whenever I load any page of the site (basically because all pages contain
now). This is turning out to be very irritating adn I thought of loading all the pages in one single
but that sounds little weird and improper.

Answer Source

When adding Sinch to a web page, it's ideal if the web page is a single page application where navigating the website does not reload the page. Reloading the page will break ongoing calls. This can also be solved by using frames / iframe, however, this is not the preferred solution.

If you can't re-architect your website, it's ok to start Sinch each time the page is loaded, however it will take a little while before SinchClient is ready to receive calls. Also, if you're serving the webpage over HTTP, the browser security will kick in and require permissions from the user after each page reload. This can be solved if the web page is served over HTTPS instead; the browser will save the user permission for secure websites.

In this scenario, note that there will still be a delay after the page is loaded before SinchClient can be used to make or receive calls and page reloads will result in interrupted calls, which may result in poor user experience.

Br, Magnus

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download