mirror of
https://github.com/androidx/media.git
synced 2025-05-14 11:09:53 +08:00

We currently throw if a pending seek position was valid when the user issued it on the app thread, but can't be resolved on the playback thread because the timeline changed in the meantime. Throwing in this case seems wrong as the user could not have known about the issue (and the seek position was actually valid). Also, in other cases where the currently playing period is no longer in the new timeline, we gracefully use a subsequent period or transition to ENDED state instead of throwing. So it seems more consistent to transition to ENDED state as well. PiperOrigin-RevId: 236274862