feat: Ignore autoplay attribute on video/audio elements (#1152)
* feat: Ignore `autoplay` attribute on video/auto elements This element leads to weird issues when replaying, so it's better to strip this out. * add changeset * fix check fix typo * Apply formatting changes --------- Co-authored-by: mydea <mydea@users.noreply.github.com>
This commit is contained in:
@@ -2,6 +2,7 @@ import {
|
||||
serializeNodeWithId,
|
||||
transformAttribute,
|
||||
IGNORED_NODE,
|
||||
ignoreAttribute,
|
||||
isShadowRoot,
|
||||
needMaskingText,
|
||||
maskInputValue,
|
||||
@@ -557,7 +558,7 @@ export default class MutationBuffer {
|
||||
styleObj[pname] = false; // delete
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} 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,
|
||||
|
||||
Reference in New Issue
Block a user