Claude/fix cs2 overlay camera 013 uw sb3 xtxj cw5 f re8 zdjq t#47
Open
Temirlaaan wants to merge 5 commits intoJohnTimmermann:mainfrom
Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.