diff --git a/public/dashboard/js/dashboard.js b/public/dashboard/js/dashboard.js index 67135cc..db24b18 100644 --- a/public/dashboard/js/dashboard.js +++ b/public/dashboard/js/dashboard.js @@ -560,11 +560,19 @@ function showVideoPanel(locationCode) { const videoPanelTitle = document.getElementById('video-panel-title'); const camera = getCameraForLocation(locationCode); + console.log('[Dashboard] showVideoPanel:', { + locationCode, + camera, + gatesCacheKeys: Object.keys(gatesCache), + locationsCacheKeys: Object.keys(locationsCache) + }); + if (camera && camera.url && videoSection && videoPanelTitle) { videoSection.style.display = 'block'; const displayName = camera.gate_name ? `${camera.name} - ${camera.gate_name}` : camera.name; videoPanelTitle.textContent = displayName; currentVideoUrl = camera.url; + console.log('[Dashboard] Video panel shown:', { displayName, url: currentVideoUrl }); // Auto-stop video kalau lokasi berubah if (isVideoPlaying) { stopVideo(); @@ -575,6 +583,7 @@ function showVideoPanel(locationCode) { stopVideo(); } currentVideoUrl = null; + console.log('[Dashboard] Video panel hidden - no camera for location:', locationCode); } }