Skip to content

Conversation

@axyklee
Copy link

@axyklee axyklee commented Jan 30, 2025

Closes #146, #190.

This PR introduces a new Camera Stream tab that allows users to view MJPG streams from web cameras. The stream source is a URL string, which is set as the src attribute for <img /> elements rendered in the tab.

By default, the current Content-Security-Policy (CSP) blocks requests to external sources. To enable external streams, we may need to loosen img-src restrictions in www/satellite.html and www/hub.html. However, this PR does not modify CSP settings to avoid security risks. For testing purposes, you can temporarily set img-src to * in www/satellite.html or www/hub.html. I was unable to find a reliable way to allow all private IPs or local hostnames under CSP.

This PR also

  • Added CameraStream tab as the # 12 TabType (placed before Metadata).
  • Updated Metadata TabType to # 13.
  • Included a warning: "Camera Streams are always live and do not support replays."

{0F7D5C8F-C336-48D2-84F2-2B026FE3D52F}

@jwbonner
Copy link
Member

Thanks for all of your effort putting this together! Can you elaborate on your intended use case for this feature? My primary concern is that we don't want to introduce any features to AdvantageScope that encourage its use as a driver dashboard (rather than a data visualization tool). It seems like in its current state the features here are very similar to what you can achieve by pulling up a dashboard like Elastic. From what I can tell, features like time scrubbing aren't really integrated with the rest of AdvantageScope, so in some sense I think it's more clear from a UI perspective to keep live camera streams in a separate application (since the way you interact with them is significantly different). Let me know if I'm misunderstanding something, or if you had a different idea for the use case beyond what is offered by existing dashboards.

@spacey-sooty
Copy link
Contributor

Can you elaborate on your intended use case for this feature?

Being able to display a video in sync with log times and scroll forward and backwards through it would be nice for debugging vision sometimes.

@blaze-developer
Copy link
Contributor

Can you elaborate on your intended use case for this feature?

Being able to display a video in sync with log times and scroll forward and backwards through it would be nice for debugging vision sometimes.

Is this not already solved with the video tab? Or do you mean the user could record a camera stream to a video in advantagescope?

@spacey-sooty
Copy link
Contributor

Or do you mean the user could record a camera stream to a video in advantagescope?
Yea stored in memory temporarily like with NT, that way you dont need the whole video downloaded just need it streamed while you had it in the tab

@jwbonner
Copy link
Member

jwbonner commented Aug 6, 2025

In the current state, I don't think this feature is good fit for AdvantageScope. There are other tools (Elastic) that can be used for viewing camera stream live, with a UI intended for that use case. We might think about integrating a feature like this into the video tab if it supported other standard features of AdvantageScope (recording & time scrubbing).

@jwbonner jwbonner closed this Aug 6, 2025
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.

Camera Viewing

4 participants