From d84ce75a03c82961fe40a4822887d43784b4edc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?A=CC=81lvaro=20Velad=20Galva=CC=81n?= Date: Wed, 13 Nov 2024 15:57:13 +0100 Subject: [PATCH] fix(Ads): Prevent play the same ad twice --- lib/ads/interstitial_ad_manager.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ads/interstitial_ad_manager.js b/lib/ads/interstitial_ad_manager.js index c99a5cec22..cc7c554b7c 100644 --- a/lib/ads/interstitial_ad_manager.js +++ b/lib/ads/interstitial_ad_manager.js @@ -464,8 +464,7 @@ shaka.ads.InterstitialAdManager = class { this.lastTime_ - roundDecimals(interstitial.startTime); if (difference > 0 && (difference <= 1 || !interstitial.canJump)) { - if (difference > 1 && lastPlayedAd && - !lastPlayedAd.pre && !lastPlayedAd.post && + if (lastPlayedAd && !lastPlayedAd.pre && !lastPlayedAd.post && lastPlayedAd.startTime >= interstitial.startTime) { isValid = false; } else {