Skip to content

Commit 80041d7

Browse files
committed
fix(Ads): Prevent playing the same ad twice (#7585)
1 parent 9802264 commit 80041d7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/ads/interstitial_ad_manager.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -461,8 +461,7 @@ shaka.ads.InterstitialAdManager = class {
461461
this.lastTime_ - roundDecimals(interstitial.startTime);
462462
if (difference > 0 &&
463463
(difference <= 1 || !interstitial.canJump)) {
464-
if (difference > 1 && lastPlayedAd &&
465-
!lastPlayedAd.pre && !lastPlayedAd.post &&
464+
if (lastPlayedAd && !lastPlayedAd.pre && !lastPlayedAd.post &&
466465
lastPlayedAd.startTime >= interstitial.startTime) {
467466
isValid = false;
468467
} else {

0 commit comments

Comments
 (0)