mirror of
https://github.com/samsonjs/media.git
synced 2026-04-06 11:25:46 +00:00
Ignore empty timelines in ImaAdsLoader.
We previously only checked whether the reason for the timeline change is RESET which indicates an empty timeline. Change this to an explicit check for empty timelines to also ignore empty media or intermittent timeline changes to an empty timeline which are not marked as RESET. Issue:#5831 PiperOrigin-RevId: 248499118
This commit is contained in:
parent
59b2dd2701
commit
819d589b22
1 changed files with 2 additions and 2 deletions
|
|
@ -948,8 +948,8 @@ public final class ImaAdsLoader
|
|||
@Override
|
||||
public void onTimelineChanged(
|
||||
Timeline timeline, @Nullable Object manifest, @Player.TimelineChangeReason int reason) {
|
||||
if (reason == Player.TIMELINE_CHANGE_REASON_RESET) {
|
||||
// The player is being reset and this source will be released.
|
||||
if (timeline.isEmpty()) {
|
||||
// The player is being reset or contains no media.
|
||||
return;
|
||||
}
|
||||
Assertions.checkArgument(timeline.getPeriodCount() == 1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue