From 9225e95ee4eba356930984fd9a1f1ad78aed96b6 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) } }