Skip to content

Commit

Permalink
fix(Ads): Fix usage of EventManager on CS (#5084)
Browse files Browse the repository at this point in the history
  • Loading branch information
avelad authored and joeyparrish committed Apr 26, 2023
1 parent a5a4d3e commit 259f0f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ads/client_side_ad_manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,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
Expand Down

0 comments on commit 259f0f7

Please sign in to comment.