Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/friendly-planes-dance.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/screen-audio-capturer-projection-loss.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/screen-capture-connection-bind-leak.md

This file was deleted.

14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# client-sdk-android

## 2.27.1

### Patch Changes

- Add SDK size documentation to README explaining multi-architecture native libraries and how to measure actual size impact - [#981](https://github.com/livekit/client-sdk-android/pull/981) ([@xianshijing-lk](https://github.com/xianshijing-lk))

- Fix `ScreenAudioCapturer` crashing the audio thread when its `MediaProjection` is revoked (for example via the system "stop sharing" chip) before the first microphone buffer arrives. `initAudioRecord` now returns false when the `AudioRecord` cannot be created instead of throwing inside WebRTC's audio record thread, where an unhandled exception kills the process; only `startRecording()` was guarded before. `AudioRecord.read` failures are also handled now: the return value was ignored, so once the projection died the buffer's stale contents (the last captured frame) were mixed into the microphone track on every callback, an audible loop until the callback was detached. On a read error the capturer releases its `AudioRecord` and degrades to mic-only audio. - [#982](https://github.com/livekit/client-sdk-android/pull/982) ([@adrian-niculescu](https://github.com/adrian-niculescu))

`releaseAudioResources` is also safe to call while `initAudioRecord` is still running. It runs on the app's thread while init runs on the audio record thread, and it used to observe a null `audioRecord` and do nothing, so the recorder that init went on to publish stayed running until finalization. Leaked recorders hold the playback capture input open, and later capture attempts fail once enough of them accumulate.

- Fix `ScreenCaptureService` staying bound when screen share setup is cancelled. `ScreenCaptureConnection` recorded a binding only once `onServiceConnected` arrived, so a coroutine cancelled before `connect()` returned left the `ServiceConnection` registered, and `BIND_AUTO_CREATE` kept the service alive for the lifetime of the context. `LocalParticipant.setScreenShareEnabled` awaits the bind internally and abandons the track it just created if cancelled, so nothing reached `stop()` on that path. A cancelled connect now releases the binding itself once no caller is left waiting on it, and `stop()` unbinds on the same wider condition. Callers stay tracked until `connect()` actually returns, so a cancellation landing after the service connected but before the caller resumed releases the binding too. This also covers the documented case where `bindService` leaves a connection registered while reporting failure or throwing. - [#983](https://github.com/livekit/client-sdk-android/pull/983) ([@adrian-niculescu](https://github.com/adrian-niculescu))

Two paths that could leave `connect()` suspended forever are fixed as well. `stop()` racing a connect no longer strands the caller, since requesting the bind and registering the waiter now happen under one lock, and a failed `bindService` no longer leaves the state claiming a bind is in flight for the next caller to wait on.

## 2.27.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ LiveKit for Android is available as a Maven package.
```groovy title="build.gradle"
...
dependencies {
def livekit_version = "2.27.0"
def livekit_version = "2.27.1"
implementation "io.livekit:livekit-android:$livekit_version"
Expand All @@ -59,7 +59,7 @@ dependencies {
implementation "io.livekit:livekit-android-track-processors:$livekit_version"
// Snapshots of the latest development version are available at:
// implementation "io.livekit:livekit-android:2.27.1-SNAPSHOT"
// implementation "io.livekit:livekit-android:2.27.2-SNAPSHOT"
}
```

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ kapt.use.worker.api=true
###############################################################

GROUP=io.livekit
VERSION_NAME=2.27.0
VERSION_NAME=2.27.1

POM_DESCRIPTION=LiveKit Android SDK, WebRTC Rooms

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "client-sdk-android",
"version": "2.27.0",
"version": "2.27.1",
"repository": "https://github.com/livekit/client-sdk-android.git",
"license": "Apache License 2.0",
"private": true,
Expand Down