[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]);
useEffect(() => {
if (panelInfo.isUpdatedByClick) {
return;
}
if (!panelInfo.modal && !videoVerticalVisible && playListInfo) {
Spotlight.focus("player-tab-arrow");
}
}, [
panelInfo.modal,
panelInfo.isUpdatedByClick,
sideContentsVisible,
playListInfo,
videoVerticalVisible,

View File

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

View File

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

View File

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