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: 5 additions & 0 deletions .changeset/android-audioswitch-port.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@livekit/react-native': patch
---

Android: port AudioSwitchHandler improvements from client-sdk-android. Audio routing now runs on a dedicated background thread, uses the communication device API on Android 12+, fixes a race where a quick stop/start could leave audio stuck on the earpiece, and releases the audio session on React reload.
2 changes: 1 addition & 1 deletion android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ dependencies {
// noinspection GradleDynamicVersion
api 'com.facebook.react:react-native:+'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
api 'com.github.davidliu:audioswitch:89582c47c9a04c62f90aa5e57251af4800a62c9a'
api 'com.github.davidliu:audioswitch:039a35aefab7747c557242fa216c9ea11743b604'
api 'io.github.webrtc-sdk:android-prefixed:144.7559.15'
implementation "io.livekit:noise:2.0.0"
implementation project(':livekit_react-native-webrtc')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ class LivekitReactNativeModule(reactContext: ReactApplicationContext) : ReactCon
}

override fun invalidate() {
audioManager.stop()
LiveKitReactNative.invalidate(reactApplicationContext)
}
}
Loading
Loading