Skip to content

Commit

Permalink
fix(FEC-11057): ima postroll doesn't play when imadai configured befo…
Browse files Browse the repository at this point in the history
…re (#424)

Issue: DAI and IMA exist so it selects the first plugin, ima dai for example, and then it won't play the post-roll.
Solution: get the Ads controller that is not in DONE state.
  • Loading branch information
Yuvalke committed Mar 9, 2021
1 parent 24a2b57 commit a838ea5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/controllers/ads-controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ class AdsController extends FakeEventTarget implements IAdsController {
return;
}
const bumperCtrl = this._adsPluginControllers.find(controller => this._isBumper(controller));
const adCtrl = this._adsPluginControllers.find(controller => !this._isBumper(controller));
const adCtrl = this._adsPluginControllers.find(controller => !this._isBumper(controller) && !controller.done);
const bumperCompleted =
bumperCtrl && typeof bumperCtrl.onPlaybackEnded === 'function' ? () => bumperCtrl.onPlaybackEnded() : () => Promise.resolve();
const adCompleted = adCtrl && typeof adCtrl.onPlaybackEnded === 'function' ? () => adCtrl.onPlaybackEnded() : () => Promise.resolve();
Expand Down

0 comments on commit a838ea5

Please sign in to comment.