[251010] feat: HomeBanner 비디오 상시재생
🕐 커밋 시간: 2025. 10. 10. 13:38:25 📊 변경 통계: • 총 파일: 6개 • 추가: +150줄 • 삭제: -16줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/actions/playActions.js ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/HomeBanner.jsx ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RandomUnit.jsx ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RandomUnit.module.less ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RollingUnit.jsx ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx 🔧 함수 변경 내용: 📄 com.twin.app.shoptime/src/actions/playActions.js (javascript): ❌ Deleted: CLEAR_PLAYER_INFO(), resumePlayerControl() 📄 com.twin.app.shoptime/src/views/HomePanel/HomeBanner/HomeBanner.jsx (javascript): 🔄 Modified: SpotlightContainerDecorator() 📄 com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RollingUnit.jsx (javascript): ✅ Added: createPanelInfo() 🔧 주요 변경 내용: • 핵심 비즈니스 로직 개선
This commit is contained in:
@@ -36,6 +36,8 @@ import {
|
||||
getChatLog,
|
||||
getSubTitle,
|
||||
startVideoPlayer,
|
||||
pauseModalVideo,
|
||||
resumeModalVideo,
|
||||
} from '../../actions/playActions';
|
||||
import { convertUtcToLocal } from '../../components/MediaPlayer/util';
|
||||
import TPanel from '../../components/TPanel/TPanel';
|
||||
@@ -308,6 +310,53 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
||||
}
|
||||
}, [panelInfo?.modal, panelInfo?.shptmBanrTpNm]);
|
||||
|
||||
// useEffect(()=>{
|
||||
// console.log('[PlayerPanel] isOnTop:', {
|
||||
// isOnTop,
|
||||
// panelInfo
|
||||
// });
|
||||
// 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');
|
||||
// dispatch(resumeModalVideo());
|
||||
// }
|
||||
// }
|
||||
// },[isOnTop, panelInfo])
|
||||
|
||||
// PlayerPanel.jsx의 라인 313-327 useEffect 수정
|
||||
useEffect(() => {
|
||||
console.log('[PlayerPanel] isOnTop:', {
|
||||
isOnTop,
|
||||
panelInfo,
|
||||
});
|
||||
|
||||
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');
|
||||
dispatch(resumeModalVideo());
|
||||
}
|
||||
}
|
||||
}, [isOnTop, panelInfo]);
|
||||
|
||||
// 새로운 useEffect 추가 (라인 328 이후)
|
||||
useEffect(() => {
|
||||
if (panelInfo?.modal && videoPlayer.current) {
|
||||
if (panelInfo.isPaused) {
|
||||
console.log('[PlayerPanel] Executing pause via videoPlayer.current');
|
||||
videoPlayer.current.pause();
|
||||
} else if (panelInfo.isPaused === false) {
|
||||
console.log('[PlayerPanel] Executing play via videoPlayer.current');
|
||||
videoPlayer.current.play();
|
||||
}
|
||||
}
|
||||
}, [panelInfo?.isPaused, panelInfo?.modal]);
|
||||
|
||||
// creating live log params
|
||||
useEffect(() => {
|
||||
if (currentLiveShowInfo && Object.keys(currentLiveShowInfo).length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user