[251124] fix: PlayerPanel,VideoPlayer 최적화-6
🕐 커밋 시간: 2025. 11. 24. 19:23:39 📊 변경 통계: • 총 파일: 8개 • 추가: +142줄 • 삭제: -31줄 📝 수정된 파일: ~ com.twin.app.shoptime/src/actions/playActions.js ~ com.twin.app.shoptime/src/components/MediaItem/MediaItem.js ~ com.twin.app.shoptime/src/components/VideoPlayer/MediaTitle.js ~ com.twin.app.shoptime/src/components/VideoPlayer/TReactPlayer.jsx ~ com.twin.app.shoptime/src/components/VideoPlayer/VideoPlayer.js ~ com.twin.app.shoptime/src/hooks/useReviews/useReviews.js ~ com.twin.app.shoptime/src/utils/helperMethods.js ~ com.twin.app.shoptime/src/views/PlayerPanel/PlayerPanel.jsx 🔧 주요 변경 내용: • 핵심 비즈니스 로직 개선 • UI 컴포넌트 아키텍처 개선 • 공통 유틸리티 함수 최적화 • 중간 규모 기능 개선 • 모듈 구조 개선
This commit is contained in:
@@ -158,7 +158,7 @@ export default function TReactPlayer({
|
||||
// 🔽 [최적화] URL 변경 또는 언마운트 시 이전 비디오 정리 (메모리 누수 방지)
|
||||
useEffect(() => {
|
||||
return () => {
|
||||
console.log('[TReactPlayer] cleanup - start', { url });
|
||||
// console.log('[TReactPlayer] cleanup - start', { url });
|
||||
const videoNode = playerRef.current?.getInternalPlayer();
|
||||
if (videoNode) {
|
||||
try {
|
||||
@@ -179,7 +179,7 @@ export default function TReactPlayer({
|
||||
console.warn('[TReactPlayer] cleanup warning:', err);
|
||||
}
|
||||
}
|
||||
console.log('[TReactPlayer] cleanup - done', { url });
|
||||
// console.log('[TReactPlayer] cleanup - done', { url });
|
||||
};
|
||||
}, [url]); // ✅ URL 변경 시에도 정리 로직 실행
|
||||
|
||||
|
||||
Reference in New Issue
Block a user