Skip to content

Commit 10659c5

Browse files
authored
fix(Ads): Prevent playing the same ad twice (#7585)
1 parent a4d0fc8 commit 10659c5

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
@@ -464,8 +464,7 @@ shaka.ads.InterstitialAdManager = class {
464464
this.lastTime_ - roundDecimals(interstitial.startTime);
465465
if (difference > 0 &&
466466
(difference <= 1 || !interstitial.canJump)) {
467-
if (difference > 1 && lastPlayedAd &&
468-
!lastPlayedAd.pre && !lastPlayedAd.post &&
467+
if (lastPlayedAd && !lastPlayedAd.pre && !lastPlayedAd.post &&
469468
lastPlayedAd.startTime >= interstitial.startTime) {
470469
isValid = false;
471470
} else {

0 commit comments

Comments
 (0)