Playing and stopping video programatically

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‘sample_video.mp3’)

and I have some button like


How do i use these button to start/stop ‘sample video’.


Hi @Gaurav_Kesharwani and welcome to the community! :wave:

If I remember properly, @okld had a trick to achieve this via his Streamlit Elelements library - maybe he can comment! :slight_smile:



Here’s the library I’m referring to :slight_smile:


@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.

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