Skip to content

Commit

Permalink
show video play button in placeholder depends only on show button toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
hadasze committed Aug 27, 2024
1 parent e386e66 commit a5672d5
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ class VideoItemWrapper extends React.Component {
'isCurrentHover',
'customComponents',
]);

return (
<VideoItemPlaceholder
{...props}
Expand All @@ -78,8 +77,7 @@ class VideoItemWrapper extends React.Component {
isThumbnail={!!this.props.thumbnailHighlightId}
id={this.props.idx}
videoPlayButton={
showVideoPlayButton &&
!this.state.videoItemLoaded && (
showVideoPlayButton && (
<VideoPlayButton
pointerEvents={
!useTransparentPlayButtonAndForceLoadVideo(this.props)
Expand Down Expand Up @@ -111,11 +109,11 @@ class VideoItemWrapper extends React.Component {
const videoPlaceholder = this.createVideoPlaceholder(showVideoPlayButton);

const VideoItem = this.VideoItem;
const shouldRenderVideoItem =
const shouldRenderVideoPlaceholder =
!this.mightPlayVideo() ||
!this.state.videoItemLoaded ||
this.props.isPrerenderMode;
if (shouldRenderVideoItem) {
if (shouldRenderVideoPlaceholder) {
return (
<div>
{shouldCreateVideoPlaceholder(this.props.options) && videoPlaceholder}
Expand Down

0 comments on commit a5672d5

Please sign in to comment.