Skip to content
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

Fix media replay bug when target is not an AUDIO or VIDEO element #1462

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Juice10
Copy link
Contributor

@Juice10 Juice10 commented May 1, 2024

Potentially fixes PostHog/posthog#21874
Replacement for #1461

Copy link

changeset-bot bot commented May 1, 2024

🦋 Changeset detected

Latest commit: 86baaba

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

This PR includes changesets to release 8 packages
Name Type
rrweb Patch
rrweb-snapshot Patch
rrdom Patch
rrdom-nodejs Patch
rrweb-player Patch
@rrweb/types Patch
@rrweb/web-extension Patch
rrvideo 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

@Juice10 Juice10 mentioned this pull request May 1, 2024
@@ -272,6 +272,8 @@ export class MediaManager {
timeOffset: number;
mutation: mediaInteractionData;
}) {
if (!['AUDIO', 'VIDEO'].includes(target.nodeName)) return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addMediaElements already does this check so it's not hurting.
addMediaElements is only called if isSupportedMediaElement returns true, which does the very same check.
Most likely the addMediaElements could remove this line
mediaMutation is the only method besides addMediaElements that mutates mediaMap without this check so the change makes sense to me, we can reuse the isSupportedMediaElement method though.

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.

Posthog crashes seconds after I open a session recording in dashboard
2 participants