Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions .changeset/chilly-jeans-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"rrweb": patch
---

Don't allow video/audio autoplay to automatically unfreeze page
11 changes: 10 additions & 1 deletion packages/rrweb/src/record/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,16 @@ function record<T = eventWithTime>(
e.type !== EventType.FullSnapshot &&
!(
e.type === EventType.IncrementalSnapshot &&
e.data.source === IncrementalSource.Mutation
[
IncrementalSource.Mutation,
IncrementalSource.MediaInteraction, // often automatic e.g. background video loop
IncrementalSource.StyleSheetRule,
IncrementalSource.CanvasMutation,
IncrementalSource.Font,
IncrementalSource.Log,
IncrementalSource.StyleDeclaration,
IncrementalSource.AdoptedStyleSheet,
].includes(e.data.source)
)
) {
// we've got a user initiated event so first we need to apply
Expand Down