Skip to content

Improve Safari canvas snapshot resizing#123

Open
jamilahmadzai wants to merge 1 commit into
highlight:masterfrom
jamilahmadzai:fix/safari-canvas-snapshot-prescale
Open

Improve Safari canvas snapshot resizing#123
jamilahmadzai wants to merge 1 commit into
highlight:masterfrom
jamilahmadzai:fix/safari-canvas-snapshot-prescale

Conversation

@jamilahmadzai
Copy link
Copy Markdown

@jamilahmadzai jamilahmadzai commented May 29, 2026

Summary

  • add a WebKit-only snapshot path that pre-scales canvas and video sources before bitmap creation
  • keep Chromium and Firefox on the existing createImageBitmap(source, resize*) path
  • avoid resize options on WebKit when the source is already at the target size
  • add focused coverage for Safari/iOS WebKit gating versus Chromium/Firefox

Validation

  • yarn workspace rrweb build
  • ./node_modules/.bin/vitest --config rrweb/packages/rrweb/vitest.config.ts run rrweb/packages/rrweb/test/record/canvas-manager.test.ts

Source companion for highlight/highlight#6775.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant