media full 영상에서 qrcode가 노출되도록 수정

This commit is contained in:
dongyoungKo
2025-04-10 11:38:26 +09:00
parent bf06829a17
commit e6fb54c33c
2 changed files with 23 additions and 11 deletions

View File

@@ -10,6 +10,7 @@ import Spottable from "@enact/spotlight/Spottable";
import playImg from "../../../../../assets/images/btn/btn-play-thumb-nor.png";
import indicatorDefaultImage from "../../../../../assets/images/img-thumb-empty-144@3x.png";
import defaultImage from "../../../../../assets/images/img-thumb-empty-560.png";
import { updatePanel } from "../../../../actions/panelActions";
import {
finishVideoPreview,
startVideoPlayer,
@@ -21,7 +22,6 @@ import useScrollTo from "../../../../hooks/useScrollTo";
import { panel_names } from "../../../../utils/Config";
import { $L, scaleW } from "../../../../utils/helperMethods";
import css from "./Indicator.module.less";
import { updatePanel } from "../../../../actions/panelActions";
const Container = SpotlightContainerDecorator(
{ enterTo: "default-element", preserveld: true },
@@ -178,6 +178,7 @@ function Indicator({
if (canPlayVideo) {
dispatch(
startVideoPlayer({
qrCurrentItem: productInfo,
showUrl: productInfo?.prdtMediaUrl,
showNm: productInfo?.prdtNm,
patnrNm: productInfo?.patncNm,

View File

@@ -1863,18 +1863,29 @@ const PlayerPanel = ({
}, [sideContentsVisible, playListInfo, panelInfo, isOnTop]);
const qrCurrentItem = useMemo(() => {
if (shopNowInfo && shopNowInfo.length > 0) {
if (panelInfo?.shptmBanrTpNm === "LIVE") {
return shopNowInfo[shopNowInfo.length - 1];
} else {
if (smallestOffsetHourIndex >= 0) {
return shopNowInfo[smallestOffsetHourIndex];
}
}
if (shopNowInfo?.length && panelInfo?.shptmBanrTpNm === "LIVE") {
return shopNowInfo[shopNowInfo.length - 1];
}
return null;
}, [shopNowInfo, smallestOffsetHourIndex, panelInfo?.shptmBanrTpNm]);
if (
shopNowInfo?.length &&
smallestOffsetHourIndex >= 0 &&
panelInfo?.shptmBanrTpNm !== "LIVE"
) {
return shopNowInfo[smallestOffsetHourIndex];
}
if (panelInfo?.shptmBanrTpNm === "MEDIA" && panelInfo?.qrCurrentItem) {
return panelInfo.qrCurrentItem;
}
return null;
}, [
shopNowInfo,
smallestOffsetHourIndex,
panelInfo?.shptmBanrTpNm,
panelInfo?.qrcodeUrl,
]);
const clearTimer = useCallback(() => {
clearTimeout(timerId.current);
timerId.current = null;