Improve CSS test preview: HD resolution, screen-only border, and refactor frontend docs
- Bump capture preview resolution from 480×360 to 960×540 (HD) - Increase preview FPS from 2 to ~12 FPS (AUX_INTERVAL 0.5→0.08) - Add accent-color border on screen rect only (not LED edges) via ::after - Use dynamic aspect-ratio from decoded JPEG frames instead of fixed height - Widen modal to 900px for picture sources - Move frontend conventions from CLAUDE.md to contexts/frontend.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -775,7 +775,7 @@ async def test_color_strip_ws(
|
||||
if is_picture and hasattr(stream, '_live_stream'):
|
||||
_frame_live = stream._live_stream
|
||||
_last_aux_time = 0.0
|
||||
_AUX_INTERVAL = 0.5 # send JPEG preview / brightness updates every 0.5s
|
||||
_AUX_INTERVAL = 0.08 # send JPEG preview / brightness updates ~12 FPS
|
||||
|
||||
# Stream binary RGB frames at ~20 Hz
|
||||
while True:
|
||||
@@ -832,7 +832,7 @@ async def test_color_strip_ws(
|
||||
img = img[:, :, :3]
|
||||
# Downscale for bandwidth
|
||||
h, w = img.shape[:2]
|
||||
scale = min(480 / w, 360 / h, 1.0)
|
||||
scale = min(960 / w, 540 / h, 1.0)
|
||||
if scale < 1.0:
|
||||
new_w = max(1, int(w * scale))
|
||||
new_h = max(1, int(h * scale))
|
||||
|
||||
Reference in New Issue
Block a user