androidx / androidx/media

ExoPlayer's ConcatenatingMediaSource misinteracts with seekToNext()

Open
#640 4 comments 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since Sep 7, 2023.

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

Description

Version

Media3 1.1.1

More version details

No response

Devices that reproduce the issue

Google Pixel 4a

Devices that do not reproduce the issue

None found

Reproducible in the demo app?

No

Reproduction steps
  1. Check out https://github.com/stoyicker/mwe-concatenatingmediasource/tree/0d3b27c1419f15f0d9d50e51669bc39cfad50f16
  2. Run the app
Expected result
  1. The item with the URI finishing in audio.mp4 starts playback
  2. The item with the URI finishing in tears_audio_eng.mp4 starts playback

(1 likely lasts too little to be noticeable, but at least it is reasonable to expect 2)

Actual result

Playback never starts as corroborated by log calls from the app pertaining playback state changes.

Additionally, I'd like to note that posting these lines:

setMediaSource(concatenatingMediaSource)
playWhenReady = true
prepare()

after the dispatch of the first media source addition causes the first item to be played, and then when it finishes playback of the third item starts, which gives me the impression that the seekToNext() called skipped not the currently playing item when it was received, but the next one instead. Neither this behavior nor the one from the MWE as is (with these lines before dispatching any addMediaSource calls on the ConcatenatingMediaSource) seem correct to me.

Media

All required media is already available in the linked MWE.

Bug Report
  • You will email the zip file produced by adb bugreport to android-media-github@google.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.