Skip to content

fix: Only handle messages from the corresponding iframe - #156

Merged
luwes merged 2 commits into
muxinc:mainfrom
ronald-urbina:fix/onmessage-filter-instance-iframe
Aug 8, 2025
Merged

fix: Only handle messages from the corresponding iframe#156
luwes merged 2 commits into
muxinc:mainfrom
ronald-urbina:fix/onmessage-filter-instance-iframe

Conversation

@ronald-urbina

@ronald-urbina ronald-urbina commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

This PR improves message handling in the TikTok video component by ensuring that each instance only responds to messages emitted by its own embedded <iframe>. Solves Issues 152 Previously, all instances listened to the same global message events, causing duplicate event handling.

@vercel

vercel Bot commented Aug 6, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
media-elements-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2025 6:24pm

@luwes
luwes marked this pull request as ready for review August 7, 2025 10:28
Comment thread packages/tiktok-video-element/tiktok-video-element.js Outdated

@luwes luwes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

event handlers

@luwes luwes changed the title Only handle messages from the corresponding iframe fix: Only handle messages from the corresponding iframe Aug 7, 2025
Co-authored-by: Wesley Luyten <me@wesleyluyten.com>

@luwes luwes left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

👍

@luwes
luwes merged commit fd91832 into muxinc:main Aug 8, 2025
4 checks passed
@github-actions github-actions Bot mentioned this pull request Aug 8, 2025
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.

3 participants