Releases: livekit/client-sdk-android
v2.10.0
Minor Changes
Custom Audio
The 2.10.0 release adds support for custom audio. Audio can be mixed into the existing LocalAudioTrack
by using LocalAudioTrack.setAudioBufferCallback
. This callback will be passed the audio buffer, which can be modified to add in new custom audio (audio processing such as noise/echo cancellation should continue to use the Room.AudioProcessingController
).
To aid in mixing custom audio, a helper class MixerAudioBufferCallback
is provided, which will handle combining the custom audio with the microphone audio. To use, subclass the MixerAudioBufferCallback
and override onBufferRequest
to pass back the custom audio buffers when requested.
Screen Share Audio Capture
Along with the custom audio support, screen share audio capture is supported as well. We've implemented a ScreenAudioCapturer
which will handle grabbing the audio during a screen share session. This can then be passed to LocalAudioTrack.setAudioBufferCallback
to publish the audio.
val audioCapturer = ScreenAudioCapturer.createFromScreenShareTrack(screenCaptureTrack) ?: return
audioCapturer.gain = 0.2f // Adjust the volume as needed so that the microphone can still be heard.
audioTrack.setAudioBufferCallback(audioCapturer)
Foreground service
Note that on Android 14 onwards, a MICROPHONE
foreground service is required to capture audio in the background, which will affect the screen capture audio.
Cleanup
When done with the screen capture, you should call releaseAudioResources
on the capturer to avoid any memory leaks.
Example
Example code that publishes a screenshare with its audio can be found here.
v2.9.0
v2.8.1
v2.8.0
v2.7.1
v2.7.0
What's Changed
- Add support for participant attributes by @davidliu in #468
- Support setting attributes from local participant by @davidliu in #470
- Fix deadlock caused by multiple concurrent setCameraEnabled calls by @davidliu in #472
- Add RoomEvent.ParticipantAttributesChanged by @davidliu in #473
Full Changelog: v2.6.0...v2.7.0
v2.6.0
What's Changed
- Fix log level order by @davidliu in #452
- Add TranscriptionReceived event to track publication by @davidliu in #449
- Signal local audio track feature updates by @davidliu in #456
- Have EventListenable.collect return Nothing by @davidliu in #458
- Implement RegionUrlProvider and Room.prepareConnection by @davidliu in #463
- Call
Room.prepareConnection
if you know your server url beforehand to speed up the initial connection.
- Call
- Handle new LeaveRequest protocol by @davidliu in #464
- Listen directly to connectionState changes instead of polling by @davidliu in #465
- Update libwebrtc to 125.6422.04 by @davidliu in #466
- Fixes a crash relating to NetworkMonitor when disconnecting the Room object.
- Fixes the mic indicator not disappearing when muted.
Full Changelog: v2.5.0...v2.6.0