rrweb
rrweb copied to clipboard
fix: prevent invalid media processing
👋 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:
- protect against MediaInteraction events (mutations) being applied to non-media elements otherwise we'll see errors during playback
- exit early out of
addMediaElementsif a media element is blocked since it won't have any media attributes anyway