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; ...@@ -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();
} }
} }
......
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