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: Set finished=false in goto instead of handleProgressClick #1198

Merged

Conversation

charliegracie
Copy link
Contributor

@charliegracie charliegracie commented Apr 5, 2023

If the player finishes a replaying a video the Controller's finished boolean is set to true. This allows the video to be restarted at the beginning if the controller is toggled to play. If a user clicks on the progress bar the finished boolean is reset so when toggle is called it starts at the right place. If a user programatically calls goto, which is the underlying API for handling the progress bar click, the next invocation of toggle will start the video at the beginning instead of the proper location.

If the player finishes a replaying a video the `finished` boolean is set to true. This allows the video to be restarted at the beginning if the controller is toggled again. If a user clicks on the progress bar the `finished` boolean is reset so if the `toggle` API is called it starts at the right place. If a user programatically calls `goto` which is the underlying API that handling the progress click calls the next invocation of `toggle` will start the video at the beginning instead of the proper location.
@changeset-bot
Copy link

changeset-bot bot commented Apr 5, 2023

🦋 Changeset detected

Latest commit: 9935e99

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
rrweb-player Patch
rrweb Patch
rrweb-snapshot Patch
rrdom Patch
rrdom-nodejs Patch
@rrweb/types Patch
@rrweb/web-extension Patch
rrvideo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@charliegracie
Copy link
Contributor Author

Looking into creating the changeset

@charliegracie charliegracie changed the title Reset the finished flag in goto Fix: Set finished=false in goto instead of handleProgressClick Apr 7, 2023
@charliegracie charliegracie changed the title Fix: Set finished=false in goto instead of handleProgressClick fix: Set finished=false in goto instead of handleProgressClick Apr 7, 2023
Copy link
Member

@YunFeng0817 YunFeng0817 left a comment

Choose a reason for hiding this comment

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

Good catch! Thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants