Tambah logging untuk debug video panel di dashboard
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user