Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Handle start_time changes in st.video #7257

Merged
merged 7 commits into from Sep 1, 2023
Merged

Conversation

mayagbarnes
Copy link
Collaborator

Describe your changes

Adds additional check to useEffect to handle changes in start_time for st.video

GitHub Issue Link (if applicable)

Closes #7126

Testing Plan

  • E2E Tests ✅

@@ -49,6 +49,11 @@ export default function Video({

if (videoNode) {
videoNode.addEventListener("loadedmetadata", setStartTime)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, we will always change the current time to the start time, even if a rerun happens while playing video.

I think it is a good idea that the new behavior is consistent with st.audio

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense - I followed st.audio pattern this time if you'd like to give it another look!

@mayagbarnes mayagbarnes marked this pull request as ready for review August 31, 2023 18:04
@mayagbarnes mayagbarnes merged commit 409cc9f into develop Sep 1, 2023
49 checks passed
@mayagbarnes mayagbarnes deleted the video-start branch September 1, 2023 17:00
eric-skydio pushed a commit to eric-skydio/streamlit that referenced this pull request Dec 20, 2023
Adds additional check to useEffect to handle changes in start_time for st.video
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Mar 22, 2024
Adds additional check to useEffect to handle changes in start_time for st.video
zyxue pushed a commit to zyxue/streamlit that referenced this pull request Apr 16, 2024
Adds additional check to useEffect to handle changes in start_time for st.video
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changing start_time of st.video() doesn't work for the same video
3 participants