mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 08:25:54 +02:00
[PR #617] [CLOSED] Add camera grid streaming with multiplexed MJPEG, print controls, and UX improvements #1090
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy-maziggy-1#1090
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/maziggy/bambuddy/pull/617
Author: @aneopsy
Created: 3/5/2026
Status: ❌ Closed
Base:
0.2.3b1← Head:printers-camera-grid📝 Commits (10+)
c6b8983feat(camera): shared stream hub, canvas grid viewer, multiplexed streaming, and bandwidth optimization8cb98a9feat(camera): add pause, resume, and stop controls to camera cardsEnhances camera grid with print controls12aa11efeat(camera-grid): worker decoding, IntersectionObserver, reconnect, quality switching, and UX improvements0b652b3feat(camera-grid): HMS error notifications, ETA tooltip, control loading states, and backend hardeninga937260feat(camera-grid): i18n, auth, process cleanup, input validation, and ref leak fixesb9299a1feat(camera-grid): fix producer race condition, add auth headers, and i18n fixes51f7da2feat(camera-grid): fix sort bug, reconnect UI, frame validation, and stream cleanup9c78902feat(camera-grid): encapsulate hub access, input validation, auth, and timer leak fixes94539eefix(printers): AMS tray ID consistency, timer leak, localStorage safety, and modal ordering01efd08fix(security): harden camera endpoints - RTSP sanitization, credential leak, Query bounds, SSRF📊 Changes
60 files changed (+9340 additions, -2029 deletions)
View changed files
📝
backend/app/api/routes/auth.py(+21 -1)📝
backend/app/api/routes/camera.py(+1842 -282)📝
backend/app/api/routes/printers.py(+6 -0)📝
backend/app/api/routes/settings.py(+31 -2)📝
backend/app/api/routes/websocket.py(+40 -2)📝
backend/app/core/database.py(+1 -1)📝
backend/app/main.py(+45 -16)📝
backend/app/schemas/printer.py(+27 -3)📝
backend/app/schemas/settings.py(+10 -0)📝
backend/app/services/camera.py(+319 -27)📝
backend/app/services/external_camera.py(+252 -171)📝
backend/app/services/timelapse_processor.py(+19 -11)📝
backend/tests/integration/test_auth_api.py(+65 -1)📝
backend/tests/integration/test_camera_api.py(+154 -26)📝
backend/tests/integration/test_settings_api.py(+98 -0)📝
backend/tests/unit/services/mock_ftp_server.py(+8 -1)➕
backend/tests/unit/services/test_camera_service.py(+498 -0)📝
backend/tests/unit/services/test_external_camera.py(+19 -24)➕
backend/tests/unit/services/test_sanitize_camera_url.py(+146 -0)➕
backend/tests/unit/test_camera_grid.py(+1001 -0)...and 40 more files
📄 Description
Description
Adds a real-time camera grid view to the Printers page — a single multiplexed MJPEG stream serves frames for all visible printers, decoded in a Web Worker and rendered on canvas. Includes inline print controls (pause/resume/stop), HMS error notifications, quality switching, and comprehensive backend stream management with shared producers and automatic cleanup.
Frontend:
Backend optimisation - CPU usage for camera stream:
Before:

After:

Type of Change
Changes Made
Backend (
backend/app/api/routes/camera.py)_StreamHub) — single producer per camera, multiple consumers/camera/grid-streamendpoint with binary-framed multi-printer MJPEG_ensure_producerfor concurrent client requestsFrontend (
frontend/src/pages/PrintersPage.tsx)CameraGridcomponent with canvas-based rendering and dynamic layoutcameraGridDecoder.worker.ts) for off-main-thread frame decodingIntersectionObserverto pause/resume streams for off-screen cardsi18n
Testing
Checklist
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.