Skip to content

Commit

Permalink
fix(FEV-1542): countdown shows 10 sec after reaching to 0 and after s…
Browse files Browse the repository at this point in the history
…eeking (#717)

### Description of the Changes

**the issue:**
countdown component shows 10 sec when it shouldn't. see below use-cases:
1. when the player is about to switch to the next media, countdown
reaches to 0 and then shows 10 before it disappears.
2. when the countdown comp is rendered (seek to almost the end of the
video so it will show for example 7 sec) and performing seeking to a
position that the comp should not be rendered (seek to somewhere in the
beginning of the video)- countdown shows 10 sec before it disappears.

**solution:**
add a validation to `shouldRender()` func -> check the value of
`timeToShow` state.

### CheckLists

- [ ] changes have been done against master branch, and PR does not
conflict
- [ ] new unit / functional tests have been added (whenever applicable)
- [ ] test are passing in local environment
- [ ] Travis tests are passing (or test results are not worse than on
master branch :))
- [ ] Docs have been updated
  • Loading branch information
lianbenjamin committed Jan 17, 2023
1 parent 822a04b commit 2bbd07b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/playlist-countdown/playlist-countdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class PlaylistCountdown extends Component {
*/
_shouldRender(props: any): boolean {
return (
this.state.timeToShow &&
props.playlist &&
props.playlist.next &&
props.playlist.next.sources &&
Expand Down

0 comments on commit 2bbd07b

Please sign in to comment.