Skip to content

Commit

Permalink
fix recording of webgl2 canvases (#106)
Browse files Browse the repository at this point in the history
webgl2 canvases created after highlight would start recording with the
`preserveDrawingBuffer: false`
setting would not record correctly because we would snapshot a
transparent image of the canvas.
instead of trying to clear the canvas, we should create a context with
`preserveDrawingBuffer: true` to
ensure that the canvas can be recorded (tested in babylon.js)
https://app.highlight.io/1/sessions/n7P0x5XTItCqEN7B7pmtJVldUzJo
  • Loading branch information
Vadman97 committed Oct 9, 2024
1 parent 5c4da6c commit 78a47cf
Show file tree
Hide file tree
Showing 5 changed files with 218 additions and 141 deletions.
2 changes: 2 additions & 0 deletions packages/rrweb/src/record/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ function record<T = eventWithTime>(
blockSelector,
mirror,
sampling: sampling?.canvas?.fps,
clearWebGLBuffer: sampling?.canvas?.clearWebGLBuffer,
initialSnapshotDelay: sampling?.canvas?.initialSnapshotDelay,
dataURLOptions,
resizeFactor: sampling?.canvas?.resizeFactor,
maxSnapshotDimension: sampling?.canvas?.maxSnapshotDimension,
Expand Down
Loading

0 comments on commit 78a47cf

Please sign in to comment.