
This is a candidate fix for #8906. As mentioned in that issue, negative positions within windows might be (kind of) valid in live streaming scenarios, where the window starts at some non-zero position within the period. However, negative positions within periods are definitely not valid. Neither are positions that exceed the period duration. There was already logic in ExoPlayerImplInternal to prevent a resolved seek position from exceeding the period duration. This fix adds the equivalent constraint for the start of the period. It also moves the application of the constraints into Timeline. This has the advantage that the constraints are applied as part of state masking in ExoPlayerImpl.seekTo, removing any UI flicker where the invalid seek position is temporarily visible. Issue: #8906 PiperOrigin-RevId: 395917413
ExoPlayer library
The ExoPlayer library is split into multiple modules. See ExoPlayer's top level README for more information about the available library modules and how to use them.