I want to control start and stopping video from a button or through a function.
How can i do this?
For example, I have a video like
st.video(‘sample_video.mp3’)
and I have some button like
st.button('‘Start’)
st.button(‘Stop’)
How do i use these button to start/stop ‘sample video’.
Thanks
Hi @Gaurav_Kesharwani and welcome to the community!
If I remember properly, @okld had a trick to achieve this via his Streamlit Elelements library - maybe he can comment!
Best,
Charly
@Gaurav_Kesharwani
Here’s the library I’m referring to
Hello everyone
I’m happy to announce the release of Streamlit Elements
This component will allow you to create beautiful applications with Material UI, Nivo charts, with hotkeys and callbacks support, and with even more other widgets and features.
In addition, you will be able to create draggable and resizable dashboards for your Streamlit apps.
[Open in Streamlit]
Installation and usage
Everything from installation to usage is described there …
Charly
@Charly Wargnier via Streamlit
Thanks for quick response, I did checkout the library, I think you were referring to the media player. I was still not able to figure out , h0ow to control it programmatically.
Any sample code snippet would be highly appreciated.