-
Notifications
You must be signed in to change notification settings - Fork 6k
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
How to support reordering during the shuffle #9889
Comments
I would expect that setting a different shuffle order changes the timeline which triggers a queue update in the session. So if the Does it help if you call
I'm not sure whether I understand what you mean with The correct approach is setting a new |
@marcbaechinger
sorry.
I will try to call |
@marcbaechinger Results
Is the place to call |
You correctly do
It looks to me like you are hitting a bug with the masked timeline. With the above code the Looks like that we need to assign the new If this is true what I'm saying, you should receive the new shuffle order later. When the status update arrives from the playback thread. This should possibly already do the trick as a workaround:
|
@marcbaechinger
As you described, I have confirmed that onQueueChanged is called with the correct song order when I wait for the playback to continue after reorder the songs.
I try this workaround at mag0716/SamplePlayer@d0d85e5.
(The following may be inaccurate)
|
I have investigated the cause of this Issue and identified the following as the cause.
I have come up with the following two solutions to solve the above problem, and I have tried them and confirmed that the problem in this Issue will be solved. Also compare order when shuffle mode is enabled in Timeline#equals
Force
|
Just following up on this issue, are there any updates? |
Previously two timelines that differed only in shuffle order were considered equal, which resulted in no call to Player.Listener.onTimelineChanged when calling ExoPlayer.setShuffleOrder. This in turn resulted in no call to MediaControllerCompat.Callback.onQueueChanged. Also make a small fix inside ExoPlayerImpl.setShuffleOrder, to ensure that the new shuffle order is used when constructing the masked timeline. Issue: google/ExoPlayer#9889 #minor-release PiperOrigin-RevId: 457703727
Previously two timelines that differed only in shuffle order were considered equal, which resulted in no call to Player.Listener.onTimelineChanged when calling ExoPlayer.setShuffleOrder. This in turn resulted in no call to MediaControllerCompat.Callback.onQueueChanged. Also make a small fix inside ExoPlayerImpl.setShuffleOrder, to ensure that the new shuffle order is used when constructing the masked timeline. Issue: #9889 #minor-release PiperOrigin-RevId: 457703727
Fixed by the commit above. |
Previously two timelines that differed only in shuffle order were considered equal, which resulted in no call to Player.Listener.onTimelineChanged when calling ExoPlayer.setShuffleOrder. This in turn resulted in no call to MediaControllerCompat.Callback.onQueueChanged. Also make a small fix inside ExoPlayerImpl.setShuffleOrder, to ensure that the new shuffle order is used when constructing the masked timeline. Issue: #9889 #minor-release PiperOrigin-RevId: 457703727 (cherry picked from commit 5c7ec13)
Previously two timelines that differed only in shuffle order were considered equal, which resulted in no call to Player.Listener.onTimelineChanged when calling ExoPlayer.setShuffleOrder. This in turn resulted in no call to MediaControllerCompat.Callback.onQueueChanged. Also make a small fix inside ExoPlayerImpl.setShuffleOrder, to ensure that the new shuffle order is used when constructing the masked timeline. Issue: google/ExoPlayer#9889 #minor-release PiperOrigin-RevId: 457703727 (cherry picked from commit 6f9ce40)
Things I want to do
Current approach
ShuffleOrder
from the sorted resultResult
Environment
Sample Project
Question
The text was updated successfully, but these errors were encountered: