Fix ad progress updates after rebuffering an ad

Issue: #8239

PiperOrigin-RevId: 344211877
This commit is contained in:
andrewlewis 2020-11-25 09:51:36 +00:00 committed by Ian Baker
parent 41d6c26904
commit 9bedaca0c7
2 changed files with 4 additions and 0 deletions

View file

@ -45,6 +45,9 @@
([#7832](https://github.com/google/ExoPlayer/issues/7832)).
* Fix a bug that caused multiple ads in an ad pod to be skipped when one
ad in the ad pod was skipped.
* Fix a bug that caused ad progress not to be updated if the player
resumed after buffering during an ad
([#8239](https://github.com/google/ExoPlayer/issues/8239)).
* Fix passing an ads response to the `ImaAdsLoader` builder.
* Set the overlay language based on the device locale by default.
* Cronet extension:

View file

@ -1243,6 +1243,7 @@ public final class ImaAdsLoader
private void handlePlayerStateChanged(boolean playWhenReady, @Player.State int playbackState) {
if (playingAd && imaAdState == IMA_AD_STATE_PLAYING) {
if (!bufferingAd && playbackState == Player.STATE_BUFFERING) {
bufferingAd = true;
AdMediaInfo adMediaInfo = checkNotNull(imaAdMediaInfo);
for (int i = 0; i < adCallbacks.size(); i++) {
adCallbacks.get(i).onBuffering(adMediaInfo);