Skip to content

fix: ignore autoplay attribute mutations regardless of tagName case - #1921

Open
roggernaut wants to merge 1 commit into
rrweb-io:mainfrom
roggernaut:fix/ignore-attribute-tagname-case
Open

fix: ignore autoplay attribute mutations regardless of tagName case#1921
roggernaut wants to merge 1 commit into
rrweb-io:mainfrom
roggernaut:fix/ignore-attribute-tagname-case

Conversation

@roggernaut

Copy link
Copy Markdown

Fixes #1916.

ignoreAttribute compares the tag name against lowercase ['video', 'audio'], but the attribute-mutation handler in packages/rrweb/src/record/mutation.ts passes the native uppercase target.tagName, so autoplay changes on media elements were never ignored during live recording. This lowercases the tag name inside ignoreAttribute, making the snapshot and mutation paths behave the same.

Includes unit tests (the uppercase case fails without the fix) and a changeset.

ignoreAttribute compares the tag name against lowercase literals, but the
attribute-mutation handler in rrweb passes the native uppercase
target.tagName, so autoplay changes on video/audio elements were never
ignored during live recording. Lowercase inside ignoreAttribute so the
snapshot and mutation paths behave the same.

Fixes rrweb-io#1916
@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b28daba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 22 packages
Name Type
rrweb-snapshot Patch
rrweb Patch
@rrweb/all Patch
@rrweb/browser-client Patch
@rrweb/packer Patch
@rrweb/record Patch
@rrweb/replay Patch
rrdom-nodejs Patch
rrdom Patch
rrvideo Patch
rrweb-player Patch
@rrweb/types Patch
@rrweb/utils Patch
@rrweb/web-extension Patch
@rrweb/rrweb-plugin-canvas-webrtc-record Patch
@rrweb/rrweb-plugin-canvas-webrtc-replay Patch
@rrweb/rrweb-plugin-console-record Patch
@rrweb/rrweb-plugin-console-replay Patch
@rrweb/rrweb-plugin-network-record Patch
@rrweb/rrweb-plugin-network-replay Patch
@rrweb/rrweb-plugin-sequential-id-record Patch
@rrweb/rrweb-plugin-sequential-id-replay Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

ignoreAttribute never matches on the attribute-mutation path (tagName case mismatch)

1 participant