[PlayerPanel] liveChannel , featuredShows 클릭시 클릭한비디오 포커스 유지
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
@@ -43,6 +43,7 @@ export default function FeaturedShowContents({
|
||||
showId,
|
||||
lgCatCd,
|
||||
shptmBanrTpNm: "VOD",
|
||||
isUpdatedByClick: true,
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
@@ -61,6 +61,7 @@ export default function LiveChannelContents({
|
||||
showId,
|
||||
shptmBanrTpNm: "LIVE",
|
||||
lgCatCd: catCd,
|
||||
isUpdatedByClick: true,
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user