Hi, I deployed a voice-based application on AWS EC2 instance but I am not able to enable Microphone access. The browser isn’t letting me, even when I grant permission to the website. I believe this is due to the website 'not being secure '/no HTTPS.
So could someone please tell me what is to be done? The same application works fine when deployed through Streamlit Sharing.
Hey @Sharan19 !
Just to be sure we have all the details, are you using streamlit-webrtc or js events in bokeh to gain microphone access?
How did you guess no HTTPS is the reason? Do you perhaps have logs in your browser devtools pointing to this deduction ?
Looking forward to your answer,
Hey @andfanilo, I am using js events in bokeh through the ‘streamlit_bokeh_events’ library.
I thought it was because of no HTTPS because of the following:
I have direct messaged you the URL of the website.
Hmmm you’re right can’t seem to give any permission to the microphone on any browser
I also do think you’re right about the HTTP and not local, as described in google chrome - Browser says "Camera Blocked to protect your privacy" - Stack Overflow. But even setting the flag to treat insecure origin as secure did not work for me.
If you can, I’d reverse proxy your Streamlit app endpoints through an NGINX/Apache (there are topics on this in the forum Streamlit, docker, Nginx, ssl/https - #5 by agray ) and rollout a self-signed Let’s encrypt certificate to get HTTPS. I’m not an AWS user but maybe AWS does provide with ways to reverse proxy, maybe it’s described in one of the following tutorials: Streamlit Deployment Guide (wiki).
Thanks a lot!
UPDATE: Entering the website’s URL in ‘Insecure origins treated as secure’ worked for me