We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a21c2df commit f1bdf60Copy full SHA for f1bdf60
static/app/components/replays/canvasReplayerPlugin.tsx
@@ -288,12 +288,17 @@ export function CanvasReplayerPlugin(events: eventWithTime[]): ReplayPlugin {
288
});
289
290
const img = containers.get(e.data.id);
291
- if (img) {
292
- if (target instanceof HTMLCanvasElement) {
+ if (img && target instanceof HTMLCanvasElement) {
+ try {
293
img.src = target.toDataURL();
294
+ img.style.maxWidth = '100%';
295
+ img.style.maxHeight = '100%';
296
+ } catch (err) {
297
+ Sentry.logger.warn('Replay: Failed to copy canvas to image', {
298
+ error: err,
299
+ element: target.tagName,
300
+ });
301
}
- img.style.maxWidth = '100%';
- img.style.maxHeight = '100%';
302
303
304
prune(e);
0 commit comments