Skip to content

feat: android screen share audio#55

Merged
Brazol merged 3 commits intomainfrom
chore/support-scree-share-audio
Dec 18, 2025
Merged

feat: android screen share audio#55
Brazol merged 3 commits intomainfrom
chore/support-scree-share-audio

Conversation

@Brazol
Copy link

@Brazol Brazol commented Dec 18, 2025

This PR adds support for screen sharing audio on Android by mixing the microphone audio with recorded screen audio.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for capturing and mixing screen audio with microphone audio during Android screen sharing. The implementation uses Android Q's (API 29+) AudioPlaybackCaptureConfiguration to capture system audio and mixes it with the microphone stream in real-time.

Key changes:

  • Introduces screen audio capture via ScreenAudioCapturer using MediaProjection
  • Implements PCM audio mixing with clipping in AudioBufferMixer
  • Integrates audio mixing into the WebRTC audio pipeline through the audio buffer callback

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
ScreenAudioCapturer.java New class to capture screen audio using AudioPlaybackCaptureConfiguration (Android Q+)
AudioBufferMixer.java New utility class to mix two PCM 16-bit audio buffers with clipping
OrientationAwareScreenCapturer.java Adds MediaProjection listener interface and improves lifecycle management with isStopping flag and defensive error handling
MethodCallHandlerImpl.java Integrates screen audio mixing by adding audio buffer callback and microphone mute detection
GetUserMediaImpl.java Manages screen audio capture lifecycle, parses includeAudio constraints, and coordinates with MediaProjection events

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Brazol Brazol merged commit 969a8fa into main Dec 18, 2025
9 checks passed
@Brazol Brazol deleted the chore/support-scree-share-audio branch December 18, 2025 15:08
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