Skip to content

Commit

Permalink
fix(FEC-9423): Small view on desktop the pause icon remains on screen (
Browse files Browse the repository at this point in the history
…#449)

it'll work on ad which playing on same video tag cause we'll get the correct state of paused.
On different video tags we are getting the state of paused from the main video tag but ad is playing on second one and pause icon still showing so added state of adBreak for this situtation.
  • Loading branch information
Yuvalke committed Oct 31, 2019
1 parent 1d2dd77 commit 03e7b31
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/shell/shell.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ class Shell extends Component {
!this.props.seekbarHoverActive &&
!this.props.volumeHoverActive &&
!this.props.smartContainerOpen &&
!this.props.player.paused
(!this.props.player.paused || this.props.adBreak)
);
}

Expand Down Expand Up @@ -318,7 +318,12 @@ class Shell extends Component {
componentDidUpdate(prevProps: Object): void {
// Update the hover state if the transition was from pre playback screen
// or after an ad break
if ((!this.props.prePlayback && prevProps.prePlayback) || (!this.props.adBreak && prevProps.adBreak)) {
// or in ad break
if (
(!this.props.prePlayback && prevProps.prePlayback) ||
(!this.props.adBreak && prevProps.adBreak) ||
(this.props.adBreak && !prevProps.adBreak)
) {
this._updatePlayerHoverState();
}
}
Expand Down

0 comments on commit 03e7b31

Please sign in to comment.