Skip to content

Commit

Permalink
fix(FEC-10275): bumper incorrectly recognized as ad (#571)
Browse files Browse the repository at this point in the history
Issue: ima post-roll changes `adIsBumper` state to `false` once the pre-roll is loading while the bumper is playing
Solution: Update `adIsBumper` on `AD_STARTED` instead of `AD_LOADED`
  • Loading branch information
yairans committed Jan 3, 2021
1 parent 4d31f3f commit 6d35952
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/engine-connector/engine-connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,11 @@ class EngineConnector extends Component {
this.props.updateAdBreakCompleted();
});

eventManager.listen(player, player.Event.AD_STARTED, () => {
eventManager.listen(player, player.Event.AD_STARTED, e => {
this.props.updateLoadingSpinnerState(false);
this.props.updateAdIsPlaying(true);
this.props.updatePrePlayback(false);
this.props.updateAdIsBumper(e.payload.ad.bumper);
});

eventManager.listen(player, player.Event.AD_RESUMED, () => {
Expand All @@ -230,7 +231,6 @@ class EngineConnector extends Component {
eventManager.listen(player, player.Event.AD_LOADED, e => {
const ad = e.payload.ad;
this.props.updateAdIsLinear(ad.linear);
this.props.updateAdIsBumper(ad.bumper);
this.props.updateAdClickUrl(ad.clickThroughUrl);
this.props.updateAdSkipTimeOffset(ad.skipOffset);
this.props.updateAdSkippableState(ad.skippable);
Expand Down

0 comments on commit 6d35952

Please sign in to comment.