From f083f95e36e85778d939cb915fb54b6adf0ad303 Mon Sep 17 00:00:00 2001 From: Joshua Owolabi Date: Sun, 20 Oct 2024 12:48:11 +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 693581c1345..41328be1126 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 @@ -150,7 +150,9 @@ internal class StreamMediaPlayer( mediaPlayer.isSpeedSettable() ) { playingSpeed = newSpeed - mediaPlayer.speed = newSpeed + if (playerState == PlayerState.PLAYING) { + mediaPlayer.speed = newSpeed + } publishSpeed(currentAudioHash, newSpeed) } }