Skip to content

Commit

Permalink
fix(player): hide inside player title and description
Browse files Browse the repository at this point in the history
  • Loading branch information
olga-jwp committed Jan 11, 2023
1 parent cb24ba9 commit 84dae80
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/Player/Player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ const Player: React.FC<Props> = ({
if (!window.jwplayer || !playerElementRef.current) return;

playerRef.current = window.jwplayer(playerElementRef.current) as JWPlayer;

// player options are untyped
const playerOptions: { [key: string]: unknown } = {
aspectratio: false,
Expand All @@ -165,19 +164,19 @@ const Player: React.FC<Props> = ({
height: '100%',
mute: false,
repeat: false,
displaytitle: false,
displaydescription: false,
};

// only set the autostart parameter when it is defined or it will override the player.defaults autostart setting
if (typeof autostart !== 'undefined') {
playerOptions.autostart = autostart;
}

playerRef.current.setup(playerOptions);

setPlayer(playerRef.current);
attachEvents();
};

if (playerRef.current) {
return loadPlaylist();
}
Expand Down

0 comments on commit 84dae80

Please sign in to comment.