I am working on an app that plays WAV audio files generated from numpy data arrays. st.audio works great for this in Chrome and Firefox, but the audio files won’t load in Safari. I wonder if this is a known issue, or if anyone has hints for making it work?
I have had similar experiences where audio/video media doesn’t work in Safari. I’ve also found several components that work great in Chrome and Firefox but not at all in Safari. This is perhaps not such a travesty for MacOS where browser choice is more prevalent but the same issues occur on iOS devices where Safari is dominant and is largely the only used browser. Since I’m not the only one experiencing this, I’ve opened up an issue here: https://github.com/streamlit/streamlit/issues/2139
Hey @jonah! Can you test on the streamlit-nightly? You can install it by uninstalling streamlit and run pip install streamlit-nightly.
To explain the problem, Safari requires the server to support Range Requests. We found this problem with regard to videos, so I am sure this would also apply to audio
@kmcgrady It looks like there’s a recent release of streamlit (0.69) that should include this fix. But, requiring this version in requirements.txt on share.streamlit.io did not seem to fix the issue with audio components in Safari. I’m probably missing a simple step to get the latest version, but I’m not sure what else to try. Any hints would be a big help.
@jonah@theimposingdwarf I looked into it. Streamlit Share adds some security and restricts the set of request/response headers. These end up blocking the important headers needed. I’ve asked them to fix them with a suggested fix. Hopefully this get’s fixed soon.
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.