We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5bb585 commit ace6cb7Copy full SHA for ace6cb7
lib/ads/interstitial_ad_manager.js
@@ -329,6 +329,18 @@ shaka.ads.InterstitialAdManager = class {
329
this.interstitialIds_.clear();
330
this.interstitials_.clear();
331
this.player_.destroyAllPreloads();
332
+ if (this.preloadManagerInterstitials_.size) {
333
+ const values = Array.from(this.preloadManagerInterstitials_.values());
334
+ for (const value of values) {
335
+ if (value) {
336
+ value.then((preloadManager) => {
337
+ if (preloadManager) {
338
+ preloadManager.destroy();
339
+ }
340
+ });
341
342
+ };
343
344
this.preloadManagerInterstitials_.clear();
345
this.player_.detach();
346
this.playingAd_ = false;
0 commit comments