Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CameraStream tab #322

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

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.

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
2 participants