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

Mobile Replay: Seeking shows Play on first half and Restart on second half #68509

Closed
Tracked by #63255
sentry-io bot opened this issue Apr 9, 2024 · 4 comments · Fixed by #69074
Closed
Tracked by #63255

Mobile Replay: Seeking shows Play on first half and Restart on second half #68509

sentry-io bot opened this issue Apr 9, 2024 · 4 comments · Fixed by #69074

Comments

@sentry-io
Copy link

sentry-io bot commented Apr 9, 2024

Sentry Feedback: JAVASCRIPT-2SEE

Seeking passed the half of the video changes the button from Play to Restart. Seeking within the first half goes back to Play

seeking-passed-half-shows-restart.mov
@getsantry
Copy link
Contributor

getsantry bot commented Apr 9, 2024

Routing to @getsentry/product-owners-replays for triage ⏲️

@michellewzhang
Copy link
Member

michellewzhang commented Apr 9, 2024

initial debugging shows me that the attachments list has 3 items totaling ~9s, but for some reason the replay is 22s

SCR-20240408-qqyo

@michellewzhang
Copy link
Member

michellewzhang commented Apr 9, 2024

looking into this further. subtracting the timestamps gives us ~11 s between the first + second segments, and ~10 s between the second + third segments. looks like there might be gaps between the segments (if they're supposed to be 4s, 4s, and 1s long), which might be causing the bugs

@michellewzhang
Copy link
Member

michellewzhang commented Apr 16, 2024

Replay duration bug has corrupted the example replay -- let's close this ticket for now and reopen if we see it again

@michellewzhang michellewzhang closed this as not planned Won't fix, can't repro, duplicate, stale Apr 16, 2024
michellewzhang added a commit that referenced this issue Apr 17, 2024
This PR fixes 2 bugs related to the video replay timer:

<img width="827" alt="SCR-20240416-oqes"
src="https://github.com/getsentry/sentry/assets/56095982/3dd16316-ed2b-4d24-a682-f3032ef4742a">




### 1. If the replay has a gap at the end (e.g. the segment ends but for
some reason the duration we get from the SDK extends beyond that), the
old behavior was that the replay would just stop.

BEFORE:


https://github.com/getsentry/sentry/assets/56095982/9f76acc1-d9e6-4a15-a357-0c711da17b4a

Notice how the replay stops after 9 seconds. This is because the rest of
the replay (the other 4 hours) is junk. The ideal behavior would be to
have the replay play until the end, so that it doesn't look weird on the
UI.

AFTER:


https://github.com/getsentry/sentry/assets/56095982/e300e349-d606-4a57-88df-3c49d612a24a

Notice how the replay keeps going after 9 seconds (even though
technically there isn't any video content to display. It's just showing
the previous segment)

### 2. If we seek into the gap at the end of the video, the old behavior
of the video replayer was to keep running the timer infinitely. This is
because the replayer wanted to run the timer until we can play the next
segment (which doesn't exist in this case).

BEFORE (video trimmed because you'd be watching paint dry but i seeked
to somewhere about 10s from the end):


https://github.com/getsentry/sentry/assets/56095982/67ce3e16-2ac5-4432-9bee-defd5fc61a34

Notice how the timer continues running even after the replay "ends".

The fix here is to add a notification to the timer to stop at the replay
duration (passed in from `replayContext`) when we seek into a gap at the
end. This lets the replayer know that we should stop searching for the
next (nonexistent) segment.

AFTER (video trimmed, same seeking place):


https://github.com/getsentry/sentry/assets/56095982/d05b9f49-e4c4-4e49-98d6-49a652b65b9a

Video ends at the expected timestamp.


Fixes #68496
Also fixes #68509
@github-actions github-actions bot locked and limited conversation to collaborators May 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant