[251120] fix: PlayerPanel Return Video Playback
🕐 커밋 시간: 2025. 11. 20. 12:29:35 📊 변경 통계: • 총 파일: 5개 • 추가: +270줄 • 삭제: -97줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/actions/panelActions.js ~ com.twin.app.shoptime/src/views/DetailPanel/DetailPanel.jsx ~ com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerTabContents/TabContents/ShopNowContents.jsx 🔧 주요 변경 내용: • 핵심 비즈니스 로직 개선 • 대규모 기능 개발
This commit is contained in:
@@ -38,6 +38,7 @@ import {
|
||||
startVideoPlayer,
|
||||
pauseModalVideo,
|
||||
resumeModalVideo,
|
||||
resumeFullscreenVideo,
|
||||
} from '../../actions/playActions';
|
||||
import { resetPlayerOverlays } from '../../actions/videoPlayActions';
|
||||
import { convertUtcToLocal } from '../../components/MediaPlayer/util';
|
||||
@@ -340,21 +341,46 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
||||
// }
|
||||
// },[isOnTop, panelInfo])
|
||||
|
||||
// PlayerPanel.jsx의 라인 313-327 useEffect 수정
|
||||
// PlayerPanel.jsx의 라인 313-327 useEffect 수정 - detailPanelClosed flag 감지 추가
|
||||
useEffect(() => {
|
||||
console.log('[PlayerPanel] isOnTop useEffect:', {
|
||||
isOnTop,
|
||||
modal: panelInfo?.modal,
|
||||
isPaused: panelInfo?.isPaused,
|
||||
detailPanelClosed: panelInfo?.detailPanelClosed,
|
||||
});
|
||||
|
||||
if (panelInfo && panelInfo.modal) {
|
||||
if (!isOnTop) {
|
||||
console.log('[PlayerPanel] Not on top - pausing video');
|
||||
dispatch(pauseModalVideo());
|
||||
} else if (isOnTop && panelInfo.isPaused) {
|
||||
console.log('[PlayerPanel] Back on top - resuming video ← 이곳에서 resumeModalVideo 호출!');
|
||||
dispatch(resumeModalVideo());
|
||||
if (isOnTop) {
|
||||
// 1. Resume Video if needed (isPaused or detailPanelClosed)
|
||||
if (panelInfo.isPaused || panelInfo.detailPanelClosed) {
|
||||
if (panelInfo.modal) {
|
||||
console.log('[PlayerPanel] Back on top (Modal) - resuming video');
|
||||
dispatch(resumeModalVideo());
|
||||
} else {
|
||||
console.log('[PlayerPanel] Back on top (Fullscreen) - resuming video');
|
||||
dispatch(resumeFullscreenVideo());
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Reset detailPanelClosed flag
|
||||
if (panelInfo.detailPanelClosed) {
|
||||
console.log('[PlayerPanel] detailPanelClosed flag 초기화');
|
||||
dispatch(
|
||||
updatePanel({
|
||||
name: panel_names.PLAYER_PANEL,
|
||||
panelInfo: {
|
||||
detailPanelClosed: false,
|
||||
detailPanelClosedAt: undefined,
|
||||
detailPanelClosedFromSource: undefined,
|
||||
},
|
||||
})
|
||||
);
|
||||
}
|
||||
} else {
|
||||
// Not on top
|
||||
if (panelInfo && panelInfo.modal) {
|
||||
// console.log('[PlayerPanel] Not on top - pausing video');
|
||||
// dispatch(pauseModalVideo());
|
||||
}
|
||||
}
|
||||
}, [isOnTop, panelInfo]);
|
||||
|
||||
Reference in New Issue
Block a user