sentry
sentry copied to clipboard
feat(replay): create a wrapper class to init rrweb player alongside video replayer
Fixes https://github.com/getsentry/sentry/issues/69817
We have a videoReplayer
, which uses video events to create the replay playback for mobile replays. However, in order to see the gestures (clicks, mouse movements, etc) we need to initialize an rrweb player too (the one that web replay uses). This PR introduces a wrapperReplayer
classes which initializes both, so that mobile replays can utilize both players at once.
Another key change we had to make was introducing a fake full snapshot event in order to trick the rrweb player into thinking we had a node to map the mouse movement to. The rrweb player essentially fails to render any gesture if it doesn't find an element with a matching id
to the id
inside the positions
array (see below picture), so we hardcoded the event to have id: 0
(which is what the SDK is sending for the mobile rrweb events). This workaround should be safe to do since the full snapshot event doesn't affect the video playback at all.
WIP: gestures do appear, however scrubbing/seeking causes the gestures to become out of sync with the video. In general, the gestures are not perfectly aligned with the video either. Need to do further work/investigation here to fix these bugs.
Bundle Report
Changes will increase total bundle size by 261.05kB :arrow_up:
Bundle name | Size | Change |
---|---|---|
app-webpack-bundle-array-push | 26.77MB | 261.05kB :arrow_up: |