[251118] feat: playActions 함수 복구 (hideModalVideo, showModalVideo, stop 함수들)
ae0e2414를 revert 후 playActions.js의 추가 함수들만 복구 🔽 추가된 함수들: - hideModalVideo() - 모달 비디오를 1px로 축소 - showModalVideo() - 축소된 비디오를 원래 크기로 복구 - stopModalVideoWithoutClosingPanel() - 모달 비디오 중지 (패널 유지) - stopFullscreenVideoWithoutClosingPanel() - 전체화면 비디오 중지 (패널 유지) - stopAllVideosWithoutClosingPanel() - 모든 비디오 중지 (패널 유지) 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -358,7 +358,7 @@ export const resumeFullscreenVideo = () => (dispatch, getState) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 모달 비디오를 1px로 축소 (배너 정보 저장)
|
// 모달 비디오를 1px로 축소 (배너 정보 저장)
|
||||||
export const shrinkVideoTo1px = () => (dispatch, getState) => {
|
export const hideModalVideo = () => (dispatch, getState) => {
|
||||||
const panels = getState().panels.panels;
|
const panels = getState().panels.panels;
|
||||||
|
|
||||||
// modal PlayerPanel 찾기
|
// modal PlayerPanel 찾기
|
||||||
@@ -416,7 +416,7 @@ export const shrinkVideoTo1px = () => (dispatch, getState) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 축소된 모달 비디오를 원래 크기로 복구
|
// 축소된 모달 비디오를 원래 크기로 복구
|
||||||
export const expandVideoFrom1px = () => (dispatch, getState) => {
|
export const showModalVideo = () => (dispatch, getState) => {
|
||||||
const panels = getState().panels.panels;
|
const panels = getState().panels.panels;
|
||||||
|
|
||||||
// 축소된 modal PlayerPanel 찾기
|
// 축소된 modal PlayerPanel 찾기
|
||||||
@@ -469,6 +469,123 @@ export const expandVideoFrom1px = () => (dispatch, getState) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 🔽 패널은 유지하고 비디오만 중지하는 함수들
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 패널을 닫지 않고(popPanel 하지 않고) 비디오만 중지합니다.
|
||||||
|
* 모달 비디오의 재생을 중지하고 숨김 상태로 만듭니다.
|
||||||
|
*/
|
||||||
|
export const stopModalVideoWithoutClosingPanel = () => (dispatch, getState) => {
|
||||||
|
const panels = getState().panels.panels;
|
||||||
|
|
||||||
|
// modal PlayerPanel 찾기
|
||||||
|
const modalPlayerPanel = panels.find(
|
||||||
|
(panel) => panel.name === panel_names.PLAYER_PANEL && panel.panelInfo?.modal
|
||||||
|
);
|
||||||
|
|
||||||
|
if (modalPlayerPanel) {
|
||||||
|
console.log('[stopModalVideoWithoutClosingPanel] Stopping modal video playback');
|
||||||
|
|
||||||
|
// 타이머 정리
|
||||||
|
if (startVideoFocusTimer) {
|
||||||
|
clearTimeout(startVideoFocusTimer);
|
||||||
|
startVideoFocusTimer = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 패널은 유지하되, 비디오 중지 상태로 업데이트
|
||||||
|
dispatch(
|
||||||
|
updatePanel({
|
||||||
|
name: panel_names.PLAYER_PANEL,
|
||||||
|
panelInfo: {
|
||||||
|
...modalPlayerPanel.panelInfo,
|
||||||
|
shouldStop: true, // 비디오 중지 플래그
|
||||||
|
isPaused: true, // 일시정지 상태
|
||||||
|
isHidden: true, // 화면에서 숨김
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
// Redux 상태도 중지로 업데이트
|
||||||
|
dispatch(setVideoStopped());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 패널을 닫지 않고 전체화면 비디오만 중지합니다.
|
||||||
|
*/
|
||||||
|
export const stopFullscreenVideoWithoutClosingPanel = () => (dispatch, getState) => {
|
||||||
|
const panels = getState().panels.panels;
|
||||||
|
|
||||||
|
// 전체화면 PlayerPanel 찾기
|
||||||
|
const fullscreenPlayerPanel = panels.find(
|
||||||
|
(panel) => panel.name === panel_names.PLAYER_PANEL && !panel.panelInfo?.modal
|
||||||
|
);
|
||||||
|
|
||||||
|
if (fullscreenPlayerPanel) {
|
||||||
|
console.log('[stopFullscreenVideoWithoutClosingPanel] Stopping fullscreen video playback');
|
||||||
|
|
||||||
|
// 타이머 정리
|
||||||
|
if (startVideoFocusTimer) {
|
||||||
|
clearTimeout(startVideoFocusTimer);
|
||||||
|
startVideoFocusTimer = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 패널은 유지하되, 비디오 중지 상태로 업데이트
|
||||||
|
dispatch(
|
||||||
|
updatePanel({
|
||||||
|
name: panel_names.PLAYER_PANEL,
|
||||||
|
panelInfo: {
|
||||||
|
...fullscreenPlayerPanel.panelInfo,
|
||||||
|
shouldStop: true, // 비디오 중지 플래그
|
||||||
|
isPaused: true,
|
||||||
|
isHidden: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
// Redux 상태도 중지로 업데이트
|
||||||
|
dispatch(setVideoStopped());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 모든 비디오(모달+전체화면)를 패널 닫지 않고 중지합니다.
|
||||||
|
*/
|
||||||
|
export const stopAllVideosWithoutClosingPanel = () => (dispatch, getState) => {
|
||||||
|
const panels = getState().panels.panels;
|
||||||
|
|
||||||
|
// 모든 PlayerPanel 찾기
|
||||||
|
const playerPanels = panels.filter((panel) => panel.name === panel_names.PLAYER_PANEL);
|
||||||
|
|
||||||
|
if (playerPanels.length > 0) {
|
||||||
|
console.log('[stopAllVideosWithoutClosingPanel] Stopping all video playback');
|
||||||
|
|
||||||
|
// 타이머 정리
|
||||||
|
if (startVideoFocusTimer) {
|
||||||
|
clearTimeout(startVideoFocusTimer);
|
||||||
|
startVideoFocusTimer = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 모든 PlayerPanel을 중지 상태로 업데이트
|
||||||
|
playerPanels.forEach((playerPanel) => {
|
||||||
|
dispatch(
|
||||||
|
updatePanel({
|
||||||
|
name: panel_names.PLAYER_PANEL,
|
||||||
|
panelInfo: {
|
||||||
|
...playerPanel.panelInfo,
|
||||||
|
shouldStop: true,
|
||||||
|
isPaused: true,
|
||||||
|
isHidden: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
// Redux 상태도 중지로 업데이트
|
||||||
|
dispatch(setVideoStopped());
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// 채팅 로그 가져오기 IF-LGSP-371
|
// 채팅 로그 가져오기 IF-LGSP-371
|
||||||
export const getChatLog =
|
export const getChatLog =
|
||||||
({ patnrId, showId }) =>
|
({ patnrId, showId }) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user