You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[CastPlayer] AddMediaItems does nothing when there is no media items #2402
In the demo-cast replace in PlayerManager.setCurrentPlayer
// Media queue management.//currentPlayer.setMediaItems(mediaQueue, currentItemIndex, playbackPositionMs);currentPlayer.addMediaItems(mediaQueue);
currentPlayer.seekTo(playbackPositionMs);
currentPlayer.setPlayWhenReady(playWhenReady);
currentPlayer.prepare();
Expected result
When using addMediaItems with empty playlist those media items should be sent to the receiver or at least the command COMMAND_CHANGE_MEDIA_ITEMS should not be available when playlist is empty.
I'm not sure I understand this part: Are you passing an empty list to addMediaItems, or passing a non-empty list to addMediaItems when currentPlayer.getMediaItemCount() == 0?
Activity
icbaker commentedon May 7, 2025
I'm not sure I understand this part: Are you passing an empty list to
addMediaItems, or passing a non-empty list toaddMediaItemswhencurrentPlayer.getMediaItemCount() == 0?StaehliJ commentedon May 7, 2025
@icbaker your second point
Support calling addMediaItems when the Cast queue is empty
tanay187 commentedon Oct 9, 2026
@StaehliJ thanks for reporting the issue! The fix for this has been submitted and will be available in the next Media3 release.