[251116] feat: videoState log
🕐 커밋 시간: 2025. 11. 16. 18:53:53 📊 변경 통계: • 총 파일: 2개 • 추가: +37줄 • 삭제: -1줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/actions/playActions.js ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RandomUnit.jsx 🔧 함수 변경 내용: 📄 com.twin.app.shoptime/src/actions/playActions.js (javascript): 🔄 Modified: clearAllVideoTimers() 📄 com.twin.app.shoptime/src/views/HomePanel/HomeBanner/RandomUnit.jsx (javascript): 🔄 Modified: SpotlightContainerDecorator() 🔧 주요 변경 내용: • 핵심 비즈니스 로직 개선
This commit is contained in:
@@ -57,8 +57,24 @@ export const clearAllVideoTimers = () => {
|
||||
}
|
||||
};
|
||||
export const startVideoPlayer =
|
||||
({ modal, modalContainerId, modalClassName, spotlightDisable, useNewPlayer, ...rest }) =>
|
||||
({
|
||||
modal,
|
||||
modalContainerId,
|
||||
modalClassName,
|
||||
spotlightDisable,
|
||||
useNewPlayer,
|
||||
videoId,
|
||||
showUrl,
|
||||
...rest
|
||||
}) =>
|
||||
(dispatch, getState) => {
|
||||
// 🔽 [251116] 즉시 로딩 상태 설정
|
||||
const videoIdentifier = videoId || showUrl;
|
||||
if (videoIdentifier) {
|
||||
const displayMode = modal ? DISPLAY_STATUS.VISIBLE : DISPLAY_STATUS.FULLSCREEN;
|
||||
dispatch(setPlaybackLoading(videoIdentifier, displayMode));
|
||||
}
|
||||
|
||||
const panels = getState().panels.panels;
|
||||
const topPanel = panels[panels.length - 1];
|
||||
let panelWorkingAction = pushPanel;
|
||||
@@ -77,6 +93,8 @@ export const startVideoPlayer =
|
||||
modal,
|
||||
modalContainerId,
|
||||
modalClassName,
|
||||
videoId, // videoId 추가하여 PlayerPanel에서 사용 가능
|
||||
showUrl, // showUrl 추가하여 PlayerPanel에서 사용 가능
|
||||
...rest,
|
||||
},
|
||||
},
|
||||
@@ -120,9 +138,18 @@ export const startVideoPlayerNew =
|
||||
spotlightDisable,
|
||||
useNewPlayer,
|
||||
bannerId,
|
||||
videoId,
|
||||
showUrl,
|
||||
...rest
|
||||
}) =>
|
||||
(dispatch, getState) => {
|
||||
// 🔽 [251116] 즉시 로딩 상태 설정
|
||||
const videoIdentifier = videoId || showUrl || bannerId;
|
||||
if (videoIdentifier) {
|
||||
const displayMode = modal ? DISPLAY_STATUS.VISIBLE : DISPLAY_STATUS.FULLSCREEN;
|
||||
dispatch(setPlaybackLoading(videoIdentifier, displayMode));
|
||||
}
|
||||
|
||||
const panels = getState().panels.panels;
|
||||
const topPanel = panels[panels.length - 1];
|
||||
let panelWorkingAction = pushPanel;
|
||||
@@ -156,6 +183,9 @@ export const startVideoPlayerNew =
|
||||
modalContainerId,
|
||||
modalClassName,
|
||||
playerState: newPlayerState,
|
||||
videoId, // videoId 추가
|
||||
showUrl, // showUrl 추가
|
||||
bannerId, // bannerId 추가
|
||||
...rest,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -102,6 +102,9 @@ export default function RandomUnit({
|
||||
return playerPanel?.panelInfo;
|
||||
});
|
||||
|
||||
// 🔽 [251116] 새로운 비디오 상태 관리 시스템
|
||||
const videoPlayState = useSelector((state) => state.play.videoPlayState);
|
||||
|
||||
const handleStartVideo = useCallback(
|
||||
(videoProps) => {
|
||||
dispatch(setVideoTransitionLock(true));
|
||||
@@ -258,6 +261,18 @@ export default function RandomUnit({
|
||||
|
||||
// 포커스 인
|
||||
const onFocus = useCallback(() => {
|
||||
// 🔽 [251116] 현재 비디오 상태 로그 출력
|
||||
console.log('[RandomUnit] onFocus - 현재 비디오 상태', {
|
||||
playback: videoPlayState.playback,
|
||||
display: videoPlayState.display,
|
||||
videoId: videoPlayState.videoId,
|
||||
loadingProgress: videoPlayState.loadingProgress,
|
||||
loadingError: videoPlayState.loadingError,
|
||||
isPlaying: videoPlayState.isPlaying,
|
||||
isPaused: videoPlayState.isPaused,
|
||||
lastUpdate: videoPlayState.lastUpdate,
|
||||
});
|
||||
|
||||
console.log('[RandomUnit] onFocus called', {
|
||||
spotlightId,
|
||||
videoPlayerable,
|
||||
|
||||
Reference in New Issue
Block a user