rrweb icon indicating copy to clipboard operation
rrweb copied to clipboard

fix: prevent invalid media processing

Open juliecheng opened this issue 6 months ago • 2 comments

👋 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

juliecheng avatar Apr 25 '25 19:04 juliecheng