-
Notifications
You must be signed in to change notification settings - Fork 792
GUACAMOLE-1415: RDP Camera Redirection (RDPECAM) - Client Implementation #1124
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
base: main
Are you sure you want to change the base?
Conversation
Add core camera recording and H.264 video processing utilities that provide the foundation for camera redirection features. Components: - CameraRecorder.js: Abstract camera recorder with H.264 encoding - H264AnnexBUtil.js: Utilities for H.264 Annex-B format processing - H264AnnexBUtilSpec.js: Unit tests for H.264 utilities This foundation is reusable and not specific to RDPECAM, providing a general-purpose camera recording API for Guacamole clients.
Add complete RDPECAM service implementation for browser-side camera redirection with audio/video synchronization support. Features: - RDPECAM service with capability negotiation and camera streaming - Video delay adjustment (0-1000ms) for A/V synchronization - Keyboard shortcuts (Ctrl+Alt+Shift+Up/Down) for delay control - Visual notifications for delay adjustments - localStorage persistence for delay settings The video delay feature addresses audio/video synchronization issues where video may arrive faster than audio in video calls. Users can manually adjust the delay using keyboard shortcuts to achieve perceptual synchronization.
Add UI integration for camera redirection controls and state management. This connects the RDPECAM service with the client interface. Changes: - Add camera state management in clientController - Add video delay notification display in templates - Update ManagedClient types for camera support - Handle camera start/stop events and focus changes This provides the user-facing interface for camera redirection and video delay adjustment features.
Add protocol configuration and Client.js updates to enable RDPECAM camera redirection support. Changes: - Add RDPECAM mimetype and configuration to rdp.json - Update Client.js to support RDPECAM video streams This completes the configuration layer that enables the RDPECAM feature to be recognized and used by the Guacamole client.
…es for RDP camera redirection
…for RDPECAM - Add Promise catch handlers for enumerateDevices() and Promise.all() in prefetchCapabilities() - Add catch handler for startCameraWithParams() in ManagedClient.js - Error handlers log errors and maintain consistent state - Add missing JSDoc comments for getLocalClientId(), capabilitySupportsValue(), and deriveFormatsFromCapabilities() - Prevents unhandled promise rejections and improves code documentation
- Change "● In Use" to "In Use" for consistency - Indicator remains green via existing CSS styling
|
As you will realize, this PR have been mostly using AI Coding. While exploring agentic AI programming, I wanted to do something actually useful and It can out pretty good. |
Thanks for letting us know this - the Apache Software Foundation has some governance around using AI-generated code, so I'm going to rely on @mike-jumper to provide guidance on that. Also, the PR title needs to be changed to match the format of the commit messages: |
Note: This PR works in conjunction with the corresponding guacamole-server PR for complete camera redirection functionality.
Overview
This PR implements client-side support for RDP Camera Redirection using the MS-RDPECAM protocol. This enables web browsers to stream local camera video (H.264-encoded) through Apache Guacamole to remote Windows sessions, with features including per-camera selection, persistent preferences, and audio/video synchronization controls.
Problem Statement
Users connecting to remote Windows desktops need seamless access to their local cameras for video conferencing, authentication, and other applications. This client-side implementation provides the browser-based camera capture, H.264 encoding, and user interface necessary to stream camera data to the guacamole-server RDPECAM implementation.
Technical Implementation
1. Camera Recording Foundation (
07db985b4)Generic, reusable camera recording infrastructure in
guacamole-common-js/src/main/webapp/modules/:CameraRecorder.js- Abstract Camera RecorderCore recording engine with H.264 encoding:
Key Features:
navigator.mediaDevices.enumerateDevices()Design Philosophy:
H264AnnexBUtil.js- H.264 Processing UtilitiesLow-level H.264 Annex-B format utilities:
Capabilities:
0x00000001,0x000001)Use Case:
Essential for processing MediaRecorder output into proper H.264 frames for transmission via Guacamole protocol.
2. RDPECAM Service (
6efbab318)Complete RDPECAM protocol implementation in
guacamole/src/main/frontend/src/app/client/services/:guacRDPECAM.js- RDPECAM ServiceThe centerpiece of the client implementation, providing:
Core Protocol Features:
Capability Negotiation:
Camera Lifecycle Management:
Stream Management:
Video Delay Synchronization Feature:
Addresses audio/video synchronization issues in remote video calls:
Problem: Video frames may arrive faster than audio, causing lip-sync issues in video conferencing applications.
Solution: Configurable video delay (0-1000ms) that buffers outgoing video frames.
Features:
3. UI Integration (
07966fc90,d68ad85f8)User interface for camera control in
guacamole/src/main/frontend/src/app/client/:clientController.js(165 new lines)AngularJS controller integration:
Camera State Management:
client.html(58 lines modified)Template updates for camera controls:
Camera Selection Dropdown:
Status Indicators:
Video Delay Display:
ManagedClient.js(69 lines modified)Service Integration:
4. Configuration Support (
c59f1b9a5)extensions/guacamole-auth-json/protocols/rdp.jsonProtocol configuration additions
Purpose:
guacamole-common-js/src/main/webapp/modules/Client.jsCore client updates for video streaming:
Video Instruction Handler:
Stream Management:
5. Preference Persistence (
preferenceService.jsmodifications)Camera selection persistence:
Benefits:
6. Polish and Refinements
Error Handling (
6839eadcb)enumerateDevices()failuresgetUserMedia()denialsKey Features
For End Users
✅ Zero installation - Works entirely in browser, no plugins
✅ Camera selection - Choose from multiple cameras if available
✅ Persistent preferences - Remember camera choice per connection
✅ Visual feedback - Clear indicators for camera status
✅ A/V sync control - Adjust video delay for lip-sync (0-1000ms)
✅ Real-time switching - Change cameras without reconnecting
Technical Capabilities
Browser Compatibility
Requirements
Tested Browsers
Known Limitations
Security Considerations
Ready for review and merge.