fix(replays): don't load segment 0 #67911
Merged
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 #67847
Calling
loadSegment(0)
in the constructor works under the assumption that we'll always play the replay from the beginning; however, there's a case where the user might seek to a later part of the video before pressing play first. This was resulting in a bug where the first video was always playing even though that wasn't the right part of the video. We don't actually need to theloadSegment(0)
call at all for the replay to play normally from the beginning (see last video):BEFORE: Replay was playing first clip erroneously after seeking to later part of the video
Screen.Recording.2024-03-27.at.10.23.48.PM.mov
AFTER: Replay plays correctly if we seek to later part of the video
Screen.Recording.2024-03-28.at.2.09.54.PM.mov
Replay plays normally from beginning
Screen.Recording.2024-03-28.at.2.12.15.PM.mov