[PlayerPanel] overlayLoading 적용
This commit is contained in:
@@ -1086,32 +1086,51 @@ const PlayerPanel = ({
|
|||||||
}, [panelInfo, httpHeader, localRecentItems, dispatch]);
|
}, [panelInfo, httpHeader, localRecentItems, dispatch]);
|
||||||
|
|
||||||
const handleIndicatorDownClick = useCallback(() => {
|
const handleIndicatorDownClick = useCallback(() => {
|
||||||
if (!playListInfo[selectedIndex + 1].showId) return;
|
|
||||||
|
|
||||||
if (playListInfo.length - 1 === selectedIndex) {
|
if (playListInfo.length - 1 === selectedIndex) {
|
||||||
return setSelectedIndex(0);
|
setSelectedIndex(0);
|
||||||
|
dispatch(
|
||||||
|
updatePanel({
|
||||||
|
name: panel_names.PLAYER_PANEL,
|
||||||
|
panelInfo: {
|
||||||
|
patnrId: playListInfo[0].patnrId,
|
||||||
|
showId: playListInfo[0].showId,
|
||||||
|
shptmBanrTpNm: panelInfo?.shptmBanrTpNm,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
setSelectedIndex((prev) => prev + 1);
|
||||||
|
dispatch(
|
||||||
|
updatePanel({
|
||||||
|
name: panel_names.PLAYER_PANEL,
|
||||||
|
panelInfo: {
|
||||||
|
patnrId: playListInfo[selectedIndex + 1].patnrId,
|
||||||
|
showId: playListInfo[selectedIndex + 1].showId,
|
||||||
|
shptmBanrTpNm: panelInfo?.shptmBanrTpNm,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
}
|
}
|
||||||
setSelectedIndex((prev) => prev + 1);
|
|
||||||
|
|
||||||
dispatch(
|
|
||||||
updatePanel({
|
|
||||||
name: panel_names.PLAYER_PANEL,
|
|
||||||
panelInfo: {
|
|
||||||
patnrId: playListInfo[selectedIndex + 1].patnrId,
|
|
||||||
showId: playListInfo[selectedIndex + 1].showId,
|
|
||||||
shptmBanrTpNm: panelInfo?.shptmBanrTpNm,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
);
|
|
||||||
setSideContentsVisible(true);
|
setSideContentsVisible(true);
|
||||||
|
setOverlayLoading(false);
|
||||||
}, [dispatch, playListInfo, selectedIndex]);
|
}, [dispatch, playListInfo, selectedIndex]);
|
||||||
|
|
||||||
const handleIndicatorUpClick = useCallback(() => {
|
const handleIndicatorUpClick = useCallback(() => {
|
||||||
if (!playListInfo[selectedIndex - 1].showId) return;
|
if (selectedIndex === 0 && playListInfo) {
|
||||||
if (selectedIndex === 0) {
|
|
||||||
setSelectedIndex(playListInfo.length - 1);
|
setSelectedIndex(playListInfo.length - 1);
|
||||||
}
|
|
||||||
if (selectedIndex !== 0) {
|
dispatch(
|
||||||
|
updatePanel({
|
||||||
|
name: panel_names.PLAYER_PANEL,
|
||||||
|
panelInfo: {
|
||||||
|
patnrId: playListInfo[playListInfo.length - 1].patnrId,
|
||||||
|
showId: playListInfo[playListInfo.length - 1].showId,
|
||||||
|
shptmBanrTpNm: panelInfo?.shptmBanrTpNm,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
|
} else if (selectedIndex !== 0) {
|
||||||
setSelectedIndex((prev) => prev - 1);
|
setSelectedIndex((prev) => prev - 1);
|
||||||
|
|
||||||
dispatch(
|
dispatch(
|
||||||
@@ -1126,6 +1145,7 @@ const PlayerPanel = ({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
setSideContentsVisible(true);
|
setSideContentsVisible(true);
|
||||||
|
setOverlayLoading(false);
|
||||||
}, [dispatch, playListInfo, selectedIndex]);
|
}, [dispatch, playListInfo, selectedIndex]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -1274,13 +1294,15 @@ const PlayerPanel = ({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{/* Overlay Area */}
|
{/* Overlay Area */}
|
||||||
{playListInfo && playListInfo[orderPhnNoIndex]?.orderPhnNo && (
|
{playListInfo &&
|
||||||
<VideoOverlayWithPhoneNumber
|
playListInfo[orderPhnNoIndex]?.orderPhnNo &&
|
||||||
className={css.videoOverlayWithPhoneNumber}
|
overlayLoading && (
|
||||||
orderPhnNo={playListInfo[orderPhnNoIndex]?.orderPhnNo}
|
<VideoOverlayWithPhoneNumber
|
||||||
show
|
className={css.videoOverlayWithPhoneNumber}
|
||||||
/>
|
orderPhnNo={playListInfo[orderPhnNoIndex]?.orderPhnNo}
|
||||||
)}
|
show
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
{isQRCodeVisible && (
|
{isQRCodeVisible && (
|
||||||
<PlayerOverlayQRCode
|
<PlayerOverlayQRCode
|
||||||
@@ -1323,6 +1345,7 @@ const PlayerPanel = ({
|
|||||||
videoVerticalVisible={videoVerticalVisible}
|
videoVerticalVisible={videoVerticalVisible}
|
||||||
handleItemFocus={handleItemFocus}
|
handleItemFocus={handleItemFocus}
|
||||||
featuredShowsInfos={featuredShowsInfos}
|
featuredShowsInfos={featuredShowsInfos}
|
||||||
|
setOverlayLoading={setOverlayLoading}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</Container>
|
</Container>
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ export default function TabContainer({
|
|||||||
videoVerticalVisible,
|
videoVerticalVisible,
|
||||||
featuredShowsInfos,
|
featuredShowsInfos,
|
||||||
handleItemFocus,
|
handleItemFocus,
|
||||||
|
setOverlayLoading,
|
||||||
}) {
|
}) {
|
||||||
const [tab, setTab] = useState(0);
|
const [tab, setTab] = useState(0);
|
||||||
|
|
||||||
@@ -134,6 +135,7 @@ export default function TabContainer({
|
|||||||
setSelectedIndex={setSelectedIndex}
|
setSelectedIndex={setSelectedIndex}
|
||||||
videoVerticalVisible={videoVerticalVisible}
|
videoVerticalVisible={videoVerticalVisible}
|
||||||
currentVideoShowId={playListInfo[selectedIndex]?.showId}
|
currentVideoShowId={playListInfo[selectedIndex]?.showId}
|
||||||
|
setOverlayLoading={setOverlayLoading}
|
||||||
tabIndex={tab}
|
tabIndex={tab}
|
||||||
handleItemFocus={_handleItemFocus}
|
handleItemFocus={_handleItemFocus}
|
||||||
/>
|
/>
|
||||||
@@ -143,6 +145,7 @@ export default function TabContainer({
|
|||||||
selectedIndex={selectedIndex}
|
selectedIndex={selectedIndex}
|
||||||
setSelectedIndex={setSelectedIndex}
|
setSelectedIndex={setSelectedIndex}
|
||||||
videoVerticalVisible={videoVerticalVisible}
|
videoVerticalVisible={videoVerticalVisible}
|
||||||
|
setOverlayLoading={setOverlayLoading}
|
||||||
liveInfos={playListInfo}
|
liveInfos={playListInfo}
|
||||||
tabIndex={tab}
|
tabIndex={tab}
|
||||||
handleItemFocus={_handleItemFocus}
|
handleItemFocus={_handleItemFocus}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ export default function FeaturedShowContents({
|
|||||||
videoVerticalVisible,
|
videoVerticalVisible,
|
||||||
currentVideoInfo,
|
currentVideoInfo,
|
||||||
setSelectedIndex,
|
setSelectedIndex,
|
||||||
|
setOverlayLoading,
|
||||||
tabIndex,
|
tabIndex,
|
||||||
handleItemFocus,
|
handleItemFocus,
|
||||||
}) {
|
}) {
|
||||||
@@ -35,7 +36,7 @@ export default function FeaturedShowContents({
|
|||||||
const handleItemClick = useCallback(
|
const handleItemClick = useCallback(
|
||||||
(index, patnrId, showId) => () => {
|
(index, patnrId, showId) => () => {
|
||||||
setSelectedIndex(index + 1);
|
setSelectedIndex(index + 1);
|
||||||
|
setOverlayLoading(false);
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
name: panel_names.PLAYER_PANEL,
|
name: panel_names.PLAYER_PANEL,
|
||||||
|
|||||||
@@ -14,9 +14,9 @@ import css from "./LiveChannelContents.module.less";
|
|||||||
|
|
||||||
export default function LiveChannelContents({
|
export default function LiveChannelContents({
|
||||||
liveInfos,
|
liveInfos,
|
||||||
selectedIndex,
|
|
||||||
setSelectedIndex,
|
setSelectedIndex,
|
||||||
videoVerticalVisible,
|
videoVerticalVisible,
|
||||||
|
setOverlayLoading,
|
||||||
tabIndex,
|
tabIndex,
|
||||||
handleItemFocus,
|
handleItemFocus,
|
||||||
}) {
|
}) {
|
||||||
@@ -52,6 +52,7 @@ export default function LiveChannelContents({
|
|||||||
if (!showId) return;
|
if (!showId) return;
|
||||||
|
|
||||||
setSelectedIndex(index);
|
setSelectedIndex(index);
|
||||||
|
setOverlayLoading(false);
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
name: panel_names.PLAYER_PANEL,
|
name: panel_names.PLAYER_PANEL,
|
||||||
|
|||||||
Reference in New Issue
Block a user