Skip to content

Commit

Permalink
feat(replay): Replay canvas troubleshooting docs (#9559)
Browse files Browse the repository at this point in the history
* add canvas tainted troubleshooting

* add MDN docs link

* comments

* Update docs/platforms/javascript/common/session-replay/troubleshooting.mdx

Co-authored-by: vivianyentran <[email protected]>

---------

Co-authored-by: vivianyentran <[email protected]>
  • Loading branch information
c298lee and vivianyentran committed Mar 27, 2024
1 parent 8247eb1 commit c85d20f
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ This guide aims to extend the <PlatformLink to="/troubleshooting/">main troubles

Canvas is supported in SDK versions >= `7.98.0`. Please see the <PlatformLink to="/session-replay/#canvas-recording">canvas setup documention</PlatformLink> to get started with canvas recordings.

If you are on a supported SDK version and your `canvas` elements still aren't getting captured, check if you have images or videos loaded from foreign origins inside your `canvas`. Any data loaded from an origin without CORS approval is not considered secure and will throw a `SecurityError` when trying to use the replay canvas integration. To fix this issue, set `crossorigin="anonymous"` to your images or videos. This will allow images that are loaded from foreign origins to be used in `canvas` as if they have been loaded from the current origin. See the [CORS documention](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image#security_and_tainted_canvases) for more information about cross-origin access.

## Replay is slowing down my `canvas`

The integration needs to enable `preserveDrawingBuffer` to export images from 3D and WebGL canvases. This can negatively affect canvas performance. If your canvas application is impacted by enabling `preserveDrawingBuffer`, you'll need to <PlatformLink to="/session-replay/#canvas-recording-performance">enable manual snapshotting</PlatformLink> and call a `snapshot()` method inside of your re-paint loop.
Expand Down

0 comments on commit c85d20f

Please sign in to comment.