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
Unsure. Is there a part of the demo where you have a fully manipulable queue?
Reproduction steps
Occurs at any queue move in a shuffled playlist that does not happen to result in the indended shuffled playlist (It's hard to define the specific criteria, sorry). For example, this pseudo-kotlin code:
player.shuffleModeEnabled =true
player.setMediaItems(listOf(dummy1, dummy2, dummy3)) // Assume these are initialized MediaItems
player.moveMediaItems(0, 2)
Expected result
Assume that the shuffled playlist is: [dummy1, dummy3, dummy2] (i.e shuffled index list of [0, 2, 1]), and the ordered playlist [dummy1, dummy2, dummy3].
Moving the media items as specified in the reproduction steps should as a result:
Move the ordered playlist, resulting in [dummy3, dummy2, dummy1].
Reindex the shuffle order, resulting in a shuffled index list of [2, 0, 1].
Move the items in the shuffle order, resulting in a shuffled index list of [1, 0, 2] and a shuffled playlist of [dummy2, dummy3, dummy1]
In practice, this should involve another ShuffleOrder override, something like cloneAndMove, that performs this reindexing and item moving.
Actual result
The ShuffleOrder is not even cloned when MediaItems are moved judging by ExoPlayerImpl. Instead, what happens is:
Move the ordered playlist, resulting in [dummy3, dummy2, dummy1].
Do not reindex the shuffle order, resulting in still a shuffled index list of [0, 2, 1]
Do not move anything in the shuffle order, resulting in a shuffled index list of [0, 2, 1] and a shuffled playlist of [dummy3, dummy1, dummy2]. This is entirely incorrect.
OxygenCobalt
changed the title
[ShuffleOrder] ExoPlayer.moveMediaItems does not update the shuffle order
ExoPlayer.moveMediaItems does not update the shuffle order
Jan 9, 2024
Update: I was mis-interpreting an issue on my end as a library issue. I wasn't correctly using moveMediaItems to obtain the "swapping" behavior I was looking for. The shuffle order seems to behave normally when I do that.
Version
Media3 1.2.0
More version details
No response
Devices that reproduce the issue
All
Devices that do not reproduce the issue
N/A
Reproducible in the demo app?
Unsure. Is there a part of the demo where you have a fully manipulable queue?
Reproduction steps
Occurs at any queue move in a shuffled playlist that does not happen to result in the indended shuffled playlist (It's hard to define the specific criteria, sorry). For example, this pseudo-kotlin code:
Expected result
Assume that the shuffled playlist is:
[dummy1, dummy3, dummy2]
(i.e shuffled index list of[0, 2, 1]
), and the ordered playlist[dummy1, dummy2, dummy3]
.Moving the media items as specified in the reproduction steps should as a result:
[dummy3, dummy2, dummy1]
.[2, 0, 1]
.[1, 0, 2]
and a shuffled playlist of[dummy2, dummy3, dummy1]
In practice, this should involve another
ShuffleOrder
override, something likecloneAndMove
, that performs this reindexing and item moving.Actual result
The ShuffleOrder is not even cloned when MediaItems are moved judging by ExoPlayerImpl. Instead, what happens is:
[dummy3, dummy2, dummy1]
.[0, 2, 1]
[0, 2, 1]
and a shuffled playlist of[dummy3, dummy1, dummy2]
. This is entirely incorrect.Media
N/A
Bug Report
adb bugreport
to android-media-github@google.com after filing this issue.The text was updated successfully, but these errors were encountered: