[PlayerPanel] overlay test

This commit is contained in:
고동영
2024-07-18 17:35:24 +09:00
parent e7151ab1d3
commit 90bee39918

View File

@@ -811,29 +811,29 @@ const PlayerPanel = ({
[showDetailInfo, setPlayListInfo]
);
useEffect(() => {
if (isOnTop && !panelInfo.modal && !videoVerticalVisible) {
let sideContentsTimer = setTimeout(() => {
setSideContentsVisible(false);
}, 10000);
// useEffect(() => {
// if (isOnTop && !panelInfo.modal && !videoVerticalVisible) {
// let sideContentsTimer = setTimeout(() => {
// setSideContentsVisible(false);
// }, 10000);
const handleAction = () => {
clearTimeout(sideContentsTimer);
sideContentsTimer = setTimeout(() => {
setSideContentsVisible(false);
}, 10000);
};
// const handleAction = () => {
// clearTimeout(sideContentsTimer);
// sideContentsTimer = setTimeout(() => {
// setSideContentsVisible(false);
// }, 10000);
// };
window.addEventListener("click", handleAction);
window.addEventListener("keydown", handleAction);
// window.addEventListener("click", handleAction);
// window.addEventListener("keydown", handleAction);
return () => {
window.removeEventListener("click", handleAction);
window.removeEventListener("keydown", handleAction);
clearTimeout(sideContentsTimer);
};
}
}, [videoVerticalVisible, panelInfo.modal, isOnTop]);
// return () => {
// window.removeEventListener("click", handleAction);
// window.removeEventListener("keydown", handleAction);
// clearTimeout(sideContentsTimer);
// };
// }
// }, [videoVerticalVisible, panelInfo.modal, isOnTop]);
useEffect(() => {
if (