[PlayerPanel] thumnnailUrl 경로변경

This commit is contained in:
고동영
2024-07-02 11:26:29 +09:00
parent 2e00d17a09
commit 2e474f392e
2 changed files with 8 additions and 4 deletions

View File

@@ -2232,7 +2232,7 @@ const VideoPlayerBase = class extends React.Component {
bottomControlsVisible={this.state.mediaControlsVisible}
onClick={this.onVideoClick}
>
{!noSpinner && (this.state.loading || loading) ? (
{thumbnailUrl && !noSpinner && (this.state.loading || loading) ? (
<>
{!panelInfo.modal && (
<p className={css.thumbnail}>

View File

@@ -329,8 +329,6 @@ const PlayerPanel = ({
vdoTpNm: "Horizontal",
};
}
console.log("#panelInfo", panelInfo);
}, [
isOnTop,
liveShowInfos,
@@ -1066,6 +1064,12 @@ const PlayerPanel = ({
return selectedIndex;
}, [panelInfo?.shptmBanrTpNm, selectedIndex]);
const videoThumbnailUrl = useMemo(() => {
if (showDetailInfo && showDetailInfo.length > 0) {
return showDetailInfo[0].thumbnailUrl;
}
}, [showDetailInfo]);
const saveToLocalSettings = useCallback(() => {
if (panelInfo?.shptmBanrTpNm === "VOD") {
let recentItems = [];
@@ -1259,7 +1263,7 @@ const PlayerPanel = ({
onLoadedMetadata={mediainfoHandler}
onDurationChange={mediainfoHandler}
reactPlayerConfig={reactPlayerSubtitleConfig}
thumbnailUrl={playListInfo[selectedIndex]?.thumbnailUrl}
thumbnailUrl={videoThumbnailUrl}
videoComponent={
(typeof window === "object" && !window.PalmSystem) || isYoutube
? TReactPlayer