Skip to content

Commit

Permalink
fix(FEC-8177): playback UI isn't displayed on fatal ad error when cha…
Browse files Browse the repository at this point in the history
…nging media (#235)

Add AD_ERROR listener in the engine-connector component and in case the error is fatal update the ad break state.
  • Loading branch information
Dan Ziv authored and yairans committed May 1, 2018
1 parent 5a17878 commit 2cc13ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/engine-connector/engine-connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,12 @@ class EngineConnector extends BaseComponent {
this.props.updateAdIsPlaying(false);
});

this.player.addEventListener(this.player.Event.AD_ERROR, e => {
if (e.payload.fatal) {
this.props.updateAdBreak(false);
}
});

this.player.addEventListener(this.player.Event.AD_LOADED, e => {
this.props.updateAdClickUrl(e.payload.ad.g.clickThroughUrl);
this.props.updateAdSkipTimeOffset(e.payload.ad.getSkipTimeOffset());
Expand Down

0 comments on commit 2cc13ea

Please sign in to comment.