From c85d20ffa0725d3d41f3eedf21f691f71af8026a Mon Sep 17 00:00:00 2001 From: Catherine Lee <55311782+c298lee@users.noreply.github.com> Date: Wed, 27 Mar 2024 16:36:02 -0400 Subject: [PATCH] feat(replay): Replay canvas troubleshooting docs (#9559) * add canvas tainted troubleshooting * add MDN docs link * comments * Update docs/platforms/javascript/common/session-replay/troubleshooting.mdx Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com> --------- Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com> --- .../javascript/common/session-replay/troubleshooting.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/platforms/javascript/common/session-replay/troubleshooting.mdx b/docs/platforms/javascript/common/session-replay/troubleshooting.mdx index 6d3a7c563c302..960bc37c519d9 100644 --- a/docs/platforms/javascript/common/session-replay/troubleshooting.mdx +++ b/docs/platforms/javascript/common/session-replay/troubleshooting.mdx @@ -17,6 +17,8 @@ This guide aims to extend the main troubles Canvas is supported in SDK versions >= `7.98.0`. Please see the canvas setup documention 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 enable manual snapshotting and call a `snapshot()` method inside of your re-paint loop.