androidx / androidx/media

Add concept of shuffled order to the Player interface (to allow setting and predicting this order when making changes)

Open
#325 7 comments 1 reaction 1 assignee View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
3k
Forks
955
Avg merge
12d 14h
Merged PRs (30d)
2

Description

Media3 Version

Media3 1.0.0

Devices that reproduce the issue

All

Devices that do not reproduce the issue

--

Reproducible in the demo app?

Yes

Reproduction steps

In https://github.com/androidx/media/issues/273#issuecomment-1472952138 Marc suggested to use controller?.currentTimeline?.getFirstWindowIndex() to get the windowIndex where playback should start.

Unfortunately, the underlying shuffledWindowIndices will be in regular sequential order after adding new items, and are only later being shuffled in ExoPlayerImpl.java#L2266.

This means that after enabling shufflePlayback and adding new items it is currently impossible to directly seek to the first item in the shuffled list (without resorting to some hack and waiting until the order is shuffled)

Expected result

Actual result

Media

Bug Report
  • You will email the zip file produced by adb bugreport to dev.exoplayer@gmail.com after filing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.