Do not send content complete if any midroll is skipped
This commit is contained in:
parent
ab4d37f499
commit
b9b30c4669
@ -1122,12 +1122,17 @@ import java.util.Map;
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void ensureSentContentCompleteIfAtEndOfStream() {
|
private void ensureSentContentCompleteIfAtEndOfStream() {
|
||||||
if (!sentContentComplete
|
|
||||||
&& contentDurationMs != C.TIME_UNSET
|
if (sentContentComplete
|
||||||
&& pendingContentPositionMs == C.TIME_UNSET
|
|| contentDurationMs == C.TIME_UNSET
|
||||||
&& getContentPeriodPositionMs(checkNotNull(player), timeline, period)
|
|| pendingContentPositionMs != C.TIME_UNSET) {
|
||||||
+ THRESHOLD_END_OF_CONTENT_MS
|
return;
|
||||||
>= contentDurationMs) {
|
}
|
||||||
|
|
||||||
|
long contentPeriodPositionMs = getContentPeriodPositionMs(checkNotNull(player), timeline, period);
|
||||||
|
int pendingAdGroupIndex = adPlaybackState.getAdGroupIndexAfterPositionUs(contentPeriodPositionMs, contentDurationMs);
|
||||||
|
if (!adPlaybackState.getAdGroup(pendingAdGroupIndex).shouldPlayAdGroup()
|
||||||
|
&& contentPeriodPositionMs + THRESHOLD_END_OF_CONTENT_MS >= contentDurationMs) {
|
||||||
sendContentComplete();
|
sendContentComplete();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user