[251011] fix: MediaPlayer작업
🕐 커밋 시간: 2025. 10. 11. 22:30:02 📊 변경 통계: • 총 파일: 5개 • 추가: +169줄 • 삭제: -161줄 📁 추가된 파일: + com.twin.app.shoptime/src/views/DetailPanel/ProductContentSection/ProductVideo/ProductVideo.backup.jsx 📝 수정된 파일: ~ com.twin.app.shoptime/src/actions/productActions.js ~ com.twin.app.shoptime/src/views/DetailPanel/ProductContentSection/ProductVideo/ProductVideo.jsx ~ com.twin.app.shoptime/src/views/DetailPanel/ProductContentSection/UserReviews/UserReviews.jsx ~ com.twin.app.shoptime/src/views/MediaPanel/MediaPanel.jsx 🔧 함수 변경 내용: 📄 com.twin.app.shoptime/src/views/DetailPanel/ProductContentSection/ProductVideo/ProductVideo.jsx (javascript): 🔄 Modified: Spottable() 🔧 주요 변경 내용: • 핵심 비즈니스 로직 개선
This commit is contained in:
@@ -7,7 +7,11 @@ import Spotlight from '@enact/spotlight';
|
||||
import SpotlightContainerDecorator from '@enact/spotlight/SpotlightContainerDecorator';
|
||||
|
||||
import { sendBroadCast } from '../../actions/commonActions';
|
||||
import { pauseModalMedia, resumeModalMedia } from '../../actions/mediaActions';
|
||||
import {
|
||||
pauseModalMedia,
|
||||
resumeModalMedia,
|
||||
switchMediaToFullscreen,
|
||||
} from '../../actions/mediaActions';
|
||||
import * as PanelActions from '../../actions/panelActions';
|
||||
import TPanel from '../../components/TPanel/TPanel';
|
||||
import Media from '../../components/VideoPlayer/Media';
|
||||
@@ -89,6 +93,11 @@ const MediaPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
||||
videoPlayer.current = ref;
|
||||
}, []);
|
||||
|
||||
// VideoPlayer가 MEDIA 타입에서 setIsVODPaused를 호출하므로 더미 함수 제공
|
||||
const setIsVODPaused = useCallback(() => {
|
||||
// MediaPanel에서는 VOD pause 상태 관리 불필요 (단순 재생만)
|
||||
}, []);
|
||||
|
||||
// modal 스타일 설정
|
||||
useEffect(() => {
|
||||
if (panelInfo.modal && panelInfo.modalContainerId) {
|
||||
@@ -124,6 +133,14 @@ const MediaPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
||||
}
|
||||
}, [panelInfo, isOnTop]);
|
||||
|
||||
// 비디오 클릭 시 modal → fullscreen 전환
|
||||
const onVideoClick = useCallback(() => {
|
||||
if (panelInfo.modal) {
|
||||
console.log('[MediaPanel] Video clicked - switching to fullscreen');
|
||||
dispatch(switchMediaToFullscreen());
|
||||
}
|
||||
}, [dispatch, panelInfo.modal]);
|
||||
|
||||
const onClickBack = useCallback(
|
||||
(ev) => {
|
||||
// modal에서 full로 전환된 경우 다시 modal로 돌아감
|
||||
@@ -280,6 +297,7 @@ const MediaPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
||||
noAutoPlay={false}
|
||||
autoCloseTimeout={3000}
|
||||
onBackButton={onClickBack}
|
||||
onClick={onVideoClick}
|
||||
spotlightDisabled={panelInfo.modal}
|
||||
isYoutube={isYoutube}
|
||||
src={currentPlayingUrl}
|
||||
@@ -302,6 +320,7 @@ const MediaPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
||||
captionEnable={false}
|
||||
setIsSubtitleActive={setIsSubtitleActive}
|
||||
setCurrentTime={setCurrentTime}
|
||||
setIsVODPaused={setIsVODPaused}
|
||||
>
|
||||
{typeof window === 'object' && window.PalmSystem && (
|
||||
<source src={currentPlayingUrl} type={videoType} />
|
||||
|
||||
Reference in New Issue
Block a user