mirror of
https://github.com/androidx/media.git
synced 2025-05-15 19:49:50 +08:00

The player's initial PlaylistTimeline has no ad cue points, so its first MediaPeriodId has no nextAdGroupIndex. When the AdsMediaSource provides its first timeline, the cue points become known. For the case where a preroll cue point appeared, the preroll was detected due to isAd changing on the MediaPeriodId. For the case where a midroll/postroll cue point appeared, the MediaPeriodId was actually treated as the same, which leads to keeping the unclipped original MediaPeriod. Fix this behavior by checking for nextAdGroupIndex becoming set or decreasing. PiperOrigin-RevId: 308974490
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.