[251019] fix: DetailPanel -> ProductAlLSection 백그라운드 비디오 제어
🕐 커밋 시간: 2025. 10. 19. 16:37:58 📊 변경 통계: • 총 파일: 4개 • 추가: +129줄 • 삭제: -13줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/actions/playActions.js ~ com.twin.app.shoptime/src/views/DetailPanel/DetailPanel.jsx ~ com.twin.app.shoptime/src/views/DetailPanel/ProductContentSection/ProductVideo/ProductVideo.v2.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx 🔧 함수 변경 내용: 📄 com.twin.app.shoptime/src/actions/playActions.js (javascript): ✅ Added: resumeModalVideo() 🔧 주요 변경 내용: • 핵심 비즈니스 로직 개선
This commit is contained in:
@@ -139,13 +139,20 @@ export const resumeModalVideo = () => (dispatch, getState) => {
|
||||
export const pauseFullscreenVideo = () => (dispatch, getState) => {
|
||||
const panels = getState().panels.panels;
|
||||
|
||||
// console.log('[BgVideo] pauseFullscreenVideo called - panels:', {
|
||||
// panelsCount: panels?.length,
|
||||
// panels: panels?.map(p => ({ name: p.name, modal: p.panelInfo?.modal, isPaused: p.panelInfo?.isPaused }))
|
||||
// });
|
||||
|
||||
// 전체화면 PlayerPanel 찾기 (modal이 false인 패널)
|
||||
const fullscreenPlayerPanel = panels.find(
|
||||
(panel) => panel.name === panel_names.PLAYER_PANEL && !panel.panelInfo?.modal
|
||||
);
|
||||
|
||||
// console.log('[BgVideo] pauseFullscreenVideo - fullscreenPlayerPanel found:', !!fullscreenPlayerPanel);
|
||||
|
||||
if (fullscreenPlayerPanel) {
|
||||
console.log('[pauseFullscreenVideo] Pausing fullscreen video');
|
||||
// console.log('[BgVideo] pauseFullscreenVideo - dispatching updatePanel with isPaused: true');
|
||||
dispatch(
|
||||
updatePanel({
|
||||
name: panel_names.PLAYER_PANEL,
|
||||
@@ -155,6 +162,8 @@ export const pauseFullscreenVideo = () => (dispatch, getState) => {
|
||||
},
|
||||
})
|
||||
);
|
||||
} else {
|
||||
console.log('[BgVideo] pauseFullscreenVideo - No fullscreen PlayerPanel found, skipping');
|
||||
}
|
||||
};
|
||||
|
||||
@@ -162,13 +171,21 @@ export const pauseFullscreenVideo = () => (dispatch, getState) => {
|
||||
export const resumeFullscreenVideo = () => (dispatch, getState) => {
|
||||
const panels = getState().panels.panels;
|
||||
|
||||
// console.log('[BgVideo] resumeFullscreenVideo called - panels:', {
|
||||
// panelsCount: panels?.length,
|
||||
// panels: panels?.map(p => ({ name: p.name, modal: p.panelInfo?.modal, isPaused: p.panelInfo?.isPaused }))
|
||||
// });
|
||||
|
||||
// 전체화면 PlayerPanel 찾기 (modal이 false인 패널)
|
||||
const fullscreenPlayerPanel = panels.find(
|
||||
(panel) => panel.name === panel_names.PLAYER_PANEL && !panel.panelInfo?.modal
|
||||
);
|
||||
|
||||
// console.log('[BgVideo] resumeFullscreenVideo - fullscreenPlayerPanel found:', !!fullscreenPlayerPanel);
|
||||
// console.log('[BgVideo] resumeFullscreenVideo - isPaused:', fullscreenPlayerPanel?.panelInfo?.isPaused);
|
||||
|
||||
if (fullscreenPlayerPanel && fullscreenPlayerPanel.panelInfo?.isPaused) {
|
||||
console.log('[resumeFullscreenVideo] Resuming fullscreen video');
|
||||
// console.log('[BgVideo] resumeFullscreenVideo - dispatching updatePanel with isPaused: false');
|
||||
dispatch(
|
||||
updatePanel({
|
||||
name: panel_names.PLAYER_PANEL,
|
||||
@@ -178,6 +195,8 @@ export const resumeFullscreenVideo = () => (dispatch, getState) => {
|
||||
},
|
||||
})
|
||||
);
|
||||
} else {
|
||||
console.log('[BgVideo] resumeFullscreenVideo - Not resuming (not found or not paused)');
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user