Skip to content

Fix volume loop on casting#154

Merged
MattiasBuelens merged 4 commits into
mainfrom
bugfix/volume-loop-on-casting
May 13, 2026
Merged

Fix volume loop on casting#154
MattiasBuelens merged 4 commits into
mainfrom
bugfix/volume-loop-on-casting

Conversation

@albertonantiattheo
Copy link
Copy Markdown
Contributor

UIContainer.muted setter unconditionally writes back to player.muted on every volumechange event, creating a feedback loop when the cast receiver cannot converge on the sender's expected volume state.
This PR prevents a feedback loop during casting by guarding against redundant writes.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 12, 2026

🦋 Changeset detected

Latest commit: 722923a

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

This PR includes changesets to release 2 packages
Name Type
@theoplayer/web-ui Patch
@theoplayer/react-ui 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

@MattiasBuelens
Copy link
Copy Markdown
Collaborator

Huh, I would have thought the Web SDK already handled redundant writes on it own... 🤔 Could you raise this issue internally too?

Also, please add a changelog entry. See the bot's comment (above) for instructions. 😉

@albertonantiattheo
Copy link
Copy Markdown
Contributor Author

Changelog added. The topic is also tracked internally in a ticket.
Re why the player doesn't check it, I think it may be because it never came up...: the VJS UI calls setMuted only on user clicks, not for every volumechange, so it doesn't start a loop (IF I am reading this correctly, of course).

@MattiasBuelens
Copy link
Copy Markdown
Collaborator

Thanks! For consistency, I've also added checks in similar places where we update the player's properties. 😉

@MattiasBuelens MattiasBuelens merged commit 6217d99 into main May 13, 2026
1 check passed
@MattiasBuelens MattiasBuelens deleted the bugfix/volume-loop-on-casting branch May 13, 2026 15:39
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.

2 participants