Skip to content

Commit

Permalink
Fix revert to earpiece bug
Browse files Browse the repository at this point in the history
  • Loading branch information
liviu-timar committed Sep 24, 2024
1 parent b7391b4 commit 9d9fae3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ class SpeakerManager(
fun setSpeakerPhone(enable: Boolean, defaultFallback: StreamAudioDevice? = null) {
microphoneManager.setup()
val devices = devices.value
val selectedBeforeSpeaker = selectedDevice.value
if (enable) {
val speaker = devices.filterIsInstance<StreamAudioDevice.Speakerphone>().firstOrNull()
selectedBeforeSpeaker = selectedDevice.value
_speakerPhoneEnabled.value = true
microphoneManager.select(speaker)
} else {
Expand Down

0 comments on commit 9d9fae3

Please sign in to comment.