Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion static/js/playback-canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function showEventTooltip(event,x,y) {
tooltip.style.left=(x+10)+'px'; tooltip.style.top=(y+10)+'px';
tooltip.appendChild(eventTextElement('div',`${eventIconText(event.label)} ${event.label ?? ''}`,'font-weight:bold;color:#4CAF50;margin-bottom:4px;'));
const details=document.createElement('div'); details.style.cssText='font-size:11px;color:#ccc;';
details.appendChild(eventTextElement('div',`?? ${event.camera_name ?? ''}`)); details.appendChild(eventTextElement('div',`?? ${new Date(event.start_time).toLocaleTimeString()}`)); details.appendChild(eventTextElement('div',`?? ${event.duration_seconds || event.duration}s`));
details.appendChild(eventTextElement('div',`📹 ${event.camera_name ?? ''}`)); details.appendChild(eventTextElement('div',`🕐 ${new Date(event.start_time).toLocaleTimeString()}`)); details.appendChild(eventTextElement('div',`⏱️ ${event.duration_seconds || event.duration}s`));
tooltip.appendChild(details); tooltip.appendChild(eventTextElement('div','Click to view recording','font-size:10px;color:#888;margin-top:4px;font-style:italic;'));
document.body.appendChild(tooltip); eventTooltip=tooltip;
}
Expand Down
2 changes: 1 addition & 1 deletion static/js/playback-state.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let timelineRequestVersion = 0, timelineAbort = null, pendingEventNavigation = n
let playbackIntentVersion = 0;
const playbackSessions = new Map();
let seekGeneration = 0, mediaCleanups = [], segmentCleanups = [];
const EVENT_ICONS = {'Motion Detected':'???','Person Detected':'??','Vehicle Detected':'??','Intrusion':'??','Loitering':'??','Object Removed':'??','Object Left Behind':'??','Sound Alert':'??','Line Crossing':'??','Tamper Alert':'??'};
const EVENT_ICONS = {'Motion Detected':'👁️','Person Detected':'👤','Vehicle Detected':'🚗','Intrusion':'⚠️','Loitering':'⏱️','Object Removed':'📦','Object Left Behind':'🎒','Sound Alert':'🔔','Line Crossing':'➡️','Tamper Alert':'🚨'};
let cameraColorMap = {};
const COLORS = ['#3b82f6','#10b981','#f59e0b','#ef4444','#8b5cf6','#ec4899','#06b6d4','#84cc16','#f97316','#14b8a6','#a855f7','#f43f5e','#0ea5e9','#eab308','#6366f1','#d946ef'];
let timelineZoomLevel = 1.0, timelineOffset = 0, nextColorIndex = 0;
Expand Down
2 changes: 1 addition & 1 deletion static/js/playback-video-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function toggleFullscreen() {
}
function toggleMuteAll() {
const muted=videoPlayers.filter(Boolean).every(video=>video.muted); videoPlayers.forEach(video=>{ if (video) video.muted=!muted; });
const button=document.getElementById('mute-all-btn'); if (button) button.textContent=muted?'?? Unmute All':'?? Mute All';
const button=document.getElementById('mute-all-btn'); if (button) button.textContent=muted?'🔊 Unmute All':'🔇 Mute All';
}
function updateVideoGrid() {
const container=document.getElementById('video-grid'); if (!container) return;
Expand Down
2 changes: 1 addition & 1 deletion tests/event-rendering.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ for (const label of ['constructor','__proto__','toString','hasOwnProperty']) {
context.showEventTooltip({...event,label},10,20);
assert.equal(body.children.length,1); assert.ok(body.children[0].textContent.startsWith('? '+label));
}
assert.equal(context.eventIconText('Motion Detected'),'???');
assert.equal(context.eventIconText('Motion Detected'),'👁️');
context.hideEventTooltip(); assert.equal(body.children.length,0);
context.renderEventsList([]); assert.equal(list.textContent,'No events to display');
context.renderEventsList([{id:'normal',label:'Motion Detected',camera_name:'Front Door',start_time:'2026-11-10T12:00:00Z',duration_seconds:10}]);
Expand Down
Loading