Skip to content

Improve camera stream and browser auth resilience#1373

Open
nutzlastfan wants to merge 2 commits into
roflcoopter:devfrom
nutzlastfan:codex/upstream-stream-auth-resilience
Open

Improve camera stream and browser auth resilience#1373
nutzlastfan wants to merge 2 commits into
roflcoopter:devfrom
nutzlastfan:codex/upstream-stream-auth-resilience

Conversation

@nutzlastfan
Copy link
Copy Markdown

@nutzlastfan nutzlastfan commented May 29, 2026

Summary

  • Adds exponential-ish retry backoff for offline camera setup attempts.
  • Allows browser API auth to fall back to a valid secure cookie session when the JS access token is missing or stale.
  • Adds a still-image fallback for dynamic MJPEG streams when processed frames are unavailable.

Why

Offline cameras should not churn setup attempts indefinitely, and browsers with a valid session should not get stuck on 401s because localStorage and httpOnly cookies are temporarily out of sync. Cameras that have a configured still image can still show a useful Live view fallback even when processed-frame MJPEG output is not available.

Validation

  • Cherry-picked onto current upstream dev.
  • Ran git diff --check for this branch.
  • Ran python3 -m py_compile for the affected backend modules in the deployed checkout.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 29, 2026

Deploy Preview for viseron ready!

Name Link
🔨 Latest commit abb0bf2
🔍 Latest deploy log https://app.netlify.com/projects/viseron/deploys/6a19a2310c6f0b0008e9688a
😎 Deploy Preview https://deploy-preview-1373--viseron.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nutzlastfan nutzlastfan marked this pull request as ready for review May 29, 2026 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant