stream-chat-swift
stream-chat-swift copied to clipboard
[Bug]: Voice recording doesnt stop sometimes when user plays an recording or opens an attachment
Actual behaviour
We have added custom code so that,
- Voice recording stops if user plays any already sent recordings
class HMECustomVoiceRecordingViewController: VoiceRecordingVC { override func audioPlayer(_ audioPlayer: any AudioPlaying, didUpdateContext context: AudioPlaybackContext) { if (content.state == .locked || content.state == .recording), context.state == .loading { self.audioRecorder.stopRecording() } super.audioPlayer(audioPlayer, didUpdateContext: context) } } - Or User opens any attachment
class HMECustomChatMessageListRouter: ChatMessageListRouter { weak var galleryShownDelegate: HMECoachChatShowGalleryDelegate? override func showGallery(message: StreamChat.ChatMessage, initialAttachmentId: AttachmentId, previews: [any GalleryItemPreview]) { super.showGallery(message: message, initialAttachmentId: initialAttachmentId, previews: previews) galleryShownDelegate?.galleryViewShown() } }
Expected behaviour
Recording has to be stopped
Steps to reproduce
1. Start recording
2. Open an attachment or play already sent recording
Note: This is an intermittent issue
Which packages are you using?
StreamChatUI
Which SDK version are you using?
4.77.0
Which iOS version is the issue reproducible?
18.4.1
Which iPhone Device is the issue reproducible?
iPhone 16
Which Xcode version are you using?
16.2
Hi @prateekrk, thank you for reporting. We'll review and update the issue when we have investigated and fixed this issue.
Best, Toomas