mirror of
https://github.com/samsonjs/media.git
synced 2026-03-30 10:15:48 +00:00
Fix content progress reporting if there is no preroll
If there was no preroll and the pending content position was set before the first midroll, the pending content position was never cleared so loading the ad was never triggered. Only set a pending content position if we know that we need to trigger playing an ad for the current position and IMA will poll for an ad (because there is a midroll ad group). Clearing the pending content position happens when IMA pauses content to play the ad. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=185818315
This commit is contained in:
parent
344932af75
commit
0291bc5e2d
1 changed files with 2 additions and 2 deletions
|
|
@ -889,8 +889,8 @@ public final class ImaAdsLoader extends Player.DefaultEventListener implements A
|
|||
podIndexOffset = adGroupIndexForPosition - 1;
|
||||
}
|
||||
|
||||
if (hasMidrollAdGroups(adGroupTimesUs)) {
|
||||
// IMA will poll the content position, so provide the player's initial position like a seek.
|
||||
if (adGroupIndexForPosition != C.INDEX_UNSET && hasMidrollAdGroups(adGroupTimesUs)) {
|
||||
// Provide the player's initial position to trigger loading and playing the ad.
|
||||
pendingContentPositionMs = contentPositionMs;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue