Skip to content

Commit

Permalink
Cleanup of audio session only when voice recording is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmitrevski committed Jan 26, 2024
1 parent 4444626 commit 8a12cfc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

# Upcoming

### 🔄 Changed
### 🐞 Fixed
- Cleanup of audio session only when voice recording is enabled

# [4.47.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.47.0)
_January 09, 2024_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ open class ChatChannelViewModel: ObservableObject, MessagesDataSource {
}

private func cleanupAudioPlayer() {
guard utils.composerConfig.isVoiceRecordingEnabled else { return }
utils.audioPlayer.seek(to: 0)
utils.audioPlayer.updateRate(.normal)
utils.audioPlayer.stop()
Expand Down

0 comments on commit 8a12cfc

Please sign in to comment.