Skip to content

Commit

Permalink
Fix media replay bug when target is not an AUDIO or VIDEO element
Browse files Browse the repository at this point in the history
Potentially fixes PostHog/posthog#21874
And potentially fixes #1461
  • Loading branch information
Juice10 committed May 1, 2024
1 parent ae6908d commit d667da8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/rrweb/src/replay/media/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,8 @@ export class MediaManager {
timeOffset: number;
mutation: mediaInteractionData;
}) {
if (!['AUDIO', 'VIDEO'].includes(target.nodeName)) return;

this.mediaMap.set(
target,
this.getMediaStateFromMutation({
Expand Down

0 comments on commit d667da8

Please sign in to comment.