Skip to content

Conversation

@chungmin99
Copy link
Collaborator

No description provided.

chungmin99 and others added 24 commits June 6, 2025 14:28
- Add WebRTC camera access from browser clients
- Implement bidirectional message protocol for camera stream configuration
- Support real-time frame capture and transmission to Python server
- Include browser-specific fixes for Chrome permissions and Safari stability
- Add Python API for configuring camera streams and handling frame events
- Include example demonstrating camera streaming functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace video_constraints dict with explicit width, height, frame_rate, and facing_mode parameters
- Add default values: enabled=True, width=800, height=600, frame_rate=30
- Keep facing_mode optional for single camera scenarios
- Update examples to use new typed API
- Remove redundant capture_fps parameter in favor of frame_rate

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix client-side config update handling to properly react to all prop changes
- Replace width/height with max_resolution parameter for better UX
- Remove redundant width/height from CameraStreamFrameMessage
- Update MessageHandler to correctly map server config to client constraints
- Add interactive GUI controls to camera streaming example for testing
- Force webcam component re-mount when video constraints change
- Improve frame rate update reactivity and add proper cleanup

The max_resolution approach preserves aspect ratio and avoids unexpected
cropping by letting the camera choose the best resolution within bounds.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Replace one-time enable button with reusable toggle checkbox
- Add proper client-side cleanup when camera is disabled
- Stop capture interval and release resources when enabled=false
- Update example with interactive enable/disable functionality
- Add transform controls to camera frame for better UX

Users can now easily toggle camera streaming on/off through the GUI
control panel with proper resource management on both sides.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add clickable green/red dot in control panel top bar to show camera state
- Only appears when camera streaming is configured (avoids confusion)
- Click to toggle camera on/off with immediate visual feedback
- Uses Mantine ActionIcon and Tooltip for consistency with other controls
- Real-time status updates via polling camera config
- Proper button sizing to match other toolbar controls

Provides quick camera toggle access without opening control panel.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Auto-disable camera when server connection is lost
- Stop webcam capture immediately on disconnect to save resources
- Hide camera status indicator when disconnected (cleaner UI)
- Prevent attempts to send frames to disconnected server
- Clean interval cleanup to avoid memory leaks

Ensures camera streaming gracefully handles server disconnections
with proper resource management and clear user feedback.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Refactor camera system from continuous streaming to request-based capture to improve resource efficiency and provide better control. Add programmatic camera access API with visual status indicators and enhanced example demonstrating both single capture and continuous burst modes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update example to demonstrate basic continuous capture usage. Add camera stabilization delay to reduce initialization issues, though a race condition between camera enable and first capture request still exists and may require manual camera toggling to resolve.

Known issue: Camera may fail initial capture attempts due to timing between enable and ready state.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replace DOM event-based communication with centralized GuiState management for camera functionality. This ensures consistent state synchronization across all camera-related components.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replace callback-based frame capture with useEffect pattern for better reactivity. Simplifies component logic by automatically responding to camera request changes through GuiState.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Replace Future-based camera frame capture with simpler event-driven pattern using threading.Event. Improves reliability and reduces complexity in the camera capture flow.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Clean up unused imports, callbacks, and error handling. Update example to start with camera enabled and handle null returns properly without try/catch blocks.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Clean up legacy camera streaming callback system that was replaced by the new GuiState-based approach. Removes unused imports, handlers, and callback management code.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Simplify camera API by removing format parameter from both request and response messages. All camera frames now use JPEG format by default, reducing API complexity while maintaining functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
… to configuration

- Remove max_resolution parameter from capture_frame() - cameras now use natural resolution
- Move facing_mode from frame requests to configure_camera_access() for one-time setup
- Simplify CameraFrameRequestMessage to only contain request_id
- Update example to configure camera once and capture frames with no parameters

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Fix callback parameter in camera example
- Move CameraStream component to better location in component tree
- Simplify camera ready state management
- Remove unused cameraFacingMode reference
- Make webcam visible for debugging

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
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.

2 participants