-
Notifications
You must be signed in to change notification settings - Fork 136
Description
Description:
While testing on Meta Quest, I noticed that the app’s environmental audio stops whenever starting or stopping a stream while a VR application is running.
This issue does not occur when triggering the stream from the lobby — only when the app is already active.
More specifically:
- Ambient/environmental sounds from the app are cut off
- But subsequent sounds continue to play normally
At first, I suspected a bug in LiveKit. However, this appears to be expected Android behavior:
- When starting a screen capture, Android reroutes audio to a different audio bus for privacy reasons
- This process interrupts currently playing audio streams
Problem:
Android seems to pause or stop looping audio sources when this happens, which breaks continuous ambient sound playback in the app.
Expected behavior:
Ideally, audio loops should either:
- Resume automatically after the capture starts/stops, or
- Not be interrupted if possible
Questions / Discussion points:
- Is there a recommended way in the LiveKit Android SDK to handle audio focus changes during screen capture?
- Are there best practices to keep or restore looping audio after this interruption?
- Should the SDK expose hooks/events to better manage this scenario?
Environment:
- Device: Meta Quest (Android-based)
- Context: In-app streaming (screen capture)
- SDK: LiveKit Android Client SDK (2.23.5)
Additional notes:
This seems tied to Android’s privacy protections around screen/audio capture, but it has a noticeable UX impact on immersive applications relying on continuous ambient audio.