Skip to content

Commit 863aa07

Browse files
authored
fix(Ads): Fix interstitials when not using multiple media elements (#8681)
1 parent ff1ef7c commit 863aa07

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/ads/interstitial_ad_manager.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,8 @@ shaka.ads.InterstitialAdManager = class {
224224
}
225225
}
226226
});
227+
228+
this.configure(this.basePlayer_.getConfiguration().ads);
227229
}
228230

229231
/**
@@ -315,6 +317,7 @@ shaka.ads.InterstitialAdManager = class {
315317
*/
316318
determineIfUsingBaseVideo_() {
317319
if (!this.adContainer_ || !this.config_ || this.playingAd_) {
320+
this.usingBaseVideo_ = true;
318321
return;
319322
}
320323
let supportsMultipleMediaElements =
@@ -889,7 +892,8 @@ shaka.ads.InterstitialAdManager = class {
889892
this.determineIfUsingBaseVideo_();
890893
goog.asserts.assert(this.video_, 'Must have video');
891894

892-
if (!this.video_.parentElement && this.adContainer_) {
895+
if (!this.usingBaseVideo_ && this.adContainer_ &&
896+
!this.video_.parentElement) {
893897
this.adContainer_.appendChild(this.video_);
894898
}
895899

0 commit comments

Comments
 (0)