[251124] fix: Log정리-1
🕐 커밋 시간: 2025. 11. 24. 11:48:34 📊 변경 통계: • 총 파일: 1개 • 추가: +91줄 • 삭제: -71줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/actions/playActions.js 🔧 함수 변경 내용: 📄 com.twin.app.shoptime/src/actions/playActions.js (javascript): ✅ Added: dwarn(), derror() 🔄 Modified: pauseFullscreenVideo(), CLEAR_PLAYER_INFO() 🔧 주요 변경 내용: • 핵심 비즈니스 로직 개선
This commit is contained in:
@@ -6,6 +6,20 @@ import { panel_names } from '../utils/Config';
|
|||||||
import { types } from './actionTypes';
|
import { types } from './actionTypes';
|
||||||
import { popPanel, pushPanel, updatePanel } from './panelActions';
|
import { popPanel, pushPanel, updatePanel } from './panelActions';
|
||||||
|
|
||||||
|
const DEBUG_MODE = false;
|
||||||
|
|
||||||
|
const dlog = (...args) => {
|
||||||
|
if (DEBUG_MODE) console.log(...args);
|
||||||
|
};
|
||||||
|
|
||||||
|
const dwarn = (...args) => {
|
||||||
|
if (DEBUG_MODE) console.warn(...args);
|
||||||
|
};
|
||||||
|
|
||||||
|
const derror = (...args) => {
|
||||||
|
console.error(...args);
|
||||||
|
};
|
||||||
|
|
||||||
// 🔽 [251116] 새로운 비디오 상태 관리 시스템 - 재생 상태
|
// 🔽 [251116] 새로운 비디오 상태 관리 시스템 - 재생 상태
|
||||||
export const PLAYBACK_STATUS = {
|
export const PLAYBACK_STATUS = {
|
||||||
LOADING: 'loading',
|
LOADING: 'loading',
|
||||||
@@ -48,12 +62,12 @@ export const clearAllVideoTimers = () => {
|
|||||||
if (startVideoFocusTimer) {
|
if (startVideoFocusTimer) {
|
||||||
clearTimeout(startVideoFocusTimer);
|
clearTimeout(startVideoFocusTimer);
|
||||||
startVideoFocusTimer = null;
|
startVideoFocusTimer = null;
|
||||||
console.log('[playActions] startVideoFocusTimer cleared');
|
dlog('[playActions] startVideoFocusTimer cleared');
|
||||||
}
|
}
|
||||||
if (startVideoTimer) {
|
if (startVideoTimer) {
|
||||||
clearTimeout(startVideoTimer);
|
clearTimeout(startVideoTimer);
|
||||||
startVideoTimer = null;
|
startVideoTimer = null;
|
||||||
console.log('[playActions] startVideoTimer cleared');
|
dlog('[playActions] startVideoTimer cleared');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
export const startVideoPlayer =
|
export const startVideoPlayer =
|
||||||
@@ -68,7 +82,7 @@ export const startVideoPlayer =
|
|||||||
...rest
|
...rest
|
||||||
}) =>
|
}) =>
|
||||||
(dispatch, getState) => {
|
(dispatch, getState) => {
|
||||||
console.log(
|
dlog(
|
||||||
'[startVideoPlayer] ✅ START - videoId:',
|
'[startVideoPlayer] ✅ START - videoId:',
|
||||||
videoId,
|
videoId,
|
||||||
', showUrl:',
|
', showUrl:',
|
||||||
@@ -81,7 +95,7 @@ export const startVideoPlayer =
|
|||||||
const videoIdentifier = videoId || showUrl;
|
const videoIdentifier = videoId || showUrl;
|
||||||
if (videoIdentifier) {
|
if (videoIdentifier) {
|
||||||
const displayMode = modal ? DISPLAY_STATUS.VISIBLE : DISPLAY_STATUS.FULLSCREEN;
|
const displayMode = modal ? DISPLAY_STATUS.VISIBLE : DISPLAY_STATUS.FULLSCREEN;
|
||||||
console.log(
|
dlog(
|
||||||
'[startVideoPlayer] 📌 Setting playback loading - identifier:',
|
'[startVideoPlayer] 📌 Setting playback loading - identifier:',
|
||||||
videoIdentifier,
|
videoIdentifier,
|
||||||
', displayMode:',
|
', displayMode:',
|
||||||
@@ -89,7 +103,7 @@ export const startVideoPlayer =
|
|||||||
);
|
);
|
||||||
dispatch(setPlaybackLoading(videoIdentifier, displayMode));
|
dispatch(setPlaybackLoading(videoIdentifier, displayMode));
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
dlog(
|
||||||
'[startVideoPlayer] ⚠️ No videoIdentifier provided (videoId and showUrl are both missing)'
|
'[startVideoPlayer] ⚠️ No videoIdentifier provided (videoId and showUrl are both missing)'
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -99,7 +113,7 @@ export const startVideoPlayer =
|
|||||||
let panelWorkingAction = pushPanel;
|
let panelWorkingAction = pushPanel;
|
||||||
|
|
||||||
const panelName = panel_names.PLAYER_PANEL;
|
const panelName = panel_names.PLAYER_PANEL;
|
||||||
console.log(
|
dlog(
|
||||||
'[startVideoPlayer] 📊 Panel state - panelsCount:',
|
'[startVideoPlayer] 📊 Panel state - panelsCount:',
|
||||||
panels.length,
|
panels.length,
|
||||||
', topPanelName:',
|
', topPanelName:',
|
||||||
@@ -108,9 +122,9 @@ export const startVideoPlayer =
|
|||||||
|
|
||||||
if (topPanel && topPanel.name === panelName) {
|
if (topPanel && topPanel.name === panelName) {
|
||||||
panelWorkingAction = updatePanel;
|
panelWorkingAction = updatePanel;
|
||||||
console.log('[startVideoPlayer] 🔄 UPDATING existing PLAYER_PANEL');
|
dlog('[startVideoPlayer] 🔄 UPDATING existing PLAYER_PANEL');
|
||||||
} else {
|
} else {
|
||||||
console.log('[startVideoPlayer] ➕ PUSHING new PLAYER_PANEL');
|
dlog('[startVideoPlayer] ➕ PUSHING new PLAYER_PANEL');
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch(
|
dispatch(
|
||||||
@@ -129,7 +143,7 @@ export const startVideoPlayer =
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
console.log('[startVideoPlayer] ✨ Panel action dispatched');
|
dlog('[startVideoPlayer] ✨ Panel action dispatched');
|
||||||
|
|
||||||
// [COMMENTED OUT] 비디오 재생 시 강제 포커스 이동 비활성화
|
// [COMMENTED OUT] 비디오 재생 시 강제 포커스 이동 비활성화
|
||||||
// if (modal && modalContainerId && !spotlightDisable) {
|
// if (modal && modalContainerId && !spotlightDisable) {
|
||||||
@@ -143,7 +157,7 @@ export const startVideoPlayer =
|
|||||||
// console.log('[startVideoPlayer] ⏭️ Spotlight focus skipped - modal:', modal, ', modalContainerId:', !!modalContainerId, ', spotlightDisable:', spotlightDisable);
|
// console.log('[startVideoPlayer] ⏭️ Spotlight focus skipped - modal:', modal, ', modalContainerId:', !!modalContainerId, ', spotlightDisable:', spotlightDisable);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
console.log('[startVideoPlayer] ✅ END');
|
dlog('[startVideoPlayer] ✅ END');
|
||||||
};
|
};
|
||||||
|
|
||||||
// 중복 재생 방지: 정말 동일한 요청인지 확인
|
// 중복 재생 방지: 정말 동일한 요청인지 확인
|
||||||
@@ -180,7 +194,7 @@ export const startVideoPlayerNew =
|
|||||||
...rest
|
...rest
|
||||||
}) =>
|
}) =>
|
||||||
(dispatch, getState) => {
|
(dispatch, getState) => {
|
||||||
console.log(
|
dlog(
|
||||||
'[startVideoPlayerNew] *** ✅ START - bannerId:',
|
'[startVideoPlayerNew] *** ✅ START - bannerId:',
|
||||||
bannerId,
|
bannerId,
|
||||||
', videoId:',
|
', videoId:',
|
||||||
@@ -195,7 +209,7 @@ export const startVideoPlayerNew =
|
|||||||
const videoIdentifier = videoId || showUrl || bannerId;
|
const videoIdentifier = videoId || showUrl || bannerId;
|
||||||
if (videoIdentifier) {
|
if (videoIdentifier) {
|
||||||
const displayMode = modal ? DISPLAY_STATUS.VISIBLE : DISPLAY_STATUS.FULLSCREEN;
|
const displayMode = modal ? DISPLAY_STATUS.VISIBLE : DISPLAY_STATUS.FULLSCREEN;
|
||||||
console.log(
|
dlog(
|
||||||
'[startVideoPlayerNew] *** 📌 Setting playback loading - identifier:',
|
'[startVideoPlayerNew] *** 📌 Setting playback loading - identifier:',
|
||||||
videoIdentifier,
|
videoIdentifier,
|
||||||
', displayMode:',
|
', displayMode:',
|
||||||
@@ -203,7 +217,7 @@ export const startVideoPlayerNew =
|
|||||||
);
|
);
|
||||||
dispatch(setPlaybackLoading(videoIdentifier, displayMode));
|
dispatch(setPlaybackLoading(videoIdentifier, displayMode));
|
||||||
} else {
|
} else {
|
||||||
console.log('[startVideoPlayerNew] *** ⚠️ No videoIdentifier provided');
|
dlog('[startVideoPlayerNew] *** ⚠️ No videoIdentifier provided');
|
||||||
}
|
}
|
||||||
|
|
||||||
const panels = getState().panels.panels;
|
const panels = getState().panels.panels;
|
||||||
@@ -212,7 +226,7 @@ export const startVideoPlayerNew =
|
|||||||
|
|
||||||
// const panelName = useNewPlayer ? panel_names.PLAYER_PANEL_NEW : panel_names.PLAYER_PANEL;
|
// const panelName = useNewPlayer ? panel_names.PLAYER_PANEL_NEW : panel_names.PLAYER_PANEL;
|
||||||
const panelName = panel_names.PLAYER_PANEL;
|
const panelName = panel_names.PLAYER_PANEL;
|
||||||
console.log(
|
dlog(
|
||||||
'[startVideoPlayerNew] *** 📊 Panel state - panelsCount:',
|
'[startVideoPlayerNew] *** 📊 Panel state - panelsCount:',
|
||||||
panels.length,
|
panels.length,
|
||||||
', topPanelName:',
|
', topPanelName:',
|
||||||
@@ -221,10 +235,7 @@ export const startVideoPlayerNew =
|
|||||||
|
|
||||||
if (topPanel && topPanel.name === panelName) {
|
if (topPanel && topPanel.name === panelName) {
|
||||||
panelWorkingAction = updatePanel;
|
panelWorkingAction = updatePanel;
|
||||||
console.log(
|
dlog('[startVideoPlayerNew] *** 📋 Current PLAYER_PANEL panelInfo:', topPanel.panelInfo);
|
||||||
'[startVideoPlayerNew] *** 📋 Current PLAYER_PANEL panelInfo:',
|
|
||||||
topPanel.panelInfo
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 중복 실행 방지: 같은 배너 + 같은 modal 상태/컨테이너 + 같은 URL이면 skip
|
// 중복 실행 방지: 같은 배너 + 같은 modal 상태/컨테이너 + 같은 URL이면 skip
|
||||||
@@ -236,7 +247,7 @@ export const startVideoPlayerNew =
|
|||||||
const isSameShowUrl = currentPanelInfo.showUrl === showUrl;
|
const isSameShowUrl = currentPanelInfo.showUrl === showUrl;
|
||||||
const isSameVideoId = currentPanelInfo.videoId === videoId;
|
const isSameVideoId = currentPanelInfo.videoId === videoId;
|
||||||
|
|
||||||
console.log(
|
dlog(
|
||||||
'[startVideoPlayerNew] *** 🔍 Duplicate check - isSameBanner:',
|
'[startVideoPlayerNew] *** 🔍 Duplicate check - isSameBanner:',
|
||||||
isSameBanner,
|
isSameBanner,
|
||||||
', isSameModalType:',
|
', isSameModalType:',
|
||||||
@@ -250,7 +261,7 @@ export const startVideoPlayerNew =
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (isSameBanner && isSameModalType && isSameContainer && isSameShowUrl && isSameVideoId) {
|
if (isSameBanner && isSameModalType && isSameContainer && isSameShowUrl && isSameVideoId) {
|
||||||
console.log('[startVideoPlayerNew] *** ⏭️ SKIPPED - 동일한 요청', {
|
dlog('[startVideoPlayerNew] *** ⏭️ SKIPPED - 동일한 요청', {
|
||||||
bannerId,
|
bannerId,
|
||||||
modal,
|
modal,
|
||||||
modalContainerId,
|
modalContainerId,
|
||||||
@@ -264,7 +275,7 @@ export const startVideoPlayerNew =
|
|||||||
...currentPlayerState,
|
...currentPlayerState,
|
||||||
currentBannerId: bannerId,
|
currentBannerId: bannerId,
|
||||||
};
|
};
|
||||||
console.log('[startVideoPlayerNew] *** 🔄 Player state updated - currentBannerId:', bannerId);
|
dlog('[startVideoPlayerNew] *** 🔄 Player state updated - currentBannerId:', bannerId);
|
||||||
|
|
||||||
dispatch(
|
dispatch(
|
||||||
panelWorkingAction(
|
panelWorkingAction(
|
||||||
@@ -284,7 +295,7 @@ export const startVideoPlayerNew =
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
console.log(
|
dlog(
|
||||||
'[startVideoPlayerNew] *** ✨ Panel action dispatched - action:',
|
'[startVideoPlayerNew] *** ✨ Panel action dispatched - action:',
|
||||||
panelWorkingAction === updatePanel ? 'updatePanel' : 'pushPanel'
|
panelWorkingAction === updatePanel ? 'updatePanel' : 'pushPanel'
|
||||||
);
|
);
|
||||||
@@ -301,11 +312,13 @@ export const startVideoPlayerNew =
|
|||||||
// console.log('[startVideoPlayerNew] *** ⏭️ Spotlight focus skipped - modal:', modal, ', modalContainerId:', !!modalContainerId, ', spotlightDisable:', spotlightDisable);
|
// console.log('[startVideoPlayerNew] *** ⏭️ Spotlight focus skipped - modal:', modal, ', modalContainerId:', !!modalContainerId, ', spotlightDisable:', spotlightDisable);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
console.log('[startVideoPlayerNew] *** ✅ END');
|
dlog('[startVideoPlayerNew] *** ✅ END');
|
||||||
};
|
};
|
||||||
|
|
||||||
export const finishVideoPreview = () => (dispatch, getState) => {
|
export const finishVideoPreview = () => (dispatch, getState) => {
|
||||||
console.log('###-finishVideoPreview');
|
if (DEBUG_MODE === true) {
|
||||||
|
dlog('###-finishVideoPreview');
|
||||||
|
}
|
||||||
const panels = getState().panels.panels;
|
const panels = getState().panels.panels;
|
||||||
const topPanel = panels[panels.length - 1];
|
const topPanel = panels[panels.length - 1];
|
||||||
if (topPanel && topPanel.name === panel_names.PLAYER_PANEL && topPanel.panelInfo.modal) {
|
if (topPanel && topPanel.name === panel_names.PLAYER_PANEL && topPanel.panelInfo.modal) {
|
||||||
@@ -319,7 +332,9 @@ export const finishVideoPreview = () => (dispatch, getState) => {
|
|||||||
|
|
||||||
export const finishModalVideoForce = () => (dispatch, getState) => {
|
export const finishModalVideoForce = () => (dispatch, getState) => {
|
||||||
const panels = getState().panels.panels;
|
const panels = getState().panels.panels;
|
||||||
console.log('###-finishModalVideoForce');
|
if (DEBUG_MODE === true) {
|
||||||
|
dlog('###-finishModalVideoForce');
|
||||||
|
}
|
||||||
// modal PlayerPanel이 존재하는지 확인 (스택 어디에 있든)
|
// modal PlayerPanel이 존재하는지 확인 (스택 어디에 있든)
|
||||||
const hasModalPlayerPanel = panels.some(
|
const hasModalPlayerPanel = panels.some(
|
||||||
(panel) => panel.name === panel_names.PLAYER_PANEL && panel.panelInfo?.modal
|
(panel) => panel.name === panel_names.PLAYER_PANEL && panel.panelInfo?.modal
|
||||||
@@ -338,7 +353,9 @@ export const finishModalVideoForce = () => (dispatch, getState) => {
|
|||||||
// 모든 PlayerPanel을 강제 제거 (modal과 fullscreen 모두)
|
// 모든 PlayerPanel을 강제 제거 (modal과 fullscreen 모두)
|
||||||
export const finishAllVideoForce = () => (dispatch, getState) => {
|
export const finishAllVideoForce = () => (dispatch, getState) => {
|
||||||
const panels = getState().panels.panels;
|
const panels = getState().panels.panels;
|
||||||
console.log('###-finishAllVideoForce');
|
if (DEBUG_MODE === true) {
|
||||||
|
dlog('###-finishAllVideoForce');
|
||||||
|
}
|
||||||
// 모든 PlayerPanel이 존재하는지 확인 (스택 어디에 있든)
|
// 모든 PlayerPanel이 존재하는지 확인 (스택 어디에 있든)
|
||||||
const hasPlayerPanel = panels.some((panel) => panel.name === panel_names.PLAYER_PANEL);
|
const hasPlayerPanel = panels.some((panel) => panel.name === panel_names.PLAYER_PANEL);
|
||||||
|
|
||||||
@@ -355,7 +372,9 @@ export const finishAllVideoForce = () => (dispatch, getState) => {
|
|||||||
// 모달 비디오를 일시정지 (패널은 유지)
|
// 모달 비디오를 일시정지 (패널은 유지)
|
||||||
export const pauseModalVideo = () => (dispatch, getState) => {
|
export const pauseModalVideo = () => (dispatch, getState) => {
|
||||||
const panels = getState().panels.panels;
|
const panels = getState().panels.panels;
|
||||||
console.log('###-pauseModalVideo');
|
if (DEBUG_MODE === true) {
|
||||||
|
dlog('###-pauseModalVideo');
|
||||||
|
}
|
||||||
|
|
||||||
// modal PlayerPanel 찾기
|
// modal PlayerPanel 찾기
|
||||||
const modalPlayerPanel = panels.find(
|
const modalPlayerPanel = panels.find(
|
||||||
@@ -363,7 +382,9 @@ export const pauseModalVideo = () => (dispatch, getState) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (modalPlayerPanel) {
|
if (modalPlayerPanel) {
|
||||||
console.log('[pauseModalVideo] Pausing modal video');
|
if (DEBUG_MODE === true) {
|
||||||
|
dlog('[pauseModalVideo] Pausing modal video');
|
||||||
|
}
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
name: panel_names.PLAYER_PANEL,
|
name: panel_names.PLAYER_PANEL,
|
||||||
@@ -386,7 +407,9 @@ export const resumeModalVideo = () => (dispatch, getState) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (modalPlayerPanel && modalPlayerPanel.panelInfo?.isPaused) {
|
if (modalPlayerPanel && modalPlayerPanel.panelInfo?.isPaused) {
|
||||||
console.log('[resumeModalVideo] Resuming modal video');
|
if (DEBUG_MODE === true) {
|
||||||
|
dlog('[resumeModalVideo] Resuming modal video');
|
||||||
|
}
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
name: panel_names.PLAYER_PANEL,
|
name: panel_names.PLAYER_PANEL,
|
||||||
@@ -450,7 +473,9 @@ export const resumeFullscreenVideo = () => (dispatch, getState) => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
console.log('[BgVideo] resumeFullscreenVideo - Not resuming (not found or not paused)');
|
if (DEBUG_MODE === true) {
|
||||||
|
dlog('[BgVideo] resumeFullscreenVideo - Not resuming (not found or not paused)');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -502,21 +527,27 @@ export const hideModalVideo = () => (dispatch, getState) => {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
console.log('[HomePanel] hideModalVideo: No modal PlayerPanel found', {
|
if (DEBUG_MODE === true) {
|
||||||
panels: panels.map((p) => ({
|
dlog('[HomePanel] hideModalVideo: No modal PlayerPanel found', {
|
||||||
name: p.name,
|
panels: panels.map((p) => ({
|
||||||
modal: p.panelInfo?.modal,
|
name: p.name,
|
||||||
shouldShrinkTo1px: p.panelInfo?.shouldShrinkTo1px,
|
modal: p.panelInfo?.modal,
|
||||||
})),
|
shouldShrinkTo1px: p.panelInfo?.shouldShrinkTo1px,
|
||||||
});
|
})),
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 축소된 모달 비디오를 원래 크기로 복구
|
// 축소된 모달 비디오를 원래 크기로 복구
|
||||||
export const showModalVideo = () => (dispatch, getState) => {
|
export const showModalVideo = () => (dispatch, getState) => {
|
||||||
console.log('[showModalVideo] *** ✅ START');
|
if (DEBUG_MODE === true) {
|
||||||
|
dlog('[showModalVideo] *** ✅ START');
|
||||||
|
}
|
||||||
const panels = getState().panels.panels;
|
const panels = getState().panels.panels;
|
||||||
console.log('[showModalVideo] *** 📊 Total panels count:', panels.length);
|
if (DEBUG_MODE === true) {
|
||||||
|
dlog('[showModalVideo] *** 📊 Total panels count:', panels.length);
|
||||||
|
}
|
||||||
|
|
||||||
// 축소된 modal PlayerPanel 찾기
|
// 축소된 modal PlayerPanel 찾기
|
||||||
const shrunkModalPlayerPanel = panels.find(
|
const shrunkModalPlayerPanel = panels.find(
|
||||||
@@ -526,14 +557,18 @@ export const showModalVideo = () => (dispatch, getState) => {
|
|||||||
panel.panelInfo?.shouldShrinkTo1px
|
panel.panelInfo?.shouldShrinkTo1px
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log('[showModalVideo] *** 🔍 Shrunk modal PlayerPanel found:', !!shrunkModalPlayerPanel);
|
if (DEBUG_MODE === true) {
|
||||||
|
dlog('[showModalVideo] *** 🔍 Shrunk modal PlayerPanel found:', !!shrunkModalPlayerPanel);
|
||||||
|
}
|
||||||
|
|
||||||
if (shrunkModalPlayerPanel) {
|
if (shrunkModalPlayerPanel) {
|
||||||
const panelInfo = shrunkModalPlayerPanel.panelInfo;
|
const panelInfo = shrunkModalPlayerPanel.panelInfo;
|
||||||
const shrinkInfo = panelInfo.playerState?.shrinkInfo;
|
const shrinkInfo = panelInfo.playerState?.shrinkInfo;
|
||||||
|
|
||||||
console.log('[showModalVideo] *** 📋 ShrinkInfo available:', !!shrinkInfo);
|
if (DEBUG_MODE === true) {
|
||||||
console.log('[showModalVideo] *** 📋 Current panelInfo state:', {
|
dlog('[showModalVideo] *** 📋 ShrinkInfo available:', !!shrinkInfo);
|
||||||
|
}
|
||||||
|
dlog('[showModalVideo] *** 📋 Current panelInfo state:', {
|
||||||
shouldShrinkTo1px: panelInfo.shouldShrinkTo1px,
|
shouldShrinkTo1px: panelInfo.shouldShrinkTo1px,
|
||||||
modal: panelInfo.modal,
|
modal: panelInfo.modal,
|
||||||
modalContainerId: panelInfo.modalContainerId,
|
modalContainerId: panelInfo.modalContainerId,
|
||||||
@@ -553,11 +588,11 @@ export const showModalVideo = () => (dispatch, getState) => {
|
|||||||
skipModalStyleRecalculation: false, // 위치 변경 시 DOM 기준으로 다시 계산하도록 허용
|
skipModalStyleRecalculation: false, // 위치 변경 시 DOM 기준으로 다시 계산하도록 허용
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(
|
dlog(
|
||||||
'[showModalVideo] *** 🔄 Updated panelInfo - shouldShrinkTo1px:',
|
'[showModalVideo] *** 🔄 Updated panelInfo - shouldShrinkTo1px:',
|
||||||
updatedPanelInfo.shouldShrinkTo1px
|
updatedPanelInfo.shouldShrinkTo1px
|
||||||
);
|
);
|
||||||
console.log('[showModalVideo] *** 📍 Restored modalStyle:', updatedPanelInfo.modalStyle);
|
dlog('[showModalVideo] *** 📍 Restored modalStyle:', updatedPanelInfo.modalStyle);
|
||||||
|
|
||||||
dispatch(
|
dispatch(
|
||||||
updatePanel({
|
updatePanel({
|
||||||
@@ -565,9 +600,9 @@ export const showModalVideo = () => (dispatch, getState) => {
|
|||||||
panelInfo: updatedPanelInfo,
|
panelInfo: updatedPanelInfo,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
console.log('[showModalVideo] *** ✨ updatePanel dispatched');
|
dlog('[showModalVideo] *** ✨ updatePanel dispatched');
|
||||||
} else {
|
} else {
|
||||||
console.log('[showModalVideo] *** ⚠️ No shrunk modal PlayerPanel found', {
|
dlog('[showModalVideo] *** ⚠️ No shrunk modal PlayerPanel found', {
|
||||||
panels: panels.map((p) => ({
|
panels: panels.map((p) => ({
|
||||||
name: p.name,
|
name: p.name,
|
||||||
modal: p.panelInfo?.modal,
|
modal: p.panelInfo?.modal,
|
||||||
@@ -576,7 +611,7 @@ export const showModalVideo = () => (dispatch, getState) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('[showModalVideo] *** ✅ END');
|
dlog('[showModalVideo] *** ✅ END');
|
||||||
};
|
};
|
||||||
|
|
||||||
// 🔽 패널은 유지하고 비디오만 중지하는 함수들
|
// 🔽 패널은 유지하고 비디오만 중지하는 함수들
|
||||||
@@ -594,7 +629,7 @@ export const stopModalVideoWithoutClosingPanel = () => (dispatch, getState) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (modalPlayerPanel) {
|
if (modalPlayerPanel) {
|
||||||
console.log('[stopModalVideoWithoutClosingPanel] Stopping modal video playback');
|
dlog('[stopModalVideoWithoutClosingPanel] Stopping modal video playback');
|
||||||
|
|
||||||
// 타이머 정리
|
// 타이머 정리
|
||||||
if (startVideoFocusTimer) {
|
if (startVideoFocusTimer) {
|
||||||
@@ -632,7 +667,7 @@ export const stopFullscreenVideoWithoutClosingPanel = () => (dispatch, getState)
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (fullscreenPlayerPanel) {
|
if (fullscreenPlayerPanel) {
|
||||||
console.log('[stopFullscreenVideoWithoutClosingPanel] Stopping fullscreen video playback');
|
dlog('[stopFullscreenVideoWithoutClosingPanel] Stopping fullscreen video playback');
|
||||||
|
|
||||||
// 타이머 정리
|
// 타이머 정리
|
||||||
if (startVideoFocusTimer) {
|
if (startVideoFocusTimer) {
|
||||||
@@ -668,7 +703,7 @@ export const stopAllVideosWithoutClosingPanel = () => (dispatch, getState) => {
|
|||||||
const playerPanels = panels.filter((panel) => panel.name === panel_names.PLAYER_PANEL);
|
const playerPanels = panels.filter((panel) => panel.name === panel_names.PLAYER_PANEL);
|
||||||
|
|
||||||
if (playerPanels.length > 0) {
|
if (playerPanels.length > 0) {
|
||||||
console.log('[stopAllVideosWithoutClosingPanel] Stopping all video playback');
|
dlog('[stopAllVideosWithoutClosingPanel] Stopping all video playback');
|
||||||
|
|
||||||
// 타이머 정리
|
// 타이머 정리
|
||||||
if (startVideoFocusTimer) {
|
if (startVideoFocusTimer) {
|
||||||
@@ -701,7 +736,7 @@ export const getChatLog =
|
|||||||
({ patnrId, showId }) =>
|
({ patnrId, showId }) =>
|
||||||
(dispatch, getState) => {
|
(dispatch, getState) => {
|
||||||
const onSuccess = (response) => {
|
const onSuccess = (response) => {
|
||||||
console.log('getChatLog onSuccess', response.data);
|
dlog('getChatLog onSuccess', response.data);
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: types.GET_CHAT_LOG,
|
type: types.GET_CHAT_LOG,
|
||||||
@@ -710,7 +745,7 @@ export const getChatLog =
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onFail = (error) => {
|
const onFail = (error) => {
|
||||||
console.error('getChatLog onFail', error);
|
derror('getChatLog onFail', error);
|
||||||
};
|
};
|
||||||
|
|
||||||
TAxios(dispatch, getState, 'get', URLS.CHAT_LOG, { patnrId, showId }, {}, onSuccess, onFail);
|
TAxios(dispatch, getState, 'get', URLS.CHAT_LOG, { patnrId, showId }, {}, onSuccess, onFail);
|
||||||
@@ -721,7 +756,7 @@ export const getSubTitle =
|
|||||||
({ showSubtitleUrl }) =>
|
({ showSubtitleUrl }) =>
|
||||||
(dispatch, getState) => {
|
(dispatch, getState) => {
|
||||||
const onSuccess = (response) => {
|
const onSuccess = (response) => {
|
||||||
console.log('getSubTitle onSuccess', response.data);
|
dlog('getSubTitle onSuccess', response.data);
|
||||||
|
|
||||||
dispatch({
|
dispatch({
|
||||||
type: types.GET_SUBTITLE,
|
type: types.GET_SUBTITLE,
|
||||||
@@ -730,7 +765,7 @@ export const getSubTitle =
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onFail = (error) => {
|
const onFail = (error) => {
|
||||||
console.error('getSubTitle onFail', error);
|
derror('getSubTitle onFail', error);
|
||||||
dispatch({
|
dispatch({
|
||||||
type: types.GET_SUBTITLE,
|
type: types.GET_SUBTITLE,
|
||||||
payload: { url: showSubtitleUrl, data: 'Error' },
|
payload: { url: showSubtitleUrl, data: 'Error' },
|
||||||
@@ -740,7 +775,7 @@ export const getSubTitle =
|
|||||||
if (!getState().play.subTitleBlobs[showSubtitleUrl]) {
|
if (!getState().play.subTitleBlobs[showSubtitleUrl]) {
|
||||||
TAxios(dispatch, getState, 'get', URLS.SUBTITLE, { showSubtitleUrl }, {}, onSuccess, onFail);
|
TAxios(dispatch, getState, 'get', URLS.SUBTITLE, { showSubtitleUrl }, {}, onSuccess, onFail);
|
||||||
} else {
|
} else {
|
||||||
console.log("playActions getSubTitle no Nothing it's exist", showSubtitleUrl);
|
dlog("playActions getSubTitle no Nothing it's exist", showSubtitleUrl);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -766,7 +801,7 @@ export const updateVideoPlayState = (playState) => (dispatch, getState) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (hasChanges) {
|
if (hasChanges) {
|
||||||
console.log('🔄 [Redux] updateVideoPlayState action created', {
|
dlog('🔄 [PlayerPanel] updateVideoPlayState action created', {
|
||||||
...playState,
|
...playState,
|
||||||
timestamp: new Date().toISOString(),
|
timestamp: new Date().toISOString(),
|
||||||
caller: new Error().stack?.split('\n')[2]?.trim() || 'unknown',
|
caller: new Error().stack?.split('\n')[2]?.trim() || 'unknown',
|
||||||
|
|||||||
Reference in New Issue
Block a user