You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The replay preview provides a window (starting/ending timestamps) to clip the replay. For regular replays, we can simply filter all replay events that fall into this window. The video player functions a bit differently since it's a list of videos (with potentially differing durations) that are stitched together with JS. This means that we may need to start inside the middle of a video, and stop in the middle of the video if we wanted to keep previews to a specific duration.
We have an external timer that runs to track the current scrubber time. It ideally (it currently isn't fully implemented yet, e.g. it will desync in non-ideal network conditions) syncs with the current video that is playing. We can add an end time to the timer so that it stops any videos that are playing.
A bit of refactoring will be needed though. Here's at least one place that we need to fix. This causes the currentTime to be negative. The timer is more or less independent of the timestamps of the pseudo rrweb events, so it [probably] doesn't need to keep track of an offset.
Fixes#67877
Update `replayContext`, `replayReader`, and `videoReplayer` to make the
issue details replay clip work for video replays.
Major changes:
- `replayReader`:
- in `_applyClipWindow`, setting `_startOffsetMs` was causing some
playback issues with the video timer. we don't really need the offset
since the video runs on an external timer, and we can directly tell the
video player when to start
- we also don't need a lot of the functionality relating to
filtering/offsetting breadcrumb/span/etc frames in `_applyClipWindow`
(yet) so we return before these are done
- `replayContext`:
- now we're sending clip start/end times into here, and these clip
window times get initialized into the video player. note that for
non-clip video replays, the clip window will be undefined (desired).
- `videoReplayer`: if there's a clip window passed in, we do some extra
logic:
- adjust the start time to be the clip start
- tell the timer to stop when the clip duration is up
<img width="579" alt="SCR-20240405-ilxf"
src="https://github.com/getsentry/sentry/assets/56095982/286f1fd4-488b-479f-957a-d6ca15fc89f9">
https://github.com/getsentry/sentry/assets/56095982/f24a3093-d993-477d-a914-ad67216724f8
The replay preview provides a window (starting/ending timestamps) to clip the replay. For regular replays, we can simply filter all replay events that fall into this window. The video player functions a bit differently since it's a list of videos (with potentially differing durations) that are stitched together with JS. This means that we may need to start inside the middle of a video, and stop in the middle of the video if we wanted to keep previews to a specific duration.
We have an external timer that runs to track the current scrubber time. It ideally (it currently isn't fully implemented yet, e.g. it will desync in non-ideal network conditions) syncs with the current video that is playing. We can add an end time to the timer so that it stops any videos that are playing.
A bit of refactoring will be needed though. Here's at least one place that we need to fix. This causes the currentTime to be negative. The timer is more or less independent of the timestamps of the pseudo rrweb events, so it [probably] doesn't need to keep track of an offset.
(Note I've been using this replay to test)
The text was updated successfully, but these errors were encountered: