Skip to content

Camera bar elements#29

Open
logbasem wants to merge 7 commits into
mainfrom
camera-bar-elements
Open

Camera bar elements#29
logbasem wants to merge 7 commits into
mainfrom
camera-bar-elements

Conversation

@logbasem
Copy link
Copy Markdown

@logbasem logbasem commented May 8, 2026

  • Dummy buttons implemented by Haidyn
  • Logic for launch, re-launch, and size change
  • Refactoring for cleaner code
  • Removed Add Camera button
  • Moved stream control buttons to be next to select camera dropdown

UI Screenshot

Screenshot 2026-05-08 at 7 10 31 AM

@logbasem logbasem requested a review from onkoe May 8, 2026 12:17
@onkoe
Copy link
Copy Markdown
Member

onkoe commented May 8, 2026

wow those linter errors were actually very useful

i'll review this shortly :)

Copy link
Copy Markdown
Member

@onkoe onkoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good! just got a few clarity/alert nits to fix when convenient :D

Comment thread react-app/src/App.tsx
import CameraGrid, { type CameraContainer } from "./CameraGrid";
import CameraToolbar from "./CameraToolbar";

//filepath for testing (DELETE LATER): ../../../GitHub/Automomous/examples/ARTrackerTest/videos
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might want to delete this before it gets re-discovered in five years

Comment thread react-app/src/App.tsx
Comment on lines +9 to +10
//Need to create a selection of camera names to choose from, and then pass that camera name
//to the image source to get the video feed from the server
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this true? this kinda reads like a // TODO that's already been completed

Comment on lines +177 to +192
// IMPORTANT: Calls to the API should only run after this point.

/* API Requests Example
// Get the current mode (ex. 1920x1080 @ 30fps)
let modeResponse = await fetch(`/stream/cameras/${encodeURIComponent(selectedCameraPath)}/modes/current`);
console.log(await modeResponse.text());

// Get the possible modes for the camera (ex. { 0: "1920x1080 @ 30fps", .. })
let modesResponse = await fetch(`/stream/cameras/${encodeURIComponent(selectedCameraPath)}/modes`);
console.log(await modesResponse.json());

// Set the current mode for the camera by the index found in the top api request
let setResponse = await fetch(`/stream/cameras/${encodeURIComponent(selectedCameraPath)}/modes/set/${1}`, { method: "PUT" });
console.log(setResponse.status);
*/
};
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the peerConnection.onicecandidate lambda's scope ends here -- should these comments still be there?

Comment on lines +223 to +226
if (selectedCamera === "") {
alert("stream: no camera selected; cannot re-launch stream.");
return;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could serve as a good sanity check. but you might just gray out the button instead

const cameraContainer = cameraContainers.find(container => container.name === selectedCamera);

if (!cameraConnection) {
alert("stream: selected camera does not have an active connection; cannot re-launch stream.");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should make any alert'd errors actionable just in case they're talking to ppl who are sweating in the desert 😭

Suggested change
alert("stream: selected camera does not have an active connection; cannot re-launch stream.");
alert(`stream: The selected camera is not plugged in
(or is otherwise not responding),
so the video streamer can't re-launch it.
Please ensure it is plugged in correctly.`);

);

if (!cameraContainer) {
alert("stream: selected camera does not have an available container; cannot re-launch stream.");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this mean that we're out of hardcoded containers, or that the camera simply isn't assigned one? you might comment for clarity or replace the alert text

Comment thread react-app/README.md
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should probably remove this file

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.

3 participants