[251013] feat:Video관련 action 추가

🕐 커밋 시간: 2025. 10. 13. 12:37:46

📊 변경 통계:
  • 총 파일: 7개
  • 추가: +95줄
  • 삭제: -168줄

📁 추가된 파일:
  + com.twin.app.shoptime/[251013]_RollingUnit_리렌더링_분석_및_해결방법.md

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/actions/actionTypes.js
  ~ com.twin.app.shoptime/src/actions/playActions.js
  ~ com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js
  ~ com.twin.app.shoptime/src/reducers/playReducer.js
  ~ com.twin.app.shoptime/src/views/HomePanel/HomeBanner/HomeBanner.jsx
  ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx

🔧 함수 변경 내용:
  📄 com.twin.app.shoptime/src/actions/playActions.js (javascript):
    🔄 Modified: pauseModalVideo()
  📄 com.twin.app.shoptime/src/views/HomePanel/HomeBanner/HomeBanner.jsx (javascript):
    🔄 Modified: SpotlightContainerDecorator()

🔧 주요 변경 내용:
  • 타입 시스템 안정성 강화
  • 핵심 비즈니스 로직 개선
  • UI 컴포넌트 아키텍처 개선
  • 개발 문서 및 가이드 개선

Performance: 코드 최적화로 성능 개선 기대
This commit is contained in:
2025-10-13 12:37:48 +09:00
parent 68daf689c2
commit 599796696c
7 changed files with 716 additions and 376 deletions

View File

@@ -135,6 +135,52 @@ export const resumeModalVideo = () => (dispatch, getState) => {
}
};
// 전체화면 비디오를 일시정지 (패널은 유지)
export const pauseFullscreenVideo = () => (dispatch, getState) => {
const panels = getState().panels.panels;
// 전체화면 PlayerPanel 찾기 (modal이 false인 패널)
const fullscreenPlayerPanel = panels.find(
(panel) => panel.name === panel_names.PLAYER_PANEL && !panel.panelInfo?.modal
);
if (fullscreenPlayerPanel) {
console.log('[pauseFullscreenVideo] Pausing fullscreen video');
dispatch(
updatePanel({
name: panel_names.PLAYER_PANEL,
panelInfo: {
...fullscreenPlayerPanel.panelInfo,
isPaused: true, // 일시정지 플래그 추가
},
})
);
}
};
// 전체화면 비디오를 재생 (일시정지 해제)
export const resumeFullscreenVideo = () => (dispatch, getState) => {
const panels = getState().panels.panels;
// 전체화면 PlayerPanel 찾기 (modal이 false인 패널)
const fullscreenPlayerPanel = panels.find(
(panel) => panel.name === panel_names.PLAYER_PANEL && !panel.panelInfo?.modal
);
if (fullscreenPlayerPanel && fullscreenPlayerPanel.panelInfo?.isPaused) {
console.log('[resumeFullscreenVideo] Resuming fullscreen video');
dispatch(
updatePanel({
name: panel_names.PLAYER_PANEL,
panelInfo: {
...fullscreenPlayerPanel.panelInfo,
isPaused: false, // 일시정지 해제
},
})
);
}
};
// 채팅 로그 가져오기 IF-LGSP-371
export const getChatLog =
({ patnrId, showId }) =>
@@ -187,6 +233,20 @@ export const CLEAR_PLAYER_INFO = () => ({
type: types.CLEAR_PLAYER_INFO,
});
/**
* 비디오 재생 상태를 Redux에 업데이트합니다.
* @param {Object} playState - 업데이트할 재생 상태
* @param {boolean} playState.isPlaying - 재생 중인지 여부
* @param {boolean} playState.isPaused - 일시정지 상태인지 여부
* @param {number} playState.currentTime - 현재 재생 시간(초)
* @param {number} playState.duration - 전체 비디오 길이(초)
* @param {number} playState.playbackRate - 재생 속도
*/
export const updateVideoPlayState = (playState) => ({
type: types.UPDATE_VIDEO_PLAY_STATE,
payload: playState,
});
/* 🔽 [추가] 새로운 '플레이 제어 매니저' 액션들 */
/**