Commit b9b30c46 by Vishnu Chilakala

Do not send content complete if any midroll is skipped

parent ab4d37f4
......@@ -1122,12 +1122,17 @@ import java.util.Map;
}
private void ensureSentContentCompleteIfAtEndOfStream() {
if (!sentContentComplete
&& contentDurationMs != C.TIME_UNSET
&& pendingContentPositionMs == C.TIME_UNSET
&& getContentPeriodPositionMs(checkNotNull(player), timeline, period)
+ THRESHOLD_END_OF_CONTENT_MS
>= contentDurationMs) {
if (sentContentComplete
|| contentDurationMs == C.TIME_UNSET
|| pendingContentPositionMs != C.TIME_UNSET) {
return;
}
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();
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment