Repository navigation
Description
Please support publishing Android system playback audio as an independent audio track when screen sharing.
The Android SDK already exposes Track.Source.SCREEN_SHARE_AUDIO, but in the current release there does not appear to be a public API that captures Android system playback audio and publishes it as a separate LocalAudioTrack.
Current behavior
With LiveKit Android SDK 2.29.2, screen video sharing works correctly.
For system audio, the current workaround is to use ScreenAudioCapturer and attach it to the microphone track:
localAudioTrack.setAudioBufferCallback(screenAudioCapturer)
This mixes system playback audio into the microphone audio track.
As a result:
- Screen-share audio and microphone audio cannot be controlled independently.
- Muting the microphone may also affect the screen-share audio path.
- Remote participants cannot distinguish microphone audio from system playback audio.
- It is not possible to independently mute or subscribe to the two audio sources.
- Audio processing, volume control, and source-specific UI become difficult to implement.
Expected behavior
On Android 10 and above, the SDK should provide a supported API to:
- Capture system playback audio through MediaProjection and AudioPlaybackCaptureConfiguration.
- Publish the captured audio as a separate audio track.
- Use Track.Source.SCREEN_SHARE_AUDIO as the track source.
- Keep the microphone track independent from the screen-share audio track.
- Allow the microphone and screen-share audio to be muted or enabled independently.
- Automatically clean up the screen-share audio track when screen sharing stops.
- Gracefully report that system audio capture is unsupported on Android versions below API 29.
The exact API design is open to discussion. For example, it could be integrated into the existing screen-sharing API or exposed through a dedicated screen-share audio capturer and publishing API.
Example of the desired API behavior
localParticipant.setScreenShareEnabled(
enabled = true,
screenCaptureParams = params
)
localParticipant.setScreenShareAudioEnabled(true)
Or, alternatively, an API that allows the application to create and publish a dedicated track:
val screenAudioTrack = createScreenShareAudioTrack(...)
localParticipant.publishAudioTrack(
screenAudioTrack,
AudioTrackPublishOptions(source = Track.Source.SCREEN_SHARE_AUDIO)
)
The API example is only illustrative; the implementation details can follow the SDK's existing architecture.
Environment
- LiveKit Android SDK: 2.29.2
- Android API level: 29+
- Audio capture mechanism: MediaProjection + AudioPlaybackCaptureConfiguration
- Language: Java/Kotlin
Additional context
The Track.Source.SCREEN_SHARE_AUDIO enum already exists, but it does not currently appear to provide a complete Android capture and publishing path for system playback audio.
Is independent screen-share audio track support planned for the Android SDK? If not, would the LiveKit team consider adding it?
Thank you.
Activity
davidliu commentedon Nov 20, 2026
Due to technical limitations of the underlying libraries, it's unlikely we'll be able to do it for a while. This isn't currently planned for development though is an issue we're aware of.