Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Apply formatting changes
  • Loading branch information
mydea committed Feb 27, 2023
commit aecdcf94ba447405cbe99bccbeb707e352c79907
6 changes: 5 additions & 1 deletion packages/rrweb-snapshot/src/snapshot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,11 @@ export function transformAttribute(
}
}

export function ignoreAttribute(tagName: string, name: string, _value: unknown): boolean {
export function ignoreAttribute(
tagName: string,
name: string,
_value: unknown,
): boolean {
return (tagName === 'video' || tagName === 'audio') && name === 'autoplay';
}

Expand Down
2 changes: 1 addition & 1 deletion packages/rrweb/src/record/mutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ export default class MutationBuffer {
styleObj[pname] = false; // delete
}
}
} else if(!ignoreAttribute(target.tagName, m.attributeName!, value)) {
} else if (!ignoreAttribute(target.tagName, m.attributeName!, value)) {
// overwrite attribute if the mutations was triggered in same time
item.attributes[m.attributeName!] = transformAttribute(
this.doc,
Expand Down