-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
Description
Things I want to do
- The app shows currently playing items
- The app allows reordering during the shuffle
- The result of reordering during the shuffle does not affect the song order before the shuffle
Current approach
- Get currently playing items from MediaControllerCompat.Callback#onQueueChanged
- Customize TimelineQueueEditor, ShuffleOrder
- doesn't call Player#moveMediaItem when reorder during the shuffle
- generate a new
ShuffleOrder
from the sorted result - call ExoPlayer#setShuffleOrder to update the sort order
Result
- When reordering several times while shuffling, the song order may not be reflected in MediaSession
- doesn't call MediaControllerCompat.Callback#onQueueChanged
Environment
- ExoPlayer:2.16.1
- Test Device:
- Pixel 3(OS 12)
- Pixel 4(OS 11)
- Emulator(OS 10)
- Sample Project
Sample Project
Question
- Is it correct behavior that sometimes MediaControllerCompat.Callback#onQueueChanged is not executed when ExoPlayer#setShuffleOrder is called?
- Is there a better approach to support reordering during the shuffle?