From 40216e014d746139ee2d1dfe334b493c38bb733e Mon Sep 17 00:00:00 2001 From: mwpn Date: Thu, 18 Dec 2025 13:50:11 +0700 Subject: [PATCH] Tambah logging untuk debug video panel di dashboard --- public/dashboard/js/dashboard.js | 9 +++++++++ 1 file changed, 9 insertions(+) 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); } }