-
Notifications
You must be signed in to change notification settings - Fork 389
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
Output switcher appears broken after switching to CastPlayer #1056
Comments
Ultimately, the behavior you observe is caused by MediaSession being configured as remote with invalid (or absent) remote device information (hence the "Other Device" text). Such device info is populated:
I believe media3 takes care of this plumbing for you, via onDeviceInfoChanged using the device info of each player (see here for instance). You probably want a reply from @marcbaechinger, but at least this should give you an idea on how to debug if you are in a hurry. He won't reply before Monday. |
@AquilesCanta Thanks. While debugging and starting a casting session I see Also your link to the |
Yeah, I think you are both right. AFAICT the required calls on the framework session are issued correctly in Given it's really only the missing controller ID and if the Cast SDK offers an API to to get the routing controller ID for instance on @NielsMasdorp If you integrate with your app to support remote-to-local and local-to-remote and you already have the controller ID we could probably add a We need to investigate how to improve routing support with a Media3 session and/or with |
@marcbaechinger I'm not sure I follow. How would I know the Also that leaves the issue of the output switcher not working after switching back to local playback as well, that does work before the first casting session is started. |
@AquilesCanta I agree with your assessment. It seems like the first issue is a bug, but I am not sure the bug is on my end. So let's try to tackle that one first. It seems to be working in uamp demo, but uamp demo also shows 2 media notifications when a remote casting session is active. and Im using the same option provider:
So there should be only one media session at all times. I've attached a screen recording of the current behaviour while switching to remote and back to local. https://photos.app.goo.gl/E5UJ5WjRG1Noe2Vz6 Findings:
Is this anything to go by? I am kind of stumped at the moment why this is happening and not with uamp. For reference my relevant classes are here: https://github.com/NielsMasdorp/Nederadio-Android/tree/master/app/src/main/java/com/nielsmasdorp/nederadio/playback |
I'm currently endeavoring to get the output switcher working properly in my app and seeing the same issues (and more; hopefully those are on my end) though since Media3 doesn't cover my use cases, I'm doing a lot more manually. I thought it might be interesting to point out that I'm seeing the Other Device grayed out chip on YouTube's cast sessions as well (Fully updated Pixel 8 Pro). I figured YouTube would be the premiere consumer experience to measure against for the new output switcher capabilities, but it doesn't seem to have them enabled, it doesn't expose any cast devices within the output switcher. Perhaps YT team is hitting similar issues. |
@AquilesCanta seems something went wrong with assigning this issue.. |
This enables linking the media session to a routing session. Issue: #1056 PiperOrigin-RevId: 671425490
So, I am using media3 version 1.2.1 and have a
ForwardingPlayer
like the UAMP demo app.When I start local playback this is my media notification:
When I use the output switcher in the top right corner of the notification or use the casting button inside my app and switch to a casting device the output switcher breaks and shows "Other device".
This does not change when I switch back to local playback, so the output switcher remains in a non working state.
I am using the same
MediaSession
when casting, like UAMP does viasetMediaSessionEnabled(false)
in theCastOptionsProvider
.What would be the cause of this? For reference, you can find my implementation here: https://github.com/NielsMasdorp/Nederadio-Android/tree/master/app/src/main/java/com/nielsmasdorp/nederadio/playback
Thank you,
The text was updated successfully, but these errors were encountered: