[Feature Request] Per-MediaItem default start position in playlists
@marcbaechinger is already working on this.
Since Jul 1, 2026.
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
[REQUIRED] Use case description
In a catch-up TV / continuous replay app, the player transitions to the next program when the current one ends. The next program often needs to start at a non-zero position (accurate start offset without pad-in for the overlapped tv shows).
We want to use PreloadConfiguration + player.addMediaItem() to preload the next item and get instant transitions. This works when starting at position 0, but there is no way to set a per-item start position that would be respected during auto-transitions. Timeline.Window.defaultPositionUs is always 0 for queued items.
Proposed solution
Add a defaultStartPositionMs to MediaItem that sets Timeline.Window.defaultPositionUs for that item:
val nextItem = MediaItem.Builder()
.setUri(nextShowUri)
.setDefaultStartPositionMs(bookmarkMs)
.build()
player.addMediaItem(nextItem) // preloads from bookmarkMs, plays from bookmarkMs
Unlike ClippingConfiguration.startPositionMs, this would be non-destructive — the user can still seek before that position.
Alternatives considered
ClippingConfiguration.setStartPositionMs()— Destructive: prevents seeking before the clip start.seekTo()inonMediaItemTransition— Causes audible/visible stutter; wastes preloaded data from position 0.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.