[PlayerPanel] liveChannel , featuredShows 클릭시 클릭한비디오 포커스 유지

This commit is contained in:
고동영
2024-07-10 15:05:42 +09:00
parent a89d212179
commit c3e70f3188
4 changed files with 18 additions and 0 deletions

View File

@@ -888,11 +888,15 @@ const PlayerPanel = ({
}, [isInitialFocusOccurred, panelInfo]); }, [isInitialFocusOccurred, panelInfo]);
useEffect(() => { useEffect(() => {
if (panelInfo.isUpdatedByClick) {
return;
}
if (!panelInfo.modal && !videoVerticalVisible && playListInfo) { if (!panelInfo.modal && !videoVerticalVisible && playListInfo) {
Spotlight.focus("player-tab-arrow"); Spotlight.focus("player-tab-arrow");
} }
}, [ }, [
panelInfo.modal, panelInfo.modal,
panelInfo.isUpdatedByClick,
sideContentsVisible, sideContentsVisible,
playListInfo, playListInfo,
videoVerticalVisible, videoVerticalVisible,

View File

@@ -1,11 +1,14 @@
import React, { useCallback, useEffect } from "react"; import React, { useCallback, useEffect } from "react";
import classNames from "classnames"; import classNames from "classnames";
import { useDispatch } from "react-redux";
import Spotlight from "@enact/spotlight"; import Spotlight from "@enact/spotlight";
import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator"; import SpotlightContainerDecorator from "@enact/spotlight/SpotlightContainerDecorator";
import Spottable from "@enact/spotlight/Spottable"; import Spottable from "@enact/spotlight/Spottable";
import { updatePanel } from "../../../../actions/panelActions";
import { panel_names } from "../../../../utils/Config";
import css from "./PlayerTabButton.module.less"; import css from "./PlayerTabButton.module.less";
const SpottableComponent = Spottable("button"); const SpottableComponent = Spottable("button");
@@ -18,7 +21,16 @@ export default function PlayerTabButton({
setSideContentsVisible, setSideContentsVisible,
onSpotlightLeft, onSpotlightLeft,
}) { }) {
const dispatch = useDispatch();
const handleTabOnClick = (e) => { const handleTabOnClick = (e) => {
dispatch(
updatePanel({
name: panel_names.PLAYER_PANEL,
panelInfo: {
isUpdatedByClick: false,
},
})
);
setSideContentsVisible((prev) => !prev); setSideContentsVisible((prev) => !prev);
}; };

View File

@@ -43,6 +43,7 @@ export default function FeaturedShowContents({
showId, showId,
lgCatCd, lgCatCd,
shptmBanrTpNm: "VOD", shptmBanrTpNm: "VOD",
isUpdatedByClick: true,
}, },
}) })
); );

View File

@@ -61,6 +61,7 @@ export default function LiveChannelContents({
showId, showId,
shptmBanrTpNm: "LIVE", shptmBanrTpNm: "LIVE",
lgCatCd: catCd, lgCatCd: catCd,
isUpdatedByClick: true,
}, },
}) })
); );