Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/replay-canvas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
},
"homepage": "https://docs.sentry.io/platforms/javascript/session-replay/",
"devDependencies": {
"@sentry-internal/rrweb": "2.35.0"
"@sentry-internal/rrweb": "2.37.0"
},
"dependencies": {
"@sentry-internal/replay": "9.46.0",
Expand Down
11 changes: 8 additions & 3 deletions packages/replay-canvas/src/canvas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ import { defineIntegration } from '@sentry/core';
import type { CanvasManagerInterface, CanvasManagerOptions } from '@sentry-internal/replay';
import { CanvasManager } from '@sentry-internal/rrweb';

interface SnapshotOptions {
skipRequestAnimationFrame?: boolean;
}

interface ReplayCanvasIntegration extends Integration {
snapshot: (canvasElement?: HTMLCanvasElement) => Promise<void>;
snapshot: (canvasElement?: HTMLCanvasElement, options?: SnapshotOptions) => Promise<void>;
}

interface ReplayCanvasOptions {
Expand Down Expand Up @@ -106,9 +110,10 @@ export const _replayCanvasIntegration = ((options: Partial<ReplayCanvasOptions>
...(CANVAS_QUALITY[quality || 'medium'] || CANVAS_QUALITY.medium),
};
},
async snapshot(canvasElement?: HTMLCanvasElement) {
async snapshot(canvasElement?: HTMLCanvasElement, options?: SnapshotOptions) {
const canvasManager = await _canvasManager;
canvasManager.snapshot(canvasElement);

canvasManager.snapshot(canvasElement, options);
},
};
}) satisfies IntegrationFn<ReplayCanvasIntegration>;
Expand Down
4 changes: 2 additions & 2 deletions packages/replay-internal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@
"devDependencies": {
"@babel/core": "^7.27.7",
"@sentry-internal/replay-worker": "9.46.0",
"@sentry-internal/rrweb": "2.35.0",
"@sentry-internal/rrweb-snapshot": "2.35.0",
"@sentry-internal/rrweb": "2.37.0",
"@sentry-internal/rrweb-snapshot": "2.37.0",
"fflate": "0.8.2",
"jest-matcher-utils": "^29.0.0",
"jsdom-worker": "^0.3.0",
Expand Down
Loading