forked from rrweb-io/rrweb
-
Notifications
You must be signed in to change notification settings - Fork 8
fix(replay): handle fast forwarding for arbitrary position jumps in replayer #248
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
Merged
+738
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bc6db72
to
7393768
Compare
srest2021
commented
Sep 18, 2025
@srest2021 Is it possible to handle this all inside of rrweb rather than requiring changes in sentry ui? The reason I ask is that if this is a bug within rrweb, it'd be nice to upstream a fix. |
billyvg
reviewed
Sep 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to take a closer look tomorrow, but here are a few nits for now
billyvg
approved these changes
Sep 24, 2025
6deca53
to
d0fa140
Compare
srest2021
added a commit
that referenced
this pull request
Sep 25, 2025
Update changelog for commit: fix(replay): handle fast forwarding for arbitrary position jumps in replayer (#248)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fixes REPLAY-667
fixes REPLAY-558
Previously, fast forwarding through a replay was buggy and inconsistent if you scrub or jump positions. This is because when users scrub or jump to arbitrary timestamps, the cached nextUserInteractionEvent and state become stale and prevent proper re-evaluation of fast forwarding.
We now extend the Replayer class by adding a private function reevaluateFastForward that will handle arbitrary position jumps. reevaluateFastForward finds the current event index using binary search, scans forward to find the next user interaction position, and calculates the gap of inactivity between them. If the gap is large enough, fast forwarding is triggered. We call this function if we jump/scrub to a new position, if the skipInactive config changes, and on starting playback.
Before:
Screen.Recording.2025-09-23.at.9.20.44.AM.mov
After:
Screen.Recording.2025-09-23.at.9.27.18.AM.mov