Skip to content

fix: prevent invalid media processing #1688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

juliecheng
Copy link
Contributor

@juliecheng juliecheng commented Apr 25, 2025

👋 hello! i'm seeing h.pause is not a function errors/warnings during playback and after looking into the issue some more, it looks like during playback we can end up adding non-media elements to the mediaMap via mediaMutation, which is what's causing some errors during playback.

to summarize the changes in this pr:

  1. protect against MediaInteraction events (mutations) being applied to non-media elements otherwise we'll see errors during playback
  2. exit early out of addMediaElements if a media element is blocked since it won't have any media attributes anyway

Copy link

changeset-bot bot commented Apr 25, 2025

🦋 Changeset detected

Latest commit: 152b713

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

This PR includes changesets to release 19 packages
Name Type
rrweb Patch
rrweb-snapshot Patch
rrdom Patch
rrdom-nodejs Patch
rrweb-player Patch
@rrweb/all Patch
@rrweb/replay Patch
@rrweb/record Patch
@rrweb/types Patch
@rrweb/packer Patch
@rrweb/utils Patch
@rrweb/web-extension Patch
rrvideo Patch
@rrweb/rrweb-plugin-console-record Patch
@rrweb/rrweb-plugin-console-replay Patch
@rrweb/rrweb-plugin-sequential-id-record Patch
@rrweb/rrweb-plugin-sequential-id-replay Patch
@rrweb/rrweb-plugin-canvas-webrtc-record Patch
@rrweb/rrweb-plugin-canvas-webrtc-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

@juliecheng juliecheng force-pushed the jc-rrweb-prevent-invalid-media-processing branch from 01d84ce to 152b713 Compare April 25, 2025 20:10
@juliecheng
Copy link
Contributor Author

@eoghanmurray hi eoghan! just a heads up that my pr looks like it might be trying to resolve the same (or at least similar) issue as your pr here #1673 if my changes here look good i'm happy to close this one out and merge the changes into your pr instead if that's preferred (or vice versa). thanks!

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.

1 participant