Skip to content

Commit

Permalink
Revert "Ensure the correct video player is loaded (#1262)" (#1263)
Browse files Browse the repository at this point in the history
This reverts commit 841a788.
  • Loading branch information
noam-heller1 authored Jul 25, 2024
1 parent 3d36562 commit 06427b4
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions packages/gallery/src/components/item/videos/videoItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,8 @@ class VideoItem extends React.Component {
}

playVideoIfNeeded(props = this.props) {
const { playingVideoIdx } = props;
const { reactPlayerLoaded, vimeoPlayerLoaded, hlsPlayerLoaded } =
this.state;

try {
//ensure the necessary player is loaded
if (
(this.isHLSVideo() && !hlsPlayerLoaded) ||
(this.props.videoUrl &&
this.props.videoUrl.includes('vimeo.com') &&
!vimeoPlayerLoaded) ||
!reactPlayerLoaded
) {
return;
}

const { playingVideoIdx } = props;
if (playingVideoIdx === this.props.idx && !this.isPlaying) {
this.videoElement =
this.videoElement ||
Expand Down

0 comments on commit 06427b4

Please sign in to comment.