Skip to content

Only set listeners when there are senders connected #1104

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

Conversation

MGaetan89
Copy link
Member

Pull request

Description

This PR updates PillarboxCastReceiverPlayer to only set listeners when there are senders connected.

Changes made

Please list the specific changes made in this pull request.

Checklist

  • APIs have been properly documented (if relevant).
  • The documentation has been updated (if relevant).
  • New unit tests have been written (if relevant).
  • The demo has been updated (if relevant).

@github-project-automation github-project-automation bot moved this to 📋 Backlog in Pillarbox Jul 9, 2025
@MGaetan89 MGaetan89 linked an issue Jul 9, 2025 that may be closed by this pull request
Copy link

github-actions bot commented Jul 9, 2025

Code Coverage

Overall Project 46.55% -0.2% 🟢
Files changed 0% 🟢

Module Coverage
:pillarbox-cast-receiver 19.99% -3.72% 🟢
Files
Module File Coverage
:pillarbox-cast-receiver PillarboxCastReceiverPlayer.kt 0% -11.19% 🟢

@MGaetan89 MGaetan89 marked this pull request as ready for review July 9, 2025 14:36
@MGaetan89 MGaetan89 requested a review from StaehliJ July 9, 2025 14:36
Copy link
Contributor

@StaehliJ StaehliJ left a comment

Choose a reason for hiding this comment

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

I don't see where the benefits are. And what happens when something is already playing and then the first sender connect? I think some of the mediaStatusModifier that are done in some player events won't be update. So at least a first synchronization has to happen first when adding the listener don't you think?

@MGaetan89
Copy link
Member Author

As we discussed, it might be overengineered to try to address this right now.
We can reevaluate later if we get or notice issues with the current implementation.

@MGaetan89 MGaetan89 closed this Jul 17, 2025
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Pillarbox Jul 17, 2025
@MGaetan89 MGaetan89 deleted the 1079-poc---optimize-castreceiver-when-no-cast-session branch July 17, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

[PoC] - Optimize CastReceiver when no cast session
2 participants