Skip to content

Commit

Permalink
fix(FEC-7540): head-play/scroller seek is not working properly in reg…
Browse files Browse the repository at this point in the history
…ular-default mode in PC (#141)

After seekbar refactor, we forgot to pass the playerContainer to the seekbar component in the live preset.
  • Loading branch information
Dan Ziv committed Nov 28, 2017
1 parent de2b222 commit cc6a3e9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,18 @@ class SeekBarLivePlaybackContainer extends BaseComponent {
* @memberof SeekBarLivePlaybackContainer
*/
render(props: any) {
if (!props.isDvr) return undefined;
if (!props.isDvr) {
return undefined;
}
return (
<SeekBarControl
player={this.props.player}
playerElement={this.props.playerContainer}
showTimeBubble={this.props.showTimeBubble}
changeCurrentTime={time => this.player.currentTime = time}
playerPoster={this.props.poster}
updateSeekbarDraggingStatus={data => this.props.updateSeekbarDraggingStatus(data)}
updateCurrentTime={data => this.props.updateCurrentTime(data)}

isDvr={this.props.isDvr}
currentTime={this.props.currentTime}
duration={this.props.duration}
Expand Down
8 changes: 7 additions & 1 deletion src/ui-presets/live.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import OverlayPortal from '../components/overlay-portal';
import KeyboardControl from '../components/keyboard';
import LiveTag from '../components/live-tag';
import UnmuteIndication from '../components/unmute-indication';
import getComponentConfig from '../utils/component-config';

/**
* Live ui intrface
Expand All @@ -33,7 +34,12 @@ export default function liveUI(props: any): React$Element<any> {
<UnmuteIndication/>
<OverlayPlay player={props.player}/>
<BottomBar>
<SeekBarLivePlaybackContainer showFramePreview showTimeBubble player={props.player} config={props.config}/>
<SeekBarLivePlaybackContainer
showFramePreview
showTimeBubble
player={props.player}
playerContainer={props.playerContainer}
config={getComponentConfig(props.config, 'seekbar')}/>
<div className={style.leftControls}>
<PlayPauseControl player={props.player}/>
<LiveTag player={props.player}/>
Expand Down

0 comments on commit cc6a3e9

Please sign in to comment.