-
Notifications
You must be signed in to change notification settings - Fork 575
Description
Version
Media3 1.7.1 (same as 1.6.1)
More version details
I'm using the library androidx.media3:media3-cast:1.7.1 and noticed an issue when casting multiple media items to a Cast device.
Problem
After adding N media items to the Cast queue using either of the following:
CastPlayer.setMediaItems(...), or
RemoteMediaClient.queueLoad(...)
Inside the onStatusUpdated() callback, the call to remoteMediaClient.mediaStatus.queueItems.count() always returns 2, regardless of the actual number of items sent.
Details
On the receiver logs, all N items are correctly received. I tryed with default Cast receiver too and the result are same
The issue seems to be with the local MediaStatus object not reflecting the full queue.
Expected Behavior
The remoteMediaClient.mediaStatus.queueItems array should contain all items sent to the Cast device, accurately reflecting the full queue state.
This way, when you reach song 2, the next button in the notification is removed, because there are no more songs for the cast.
Notes
The items are successfully delivered to the receiver, as confirmed by its logs — but the Android-side status remains incorrect.
Let me know if you need a reproducible test case or more details!
Devices that reproduce the issue
Cast
device android
Devices that do not reproduce the issue
No response
Reproducible in the demo app?
Yes
Reproduction steps
After enqueueing N songs and calling requestStatus()
Expected result
the response in onStatusUpdated should contain the number of songs sent to the Cast device.
Actual result
the response in onStatusUpdated contain only 2 songs
Media
any medias mp3
Bug Report
- You will email the zip file produced by
adb bugreport
to android-media-github@google.com after filing this issue.