I want to be able to jump around in a video.
st.video() has an argument start_time. This works fine when the widget is created. But can I also change the start time of the video afterwards?
the code below does not work, but is there something similar?
v = st.video("url")
v.start_time = 100
I think I could solve it with st.empty().
But one problem still exists: Can I automatically start the video player after creating it?
So far I have:
placeholder = st.empty()
Using the component streamlit-player does the trick for me as long as you set the playing and muted arguments to True.
As of Chrome 66, videos must be
muted in order to play automatically. Some players, like Facebook, cannot be unmuted until the user interacts with the video, so you may want to enable
controls to allow users to unmute videos themselves. Please set
import streamlit as st
from streamlit_player import st_player
st_player(url, playing=True, muted=True)