-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(replays): Add an SDK _experiments configuration flag to enable canvas recording #9723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
size-limit report 📦
|
Let's make the options == what is described in https://github.com/getsentry/team-replay/issues/306 so that we can customize rrweb options without having to release a new SDK version |
Co-authored-by: Billy Vong <billyvg@users.noreply.github.com>
packages/replay/src/types/replay.ts
Outdated
fps: number; | ||
quality: number; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make these optional and set defaults for them?
packages/replay/src/replay.ts
Outdated
@@ -339,6 +339,12 @@ export class ReplayContainer implements ReplayContainerInterface { | |||
...(this.recordingMode === 'buffer' && { checkoutEveryNms: BUFFER_CHECKOUT_TIME }), | |||
emit: getHandleRecordingEmit(this), | |||
onMutation: this._onMutationHandler, | |||
...(this._options._experiments.canvas && { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l: Could we extract this out to avoid having so many repetitions here, as they are quite long? Something like this:
const canvas = this._options._experiments.canvas;
// ...
onMutation: this._onMutationHandler,
...(canvas && {
recordCanvas: true,
sampling: {
canvas: canvas.fps || 4,
// ...
}
}
SDK _experiments configuration flag to enable canvas recording. It allows snapshot canvas recording at 4fps.
Closes https://github.com/getsentry/team-replay/issues/306