androidx / androidx/media

Calling Player#prepare in STATE_IDLE ignores targetLiveOffset

Open
#2,606 10 comments 0 reactions 1 assignee View on GitHub

@marcbaechinger is already working on this.

Since Jul 15, 2025.

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

Description

Version

Media3 1.6.1

More version details

Also reproducible in 1.5.x - did not test any other version though

Devices that reproduce the issue

All devices

Devices that do not reproduce the issue

No response

Reproducible in the demo app?

Yes

Reproduction steps
  1. Play a DASH Live Manifest (a real Live Stream)
  2. Create a MediaItem.LiveConfiguration.Builder() and call setTargetOffsetMs with 30_000
  3. Apply via setLiveConfiguration on MediaItem.Builder
  4. Observe live offset by polling Player#getCurrentLiveOffset
  5. Run into an error (e.g. by disconnecting the device from the internet)
  6. Re-establish connection
  7. Hit Play button in sample app (which calls Player#prepare)
  8. Observe live offset by polling Player#getCurrentLiveOffset
Expected result
  1. In Step 4, the live offset is around 30_000
  2. In Step 8, the live offset is around 8_000
Actual result
  1. In Step 4, the live offset is around 30_000
  2. In Step 8, the live offset is around 30_000 so it stays the same

In other words: The LiveConfiguration that was set when starting the player, should remain active, even after a "retry". From my observation it's still set but somehow ignored by the player.

Media

I'll sent a URI via mail that can be used in the demo app by adding it to media.exolist.json

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.