We're not playing an ad if the timeline is empty.
Issue: #3334 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=172447125
This commit is contained in:
parent
f6d0dae50e
commit
aa42d3c910
@ -356,17 +356,17 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
||||
|
||||
@Override
|
||||
public boolean isPlayingAd() {
|
||||
return pendingSeekAcks == 0 && playbackInfo.periodId.isAd();
|
||||
return !timeline.isEmpty() && pendingSeekAcks == 0 && playbackInfo.periodId.isAd();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCurrentAdGroupIndex() {
|
||||
return pendingSeekAcks == 0 ? playbackInfo.periodId.adGroupIndex : C.INDEX_UNSET;
|
||||
return isPlayingAd() ? playbackInfo.periodId.adGroupIndex : C.INDEX_UNSET;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCurrentAdIndexInAdGroup() {
|
||||
return pendingSeekAcks == 0 ? playbackInfo.periodId.adIndexInAdGroup : C.INDEX_UNSET;
|
||||
return isPlayingAd() ? playbackInfo.periodId.adIndexInAdGroup : C.INDEX_UNSET;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user