Skip to content

Claude/fix cs2 overlay camera 013 uw sb3 xtxj cw5 f re8 zdjq t#47

Open
Temirlaaan wants to merge 5 commits intoJohnTimmermann:mainfrom
Temirlaaan:claude/fix-cs2-overlay-camera-013UwSb3XTXJCw5FRe8ZdjqT
Open

Claude/fix cs2 overlay camera 013 uw sb3 xtxj cw5 f re8 zdjq t#47
Temirlaaan wants to merge 5 commits intoJohnTimmermann:mainfrom
Temirlaaan:claude/fix-cs2-overlay-camera-013UwSb3XTXJCw5FRe8ZdjqT

Conversation

@Temirlaaan
Copy link

No description provided.

claude and others added 5 commits December 4, 2025 19:10
This commit adds comprehensive webcam functionality to the HUD overlay with full admin panel configuration.

## Backend Changes:
- Added webcam_settings table to SQLite database with default values
- Implemented cameras API (models, service, controller, routes)
- Added GET /api/camera/settings and PUT /api/camera/settings endpoints
- Added Electron media permissions for camera access in main.ts
- Implemented Socket.io event 'webcamSettingsUpdated' for real-time sync

## Frontend (Admin Panel):
- Created WebcamSettings component with full configuration UI
- Added settings to Settings page
- Support for:
  - Enable/disable webcam overlay
  - Camera device selection (enumerateDevices)
  - Position (X, Y) and size (width, height) controls
  - Border styling (radius, width, color)
  - Opacity control with slider
  - Z-index configuration

## HUD Integration:
- Created webcam.js overlay script with WebRTC implementation
- Added middleware to inject Socket.io and webcam script into HUD HTML
- Implemented drag-and-drop functionality for webcam positioning
- Real-time settings updates via Socket.io
- Graceful error handling for camera access issues
- Automatic cleanup on page unload

## Features:
- Live webcam preview in HUD overlay
- Drag-and-drop positioning
- Customizable appearance (size, border, opacity)
- Real-time configuration updates
- Device selection support
- Works in Electron overlay (not OBS Browser Source due to browser limitations)

All changes follow existing project patterns and code style.
…GUnZL6UM16g6c4KeYxG

feat: Add webcam overlay support to OpenHud
- Add hasShadow: false and backgroundColor: '#00000000' to HUD window
  for proper transparency when overlaying CS2
- Inject transparent background CSS styles into HUD HTML
- Improve media permission handlers to allow camera access in all windows
- Add setPermissionCheckHandler for synchronous permission checks
- Webcam now automatically positions itself over the observed player's
  avatar (.observed_container .avatar_holder) instead of fixed coordinates
- Camera follows the avatar position in real-time (updates every 100ms)
- Circular shape (border-radius: 50%) to match avatar style
- Camera is mirrored horizontally for natural selfie view
- Auto-hides when no player is being observed
- Add vdoNinjaUrl field to database schema with migration
- Update camera models, service to handle vdoNinjaUrl
- Add VDO.ninja URL input field in Settings UI
- Update webcam.js to support both VDO.ninja iframe and local camera
- VDO.ninja URL takes priority over local camera when set
- Webcam overlays on observed player's avatar position
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

Comments