[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:
2025-10-19 16:38:03 +09:00
parent cd1788ad4f
commit 5a7c296326
4 changed files with 215 additions and 160 deletions

View File

@@ -356,16 +356,28 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
// 새로운 useEffect 추가 (라인 328 이후)
useEffect(() => {
if (panelInfo?.modal && videoPlayer.current) {
if (panelInfo.isPaused) {
console.log('[PlayerPanel] Executing pause via videoPlayer.current');
// console.log('[BgVideo] PlayerPanel useEffect - panelInfo:', {
// modal: panelInfo?.modal,
// isPaused: panelInfo?.isPaused,
// hasVideoPlayer: !!videoPlayer.current
// });
// modal 여부와 관계없이 videoPlayer가 있고 isPaused 값이 명시적일 때 제어
if (videoPlayer.current && panelInfo?.isPaused !== undefined) {
if (panelInfo.isPaused === true) {
// console.log('[BgVideo] PlayerPanel - Executing pause via videoPlayer.current');
videoPlayer.current.pause();
} else if (panelInfo.isPaused === false) {
console.log('[PlayerPanel] Executing play via videoPlayer.current');
// console.log('[BgVideo] PlayerPanel - Executing play via videoPlayer.current');
videoPlayer.current.play();
}
} else {
console.log('[BgVideo] PlayerPanel - Skipping video control:', {
hasVideoPlayer: !!videoPlayer.current,
isPausedValue: panelInfo?.isPaused,
});
}
}, [panelInfo?.isPaused, panelInfo?.modal]);
}, [panelInfo?.isPaused]);
// creating live log params
useEffect(() => {