-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(FEC-11400): live seekbar doesn't work properly - regression #622
Conversation
} | ||
}); | ||
this.props.eventManager.listen(player, player.Event.DURATION_CHANGE, () => { | ||
this.props.updateDuration(player.liveDuration - player.getStartTimeOfDvrWindow()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename to updateSeekBarDuration to avoid confusion with engine updateDuration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest opening a separate ticket to refactor the seekbar - remove duplicate handling of currentTime and duration in the seekbar reducer. Use Engine reducer for these props and add internal getter calculation which reduces the dvrstarttime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
decided not to change the names since need to change in other places and distinguish between these calls and the engine's calls
@@ -47,11 +47,24 @@ class SeekBarLivePlaybackContainer extends Component { | |||
* @memberof SeekBarLivePlaybackContainer | |||
*/ | |||
componentDidMount() { | |||
this.props.eventManager.listen(this.props.player, this.props.player.Event.TIME_UPDATE, () => { | |||
const {player} = this.props; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if already extracting props then extract all that is used (updateCurrentTime, updateDuration...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/components/seekbar/seekbar.js
Outdated
@@ -554,7 +547,7 @@ class SeekBar extends Component { | |||
*/ | |||
render(props: any, state: Object): React$Element<any> { | |||
const virtualProgressWidth = `${(props.virtualTime / props.duration) * 100}%`; | |||
const progressWidth = `${props.forceFullProgress ? 100 : (props.currentTime / props.duration) * 100}%`; | |||
const progressWidth = `${(props.currentTime / props.duration) * 100}%`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider leaving forceFullProgress as it might fix a bad experience when DVR is very small
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Description of the Changes
revert #589 and #615
make the live seekbar range between dvr start to the live duration
Solves FEC-11400
CheckLists