Audio session state (make audio persist through multipage)

Is there a way to make audio persist (i.e. continue playing) when navigating around
a multipage app?

It currently stops playing once another page is clicked on.

something like this?

st.session_state['audio'] = st.audio("audio/audio.mp3", format='mp3')
st.session_state['audio']

Hi @maciekg,

There isn’t a built-in audio session state feature. Hypothetically, you could save the current timestamp to session state when the user changes pages and then resume the audio at that same timestamp. I’m not sure how well this would work but it could be worth a shot.

Hi @Caroline , How could I get the current timestamp of the audio widget?

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.