fix: DetailPanel above PlayerPanel , FeaturedBrandsPanel
This commit is contained in:
@@ -303,6 +303,12 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
|
||||
const sourcePanel = panelInfo?.sourcePanel;
|
||||
const sourceMenu = panelInfo?.sourceMenu;
|
||||
|
||||
console.log('[DP-TRACE] Detail unmount start', {
|
||||
sourcePanel,
|
||||
sourceMenu,
|
||||
panelsSnapshot: panels.map((p) => p.name),
|
||||
});
|
||||
|
||||
console.log('[Detail-BG] 306-line sourcePanel:', sourcePanel, 'sourceMenu:', sourceMenu);
|
||||
|
||||
// DetailPanel이 unmount되는 시점
|
||||
@@ -1051,11 +1057,11 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
|
||||
} else {
|
||||
console.log('[Detail-BG] ⏭️ DetailPanel - Skipping pause (no playerPanel or no productVideo)', {
|
||||
hasPlayerPanel,
|
||||
hasProductVideo,
|
||||
reason: !hasPlayerPanel ? 'no playerPanel' : 'no productVideo',
|
||||
timestamp: Date.now(),
|
||||
});
|
||||
}
|
||||
hasProductVideo,
|
||||
reason: !hasPlayerPanel ? 'no playerPanel' : 'no productVideo',
|
||||
timestamp: Date.now(),
|
||||
});
|
||||
}
|
||||
|
||||
return () => {
|
||||
// DetailPanel 언마운트 시: 비디오가 있었고 멈췄던 경우만 재생 재개
|
||||
@@ -1104,12 +1110,15 @@ export default function DetailPanel({ panelInfo, isOnTop, spotlightId }) {
|
||||
const hasPlayerPanel = panels.some(
|
||||
(panel) => panel.name === panel_names.PLAYER_PANEL && panel.panelInfo?.modal === true
|
||||
);
|
||||
const launchedFromPlayer = panelInfo?.fromPlayer || panelInfo?.sourcePanel === panel_names.PLAYER_PANEL;
|
||||
|
||||
if (hasPlayerPanel) {
|
||||
console.log('[DetailPanel] PlayerPanel modal=true detected - stopping video preview');
|
||||
if (hasPlayerPanel && !launchedFromPlayer) {
|
||||
console.log('[DetailPanel] PlayerPanel modal=true detected - stopping video preview (non-player source)');
|
||||
dispatch(finishVideoPreview());
|
||||
} else if (hasPlayerPanel && launchedFromPlayer) {
|
||||
console.log('[DetailPanel] PlayerPanel modal=true detected - launched from Player, skip finishVideoPreview');
|
||||
}
|
||||
}, [panels, dispatch]);
|
||||
}, [panels, dispatch, panelInfo?.fromPlayer, panelInfo?.sourcePanel]);
|
||||
|
||||
return (
|
||||
<div ref={containerRef}>
|
||||
|
||||
Reference in New Issue
Block a user