Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add media item with start position #895

Closed
sampengilly opened this issue Dec 14, 2023 · 1 comment
Closed

Add media item with start position #895

sampengilly opened this issue Dec 14, 2023 · 1 comment
Assignees

Comments

@sampengilly
Copy link

Use case description

A podcasting app, where listening position is remembered on individual episodes. If the user starts playback of an episode we queue up other episodes in the same program, if one of those episodes in the queue has been listened part way through, we should resume from that point when that episode is reached.

Proposed solution

There's already an overload of Player::setMediaItems which takes a startPositionMs to apply to the first item in the list of media items. Would it be possible to associate a startPositionMs with the other items in the list, or to have an overload of addMediaItem which takes a startPositionMs? In our implementation we're already remembering the listening progress, we just need to command the player to resume from that point.

Alternatives considered

The workaround I see would be to attach a listener to the player which intercepts onMediaItemTransition events, performs a lookup for the tracked progress and calls seekTo.

@icbaker
Copy link
Collaborator

icbaker commented Jan 9, 2024

This looks like a duplicate of google/ExoPlayer#6373

@icbaker icbaker closed this as not planned Won't fix, can't repro, duplicate, stale Jan 9, 2024
@androidx androidx locked and limited conversation to collaborators Mar 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants