Skip to content

Improve Safari canvas snapshot resizing#123

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

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

Conversation

@jamilahmadzai

@jamilahmadzai jamilahmadzai commented May 29, 2026

Copy link
Copy Markdown

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.

@jamilahmadzai jamilahmadzai force-pushed the fix/safari-canvas-snapshot-prescale branch from 12ffa8e to aa66de6 Compare June 18, 2026 14:44
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