diff --git a/lib/ads/client_side_ad_manager.js b/lib/ads/client_side_ad_manager.js index 3ee5792268..47346951cf 100644 --- a/lib/ads/client_side_ad_manager.js +++ b/lib/ads/client_side_ad_manager.js @@ -212,9 +212,9 @@ shaka.ads.ClientSideAdManager = class { // seen the ads actually play until requestAds() is called. // Note: We listen for a play event to avoid autoplay issues that might // crash IMA. - this.video_.addEventListener('play', () => { + this.eventManager_.listenOnce(this.video_, 'play', () => { this.imaAdsManager_.start(); - }, {once: true}); + }); } catch (adError) { // If there was a problem with the VAST response, // we we won't be getting an ad. Hide ad UI if we showed it already