Skip to content

Commit

Permalink
fix(FEC-12154): Playlist - Active Prev and Next buttons have no toolt…
Browse files Browse the repository at this point in the history
…ip when player width <= 480px

Always show tooltip on overlay playback controls instead of showing preview
  • Loading branch information
SivanA-Kaltura committed Apr 11, 2022
1 parent 9f1ec16 commit fb1a4c1
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 11 deletions.
4 changes: 0 additions & 4 deletions src/components/playback-controls/_playback-controls.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@
width: 64px;
height: 64px;
}

.poster-preview {
opacity: 0;
}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/playback-controls/playback-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ class PlaybackControls extends Component {
<PlayerArea name={name} shouldUpdate={shouldUpdate}>
{props.playlist ? (
<Fragment>
<PlaylistButton type="prev" />
<PlaylistButton type="prev" showPreview={props.showPreview} />
<PlayPause />
<PlaylistButton type="next" />
<PlaylistButton type="next" showPreview={props.showPreview} />
</Fragment>
) : (
<PlayPause />
Expand Down
2 changes: 1 addition & 1 deletion src/components/playlist-button/playlist-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PlaylistButton extends Component {
*/
render(props: any): React$Element<any> | void {
const item = props.playlist[props.type];
return <PrevNext type={props.type} item={item} onClick={this.onClick.bind(this)} />;
return <PrevNext type={props.type} item={item} onClick={this.onClick.bind(this)} showPreview={props.showPreview} />;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/playlist-button/prev-next.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PrevNext extends Component {

return (
<div className={[style.controlButtonContainer, style.controlPlaylistButton].join(' ')}>
{previewImage || previewText ? (
{props.showPreview && (previewImage || previewText) ? (
<Fragment>
<div className={style.posterPreview}>
<div className={style.posterPreviewText}>
Expand Down
2 changes: 1 addition & 1 deletion src/ui-presets/ads.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function AdsUI(props: any, context: any): ?React$Element<any> {
<BottomBar
leftControls={
<Fragment>
<PlaybackControls name={'BottomBarPlaybackControls'} />
<PlaybackControls name={'BottomBarPlaybackControls'} showPreview={true} />
<TimeDisplayAdsContainer />
</Fragment>
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui-presets/live.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class LiveUI extends Component {
<BottomBar
leftControls={
<Fragment>
<PlaybackControls name={'BottomBarPlaybackControls'} />
<PlaybackControls name={'BottomBarPlaybackControls'} showPreview={true} />
<Rewind step={10} />
<Forward step={10} />
<LiveTag />
Expand Down
2 changes: 1 addition & 1 deletion src/ui-presets/playback.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class PlaybackUI extends Component {
<BottomBar
leftControls={
<Fragment>
<PlaybackControls name={'BottomBarPlaybackControls'} />
<PlaybackControls name={'BottomBarPlaybackControls'} showPreview={true} />
<Rewind step={10} />
<Forward step={10} />
<TimeDisplayPlaybackContainer format="current / total" />
Expand Down

0 comments on commit fb1a4c1

Please sign in to comment.