From d5c5541e64258cf9ea6c235b0775050d1c263e90 Mon Sep 17 00:00:00 2001 From: Joshua Owolabi Date: Sun, 20 Oct 2024 11:15:43 +0100 Subject: [PATCH] bug fix for Unable to set audio speed after pausing --- .../getstream/chat/android/client/audio/StreamAudioPlayer.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/audio/StreamAudioPlayer.kt b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/audio/StreamAudioPlayer.kt index cdc86ca3019..693581c1345 100644 --- a/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/audio/StreamAudioPlayer.kt +++ b/stream-chat-android-client/src/main/java/io/getstream/chat/android/client/audio/StreamAudioPlayer.kt @@ -146,7 +146,9 @@ internal class StreamMediaPlayer( currentSpeed + SPEED_INCREMENT } - if (playerState == PlayerState.PLAYING && mediaPlayer.isSpeedSettable()) { + if ((playerState == PlayerState.PLAYING || playerState == PlayerState.PAUSE) && + mediaPlayer.isSpeedSettable() + ) { playingSpeed = newSpeed mediaPlayer.speed = newSpeed publishSpeed(currentAudioHash, newSpeed)