[251216] fix: TrendingNowPanel PlayerPanel DetailPanel Bg Video Pause
🕐 커밋 시간: 2025. 12. 16. 14:39:08 📊 변경 통계: • 총 파일: 1개 • 추가: +3줄 • 삭제: -3줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx 🔧 주요 변경 내용: • 코드 정리 및 최적화
This commit is contained in:
@@ -504,10 +504,10 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
|||||||
|
|
||||||
// PanelInfo 상태 변화 모니터링 useEffect (isPaused가 실제로 변경될 때만)
|
// PanelInfo 상태 변화 모니터링 useEffect (isPaused가 실제로 변경될 때만)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const isOnTop = panel_names.HOME_PANEL === topPanel?.name;
|
|
||||||
const isPausedChanged = previousPanelInfo.current?.isPaused !== panelInfo?.isPaused;
|
const isPausedChanged = previousPanelInfo.current?.isPaused !== panelInfo?.isPaused;
|
||||||
|
|
||||||
if (isOnTop && panelInfo?.isPaused !== undefined && isPausedChanged) {
|
// isOnTop 여부와 관계없이 isPaused 변경을 감지하여 비디오 제어
|
||||||
|
if (panelInfo?.isPaused !== undefined && isPausedChanged) {
|
||||||
// 상태 변경 시에만 디버깅 로그 출력
|
// 상태 변경 시에만 디버깅 로그 출력
|
||||||
dlog('🔍 [PlayerPanel] PanelInfo isPaused changed', {
|
dlog('🔍 [PlayerPanel] PanelInfo isPaused changed', {
|
||||||
previousIsPaused: previousPanelInfo.current?.isPaused,
|
previousIsPaused: previousPanelInfo.current?.isPaused,
|
||||||
@@ -540,7 +540,7 @@ const PlayerPanel = ({ isTabActivated, panelInfo, isOnTop, spotlightId, ...props
|
|||||||
}
|
}
|
||||||
|
|
||||||
previousPanelInfo.current = panelInfo;
|
previousPanelInfo.current = panelInfo;
|
||||||
}, [panelInfo?.isPaused, topPanel?.name, currentPlayingUrl]);
|
}, [panelInfo?.isPaused, currentPlayingUrl]);
|
||||||
|
|
||||||
// VideoPlayer 인스턴스 및 소스 변경 모니터링 (중요 변화만)
|
// VideoPlayer 인스턴스 및 소스 변경 모니터링 (중요 변화만)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user