stream-chat-swift icon indicating copy to clipboard operation
stream-chat-swift copied to clipboard

[Bug]: Voice recording doesnt stop sometimes when user plays an recording or opens an attachment

Open prateekrk opened this issue 6 months ago • 1 comments

Actual behaviour

We have added custom code so that,

  1. 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) } }
  2. Or User opens any attachmentclass 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

prateekrk avatar May 26 '25 05:05 prateekrk

Hi @prateekrk, thank you for reporting. We'll review and update the issue when we have investigated and fixed this issue.

Best, Toomas

laevandus avatar May 27 '25 09:05 laevandus