[PlayerPanel] overlay test
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user