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
Seek to initial position in a live stream using absolute time #9122
Comments
You can save the window and position before the device falls asleep and call seekTo before prepare (like we do in our demo app). Is there a reason you need to know the timeline before calling seekTo?
No. You need to provide a timestamp relative to the start of the video. |
This feature request has come up for the second time now, so it's probably best to mark this as an enhancement. See #8218 (comment) for the proposed API. |
There is a workaround for this issue, which allows you to override the start time of an item:
The |
Let's say ExoPlayer is playing a live stream with a relatively long playlist (e.g. one hour).
The user pauses the playback and leaves it paused for long enough for the device to fall asleep.
Later the device is woken up and the playback is restarted.
What would be desirable is to restart it from the position where it was paused.
It is possible to call prepare, wait for the moment when the timeline is known and then call the seekTo.
However, this seems to inevitably leave some chance that some media will be downloaded before the seek (i.e. for a wrong playback position).
Is there any way to start live playback with the initial position specified as an absolute time (UTC) which avoids downloading media (and initialization) segments for a wrong/default position?
The text was updated successfully, but these errors were encountered: