[251116] feat: PlayerPanel FullScreen

🕐 커밋 시간: 2025. 11. 16. 21:32:12

📊 변경 통계:
  • 총 파일: 5개
  • 추가: +81줄
  • 삭제: -20줄

📝 수정된 파일:
  ~ com.twin.app.shoptime/src/actions/playActions.js
  ~ com.twin.app.shoptime/src/hooks/useVideoPlay/useVideoPlay.js
  ~ com.twin.app.shoptime/src/middleware/panelHistoryMiddleware.js
  ~ com.twin.app.shoptime/src/views/HomePanel/HomePanel.jsx
  ~ com.twin.app.shoptime/src/views/MainView/MainView.jsx

🔧 함수 변경 내용:
  📄 com.twin.app.shoptime/src/actions/playActions.js (javascript):
    🔄 Modified: resumeFullscreenVideo()

🔧 주요 변경 내용:
  • 핵심 비즈니스 로직 개선
This commit is contained in:
2025-11-16 21:32:12 +09:00
parent da1a050a10
commit a18c61380c
5 changed files with 197 additions and 57 deletions

View File

@@ -599,6 +599,13 @@ const HomePanel = ({ isOnTop }) => {
if (isInitialRender.current) {
isInitialRender.current = false;
// ✅ 마운트 시 banner0 자동 재생 설정
console.log('[HomePanel] 마운트 - banner0 재생 시도', videoPlay);
videoPlayIntentRef.current = { bannerId: 'banner0' };
console.log('[HomePanel] videoPlayIntentRef 설정:', videoPlayIntentRef.current);
videoPlay.playVideo('banner0', { reason: 'mount-init' });
console.log('[HomePanel] playVideo 호출 완료');
if (isDeepLink || (!panels.length && !panelInfo.focusedContainerId)) {
dispatch(changeAppStatus({ showLoadingPanel: { show: true, type: 'wait' } }));
dispatch(getHomeMainContents());
@@ -684,6 +691,28 @@ const HomePanel = ({ isOnTop }) => {
}
}, [isOnTop]);
// ✅ HomePanel 활성화 조건: 최상단 패널 또는 PlayerPanel 아래의 두 번째 패널
// 비디오가 재생이 아니면 videoPlayIntentRef의 bannerId로 비디오 재생
useEffect(() => {
const isHomePanelActive =
panels[0]?.name === panel_names.HOME_PANEL ||
(panels.length >= 2 &&
panels[0]?.name === panel_names.PLAYER_PANEL &&
panels[1]?.name === panel_names.HOME_PANEL);
if (isHomePanelActive && videoPlayIntentRef.current?.bannerId) {
const bannerId = videoPlayIntentRef.current.bannerId;
const currentPlaying = videoPlay.getCurrentPlayingBanner();
// 이미 재생 중인 배너가 다르면 새로 재생
if (currentPlaying !== bannerId) {
videoPlay.playVideo(bannerId, {
reason: 'homePanel-active',
});
}
}
}, [panels]);
useEffect(() => {
return () => {
const c = Spotlight.getCurrent();