File size: 21,718 Bytes
35a128e 7583f7b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>CamPulse - Camera Control Hub</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/animejs/lib/anime.iife.min.js"></script>
<style>
.vanta-bg {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: -1;
opacity: 0.15;
}
.glass-card {
background: rgba(15, 23, 42, 0.7);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
}
.camera-feed {
transition: all 0.3s ease;
}
.camera-feed:hover {
transform: scale(1.02);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.ptz-button {
transition: all 0.2s ease;
}
.ptz-button:hover {
transform: translateY(-2px);
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}
.status-indicator {
width: 10px;
height: 10px;
border-radius: 50%;
display: inline-block;
margin-right: 8px;
}
.connected {
background-color: #10B981;
}
.disconnected {
background-color: #EF4444;
}
</style>
</head>
<body class="bg-slate-900 text-slate-100 min-h-screen">
<div id="vanta-bg" class="vanta-bg"></div>
<div class="container mx-auto px-4 py-8">
<!-- Header -->
<header class="flex justify-between items-center mb-8">
<div>
<h1 class="text-3xl font-bold text-sky-400 flex items-center">
<i data-feather="video" class="mr-3"></i> CamPulse
</h1>
<p class="text-slate-400">Multi-camera PTZ control hub</p>
</div>
<div class="flex items-center space-x-4">
<button id="theme-toggle" class="p-2 rounded-full bg-slate-800 hover:bg-slate-700 transition">
<i data-feather="moon"></i>
</button>
<div class="relative">
<button id="settings-btn" class="p-2 rounded-full bg-sky-600 hover:bg-sky-500 transition">
<i data-feather="settings"></i>
</button>
</div>
</div>
</header>
<!-- Main Content -->
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
<!-- Camera Feed Section -->
<div class="lg:col-span-2">
<div class="glass-card rounded-xl p-4 mb-6">
<div class="flex justify-between items-center mb-4">
<h2 class="text-xl font-semibold flex items-center">
<i data-feather="camera" class="mr-2"></i> Live Feed
</h2>
<div class="flex space-x-2">
<button class="bg-emerald-600 hover:bg-emerald-500 px-3 py-1 rounded-lg text-sm flex items-center">
<i data-feather="maximize-2" class="mr-1" style="width: 14px; height: 14px;"></i> Fullscreen
</button>
<button class="bg-red-600 hover:bg-red-500 px-3 py-1 rounded-lg text-sm flex items-center">
<i data-feather="circle" class="mr-1" style="width: 14px; height: 14px;"></i> Record
</button>
</div>
</div>
<div class="relative bg-black rounded-lg overflow-hidden aspect-video flex items-center justify-center">
<div class="absolute inset-0 flex items-center justify-center">
<i data-feather="camera-off" class="text-slate-500" style="width: 48px; height: 48px;"></i>
</div>
<div class="absolute bottom-4 left-4 bg-black bg-opacity-50 px-2 py-1 rounded text-sm">
<span class="status-indicator connected"></span>
Camera 1 - 192.168.1.178
</div>
</div>
<div class="mt-4 grid grid-cols-3 gap-4">
<div class="camera-feed bg-slate-800 rounded-lg aspect-video flex items-center justify-center cursor-pointer border-2 border-sky-500">
<i data-feather="camera" class="text-slate-500" style="width: 24px; height: 24px;"></i>
</div>
<div class="camera-feed bg-slate-800 rounded-lg aspect-video flex items-center justify-center cursor-pointer">
<i data-feather="camera" class="text-slate-500" style="width: 24px; height: 24px;"></i>
</div>
<div class="camera-feed bg-slate-800 rounded-lg aspect-video flex items-center justify-center cursor-pointer">
<i data-feather="camera" class="text-slate-500" style="width: 24px; height: 24px;"></i>
</div>
</div>
</div>
<!-- PTZ Controls -->
<div class="glass-card rounded-xl p-4">
<h2 class="text-xl font-semibold mb-4 flex items-center">
<i data-feather="navigation" class="mr-2"></i> PTZ Controls
</h2>
<div class="flex justify-center">
<div class="grid grid-cols-3 gap-4">
<!-- Empty cell -->
<div></div>
<!-- Up -->
<button class="ptz-button bg-sky-600 hover:bg-sky-500 w-16 h-16 rounded-full flex items-center justify-center">
<i data-feather="arrow-up" style="width: 24px; height: 24px;"></i>
</button>
<!-- Empty cell -->
<div></div>
<!-- Left -->
<button class="ptz-button bg-sky-600 hover:bg-sky-500 w-16 h-16 rounded-full flex items-center justify-center">
<i data-feather="arrow-left" style="width: 24px; height: 24px;"></i>
</button>
<!-- Center -->
<button class="ptz-button bg-sky-700 hover:bg-sky-600 w-16 h-16 rounded-full flex items-center justify-center">
<i data-feather="target" style="width: 24px; height: 24px;"></i>
</button>
<!-- Right -->
<button class="ptz-button bg-sky-600 hover:bg-sky-500 w-16 h-16 rounded-full flex items-center justify-center">
<i data-feather="arrow-right" style="width: 24px; height: 24px;"></i>
</button>
<!-- Empty cell -->
<div></div>
<!-- Down -->
<button class="ptz-button bg-sky-600 hover:bg-sky-500 w-16 h-16 rounded-full flex items-center justify-center">
<i data-feather="arrow-down" style="width: 24px; height: 24px;"></i>
</button>
<!-- Empty cell -->
<div></div>
</div>
</div>
<div class="mt-6">
<div class="flex justify-between items-center mb-2">
<span class="text-sm">Zoom Control</span>
<span class="text-sm text-slate-400">1.0x</span>
</div>
<input type="range" min="1" max="8" step="0.1" value="1" class="w-full h-2 bg-slate-700 rounded-lg appearance-none cursor-pointer">
<div class="flex justify-between mt-4">
<button class="bg-slate-700 hover:bg-slate-600 px-4 py-2 rounded-lg text-sm flex items-center">
<i data-feather="zoom-in" class="mr-1" style="width: 16px; height: 16px;"></i> Zoom In
</button>
<button class="bg-slate-700 hover:bg-slate-600 px-4 py-2 rounded-lg text-sm flex items-center">
<i data-feather="zoom-out" class="mr-1" style="width: 16px; height: 16px;"></i> Zoom Out
</button>
<button class="bg-slate-700 hover:bg-slate-600 px-4 py-2 rounded-lg text-sm flex items-center">
<i data-feather="refresh-ccw" class="mr-1" style="width: 16px; height: 16px;"></i> Reset
</button>
</div>
</div>
</div>
</div>
<!-- Right Panel -->
<div class="space-y-6">
<!-- Camera Settings -->
<div class="glass-card rounded-xl p-4">
<h2 class="text-xl font-semibold mb-4 flex items-center">
<i data-feather="sliders" class="mr-2"></i> Camera Settings
</h2>
<div class="space-y-4">
<div>
<label class="block text-sm mb-1">Resolution</label>
<select class="w-full bg-slate-800 border border-slate-700 rounded-lg px-3 py-2 text-sm">
<option>640x360</option>
<option selected>1280x720</option>
<option>1920x1080</option>
<option>2560x1440</option>
</select>
</div>
<div>
<label class="block text-sm mb-1">Frame Rate</label>
<select class="w-full bg-slate-800 border border-slate-700 rounded-lg px-3 py-2 text-sm">
<option>5 FPS</option>
<option>10 FPS</option>
<option selected>12 FPS</option>
<option>15 FPS</option>
<option>20 FPS</option>
<option>25 FPS</option>
<option>30 FPS</option>
</select>
</div>
<div>
<label class="block text-sm mb-1">Bitrate</label>
<select class="w-full bg-slate-800 border border-slate-700 rounded-lg px-3 py-2 text-sm">
<option>512 Kbps</option>
<option>1024 Kbps</option>
<option selected>2048 Kbps</option>
<option>4096 Kbps</option>
<option>8192 Kbps</option>
</select>
</div>
<div class="pt-2">
<div class="flex items-center justify-between mb-2">
<span class="text-sm">White Light</span>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer">
<div class="w-11 h-6 bg-slate-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-emerald-500"></div>
</label>
</div>
<div class="flex items-center justify-between mb-2">
<span class="text-sm">IR Light</span>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer">
<div class="w-11 h-6 bg-slate-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-emerald-500"></div>
</label>
</div>
<div class="flex items-center justify-between">
<span class="text-sm">Day/Night Mode</span>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" checked class="sr-only peer">
<div class="w-11 h-6 bg-slate-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-emerald-500"></div>
</label>
</div>
</div>
</div>
</div>
<!-- Camera Management -->
<div class="glass-card rounded-xl p-4">
<h2 class="text-xl font-semibold mb-4 flex items-center">
<i data-feather="list" class="mr-2"></i> Camera Management
</h2>
<div class="space-y-4">
<div>
<label class="block text-sm mb-1">Add New Camera</label>
<input type="text" placeholder="Camera IP" class="w-full bg-slate-800 border border-slate-700 rounded-lg px-3 py-2 text-sm mb-2">
<input type="text" placeholder="Camera Name" class="w-full bg-slate-800 border border-slate-700 rounded-lg px-3 py-2 text-sm mb-3">
<button class="w-full bg-sky-600 hover:bg-sky-500 py-2 rounded-lg text-sm flex items-center justify-center">
<i data-feather="plus" class="mr-1" style="width: 16px; height: 16px;"></i> Add Camera
</button>
</div>
<div class="border-t border-slate-700 pt-4">
<h3 class="text-sm font-semibold mb-2">Connected Cameras</h3>
<div class="space-y-2">
<div class="flex items-center justify-between bg-slate-800 p-3 rounded-lg border border-sky-500">
<div class="flex items-center">
<span class="status-indicator connected"></span>
<span>Camera 1</span>
</div>
<button class="text-red-500 hover:text-red-400">
<i data-feather="trash-2" style="width: 16px; height: 16px;"></i>
</button>
</div>
<div class="flex items-center justify-between bg-slate-800 p-3 rounded-lg">
<div class="flex items-center">
<span class="status-indicator connected"></span>
<span>Camera 2</span>
</div>
<button class="text-red-500 hover:text-red-400">
<i data-feather="trash-2" style="width: 16px; height: 16px;"></i>
</button>
</div>
<div class="flex items-center justify-between bg-slate-800 p-3 rounded-lg">
<div class="flex items-center">
<span class="status-indicator disconnected"></span>
<span>Camera 3</span>
</div>
<button class="text-red-500 hover:text-red-400">
<i data-feather="trash-2" style="width: 16px; height: 16px;"></i>
</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Status Bar -->
<div class="glass-card rounded-lg p-3 mt-6 text-sm flex items-center">
<i data-feather="info" class="mr-2" style="width: 16px; height: 16px;"></i>
<span>System ready. Connected to 2 of 3 cameras.</span>
</div>
</div>
<script>
// Initialize Vanta.js background
VANTA.GLOBE({
el: "#vanta-bg",
mouseControls: true,
touchControls: true,
gyroControls: false,
minHeight: 200.00,
minWidth: 200.00,
scale: 1.00,
scaleMobile: 1.00,
color: 0x3b82f6,
backgroundColor: 0x0f172a,
size: 0.8
});
// Theme toggle
const themeToggle = document.getElementById('theme-toggle');
const htmlElement = document.documentElement;
themeToggle.addEventListener('click', () => {
if (htmlElement.classList.contains('dark')) {
htmlElement.classList.remove('dark');
htmlElement.classList.add('light');
feather.replace();
themeToggle.innerHTML = feather.icons['sun'].toSvg();
} else {
htmlElement.classList.remove('light');
htmlElement.classList.add('dark');
feather.replace();
themeToggle.innerHTML = feather.icons['moon'].toSvg();
}
});
// Camera feed selection
const cameraFeeds = document.querySelectorAll('.camera-feed');
const mainFeed = document.querySelector('.relative.bg-black.rounded-lg');
cameraFeeds.forEach((feed, index) => {
feed.addEventListener('click', () => {
// Remove active border from all feeds
cameraFeeds.forEach(f => f.classList.remove('border-2', 'border-sky-500'));
// Add active border to clicked feed
feed.classList.add('border-2', 'border-sky-500');
// Update main feed status (simulated)
const statusDiv = mainFeed.querySelector('.absolute.bottom-4.left-4');
statusDiv.innerHTML = `
<span class="status-indicator connected"></span>
Camera ${index + 1} - 192.168.1.${178 + index}
`;
});
});
// PTZ control animations
const ptzButtons = document.querySelectorAll('.ptz-button');
ptzButtons.forEach(button => {
button.addEventListener('click', () => {
anime({
targets: button,
scale: [1, 0.9, 1],
duration: 200,
easing: 'easeInOutQuad'
});
});
});
// Zoom control animation
const zoomSlider = document.querySelector('input[type="range"]');
const zoomValue = document.querySelector('.text-sm.text-slate-400');
zoomSlider.addEventListener('input', () => {
const zoomLevel = zoomSlider.value;
zoomValue.textContent = `${zoomLevel}x`;
anime({
targets: zoomValue,
scale: [1, 1.2, 1],
duration: 300,
easing: 'easeInOutQuad'
});
});
// Initialize feather icons
feather.replace();
</script>
</body>
</html>
|