Skip to content

Commit

Permalink
fix: start ads manager on player ready (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Ziv authored Sep 11, 2017
1 parent b0ff77c commit e951deb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ima.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,10 @@ export default class Ima extends BasePlugin {
this.logger.debug("Initial user action");
this._nextPromise = Utils.Object.defer();
this._adDisplayContainer.initialize();
this.player.ready().then(() => {
this._startAdsManager();
});
this.player.load();
this._startAdsManager();
} catch (adError) {
this.logger.error(adError);
this.destroy();
Expand Down

0 comments on commit e951deb

Please sign in to comment.