这是indexloc提供的服务,不要输入任何密码
Skip to content

Reordering items after a shuffle #2891

@adambeers

Description

@adambeers

Is it possible to reorder items, via a drag and drop and then a moveMediaItem(fromIndex, toIndex) call, after shuffle mode has been set in the ExoPlayer/MediaController?

Example:

Media items index pre-shuffle: 0, 1, 2, 3
Media items index post-shuffle: 3, 1, 2, 0
Media items index post-shuffle and after moveMediaItem(2, 3): 3, 1, 0, 2

I have tried to do that sequence, but it seems to not work. I get different results that aren't super consistent. Most of the time, it seems like the order does not change after the moveMediaItem(2,3) and it keeps the previous order: 3, 1, 2, 0.

My main question is should this be a valid scenario and supported out-of-the-box, or is this something that I would have to implement somehow with an external list and such?

I have seen reference to a player.setShuffleOrder() call, but I only see it on an actual ExoPlayer and not the Player interface. I am using a MediaController, which is a Player interface, so I don't think it would work for me as is.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions