mirror of
https://github.com/John-Varghese-EH/ESP32-CAM-ONVIF.git
synced 2025-11-11 16:26:22 +00:00
133 lines
5.9 KiB
HTML
133 lines
5.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>J0X-ESP-CAM Control Panel</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet" href="/style.css">
|
|
</head>
|
|
<body>
|
|
<div id="login-overlay" class="overlay">
|
|
<div class="login-box">
|
|
<img src="/logo.png" alt="Logo" class="logo-large">
|
|
<h2>J0X-ESP-CAM</h2>
|
|
<form id="login-form" onsubmit="return login(event)">
|
|
<input type="text" id="username" placeholder="Username" autocomplete="username" required>
|
|
<input type="password" id="password" placeholder="Password" autocomplete="current-password" required>
|
|
<button type="submit" class="btn">Login</button>
|
|
<div id="login-error" class="error"></div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<header>
|
|
<div class="header-bar">
|
|
<img src="/logo.png" alt="Logo" class="logo-small">
|
|
<span class="brand">J0X-ESP-CAM</span>
|
|
</div>
|
|
<div class="status" id="status">Connecting...</div>
|
|
</header>
|
|
<main>
|
|
<nav class="tabs">
|
|
<button class="tab-btn active" onclick="showPanel('live')">Live</button>
|
|
<button class="tab-btn" onclick="showPanel('camera')">Camera</button>
|
|
<button class="tab-btn" onclick="showPanel('sd')">SD Card</button>
|
|
<button class="tab-btn" onclick="showPanel('system')">System</button>
|
|
</nav>
|
|
<section id="panel-live" class="panel">
|
|
<h2>Live Preview</h2>
|
|
<img id="preview" class="video-preview" src="/stream" alt="Live Stream">
|
|
<div>
|
|
<button class="btn" onclick="snapshot()">Snapshot</button>
|
|
</div>
|
|
</section>
|
|
<section id="panel-camera" class="panel" style="display:none">
|
|
<h2>Camera Controls</h2>
|
|
<label>XCLK MHz
|
|
<select id="xclk" onchange="setConfig('xclk', this.value)">
|
|
<option value="10">10</option>
|
|
<option value="16">16</option>
|
|
<option value="20" selected>20</option>
|
|
<option value="40">40</option>
|
|
</select>
|
|
</label>
|
|
<label>Resolution
|
|
<select id="resolution" onchange="setConfig('resolution', this.value)">
|
|
<option value="UXGA">UXGA (1600x1200)</option>
|
|
<option value="SXGA">SXGA (1280x1024)</option>
|
|
<option value="XGA">XGA (1024x768)</option>
|
|
<option value="SVGA">SVGA (800x600)</option>
|
|
<option value="VGA" selected>VGA (640x480)</option>
|
|
<option value="CIF">CIF (352x288)</option>
|
|
<option value="QVGA">QVGA (320x240)</option>
|
|
<option value="QQVGA">QQVGA (160x120)</option>
|
|
</select>
|
|
</label>
|
|
<label>Quality
|
|
<input type="range" min="10" max="63" step="1" value="12" onchange="setConfig('quality', this.value)">
|
|
</label>
|
|
<label>Brightness
|
|
<input type="range" min="-2" max="2" step="1" value="0" onchange="setConfig('brightness', this.value)">
|
|
</label>
|
|
<label>Contrast
|
|
<input type="range" min="-2" max="2" step="1" value="0" onchange="setConfig('contrast', this.value)">
|
|
</label>
|
|
<label>Saturation
|
|
<input type="range" min="-2" max="2" step="1" value="0" onchange="setConfig('saturation', this.value)">
|
|
</label>
|
|
<label><input type="checkbox" onchange="setConfig('awb', this.checked ? 1 : 0)"> AWB</label>
|
|
<label><input type="checkbox" onchange="setConfig('awb_gain', this.checked ? 1 : 0)"> AWB Gain</label>
|
|
<label><input type="checkbox" onchange="setConfig('wb_mode', this.checked ? 1 : 0)"> WB Auto</label>
|
|
<label><input type="checkbox" onchange="setConfig('aec', this.checked ? 1 : 0)"> AEC Sensor</label>
|
|
<label><input type="checkbox" onchange="setConfig('aec2', this.checked ? 1 : 0)"> AEC DSP</label>
|
|
<label>AE Level
|
|
<input type="range" min="-2" max="2" step="1" value="0" onchange="setConfig('ae_level', this.value)">
|
|
</label>
|
|
<label><input type="checkbox" onchange="setConfig('agc', this.checked ? 1 : 0)"> AGC</label>
|
|
<label>Gain Ceiling
|
|
<select onchange="setConfig('gainceiling', this.value)">
|
|
<option value="0">2x</option>
|
|
<option value="1">4x</option>
|
|
<option value="2">8x</option>
|
|
<option value="3">16x</option>
|
|
<option value="4">32x</option>
|
|
<option value="5">64x</option>
|
|
<option value="6">128x</option>
|
|
</select>
|
|
</label>
|
|
<label><input type="checkbox" onchange="setConfig('bpc', this.checked ? 1 : 0)"> BPC</label>
|
|
<label><input type="checkbox" onchange="setConfig('wpc', this.checked ? 1 : 0)"> WPC</label>
|
|
<label><input type="checkbox" onchange="setConfig('raw_gma', this.checked ? 1 : 0)"> Raw GMA</label>
|
|
<label><input type="checkbox" onchange="setConfig('lenc', this.checked ? 1 : 0)"> Lens Correction</label>
|
|
<label><input type="checkbox" onchange="setConfig('hmirror', this.checked ? 1 : 0)"> H-Mirror</label>
|
|
<label><input type="checkbox" onchange="setConfig('vflip', this.checked ? 1 : 0)"> V-Flip</label>
|
|
<label><input type="checkbox" onclick="setConfig('rotate', 1)"> Rotate</label>
|
|
<label><input type="checkbox" onchange="setConfig('dcw', this.checked ? 1 : 0)"> DCW (Downsize EN)</label>
|
|
</section>
|
|
<section id="panel-sd" class="panel" style="display:none">
|
|
<h2>SD Card Files</h2>
|
|
<div>
|
|
<button class="btn" onclick="refreshSD()">Refresh</button>
|
|
</div>
|
|
<table id="sd-table">
|
|
<thead>
|
|
<tr><th>File Name</th><th>Size</th><th>Action</th></tr>
|
|
</thead>
|
|
<tbody></tbody>
|
|
</table>
|
|
</section>
|
|
<section id="panel-system" class="panel" style="display:none">
|
|
<h2>Network & System</h2>
|
|
<div>RTSP URL: <span id="rtspUrl"></span></div>
|
|
<div>ONVIF Service: <span id="onvifUrl"></span></div>
|
|
<button class="btn" onclick="reboot()">Reboot</button>
|
|
<button class="btn" onclick="factoryReset()">Factory Reset</button>
|
|
<div id="motionStatus">Motion: Unknown</div>
|
|
</section>
|
|
</main>
|
|
<div class="footer">
|
|
Made with <span style="color:#e25555;">❤️</span> by <a herf="https://github.com/John-Varghese-EH/">J0X</a>
|
|
</div>
|
|
<script src="/app.js"></script>
|
|
</body>
|
|
</html>
|