Closed avidale closed 10 months ago
Not sure if it's related but I also had the error index.js:125 Uncaught (in promise) TypeError: Failed to execute 'createMediaStreamSource' on 'AudioContext': parameter 1 is not of type 'MediaStream'.
with the "Start Recording" button doing nothing. I solved that by simply turning off my add blocker.
I'm hosting my server with docker on an Ubuntu computer so it could not be the same problem but I guess it can be helpful for some people.
Hi @avidale, to ensure that 'createMediaStreamSource' can be connected successfully, I can advise you to look into these solution approaches - these may mitigate the issue at hand. Also, big thanks to @VaysseRobin for your support. 🤙🏻
1) Make sure that your deployment is configured in a way that the component targets the user's microphone (browser media-stream API) and not the microphone of the deployment server's (Azure, AWS, etc.) audio channels.
2) Ensure that your streamlit app deployment is https-enabled. Look into obtaining certificates from Let's Encrypt using certbot, follow the steps as instructed here: https://docs.streamlit.io/library/advanced-features/https-support
3) On the user's end, ensure that the web app is granted access to the user's microphone (via browser pop-up). If the pop-up doesn't appear, ensure to disable add-blockers and access the app via https.
I have an error when running streamlit-audio-recorder remotely (on an AWS server), however, when I run it locally, the error does not reproduce.
When I am loading the page, I can see the following warning in the browser's developer console:
When I am pressing the "Start recording" button, nothing happens on the web page, but I am seeing two errors in the developer console:
and
Here
index.js
is apparently the file withAudioReactRecorder
source code.The browser page is allowed to use the microphone, so this "Permission denied" error looks really mysterious. I am using Google Chrome on Mac.
Can anyone please suggest how can I fix this error? It may be related to #9, but the error messages are different, so I am not sure.