mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Fix: Keep the progress indicator visible after pausing or scrubbing a voice message. (#1969)
This commit is contained in:
@@ -91,12 +91,15 @@ class VoiceMessageRecorder: VoiceMessageRecorderProtocol {
|
||||
return .failure(.previewNotAvailable)
|
||||
}
|
||||
|
||||
if await !previewAudioPlayerState.isAttached {
|
||||
await previewAudioPlayerState.attachAudioPlayer(audioPlayer)
|
||||
}
|
||||
|
||||
if audioPlayer.url == url {
|
||||
audioPlayer.play()
|
||||
return .success(())
|
||||
}
|
||||
|
||||
await previewAudioPlayerState.attachAudioPlayer(audioPlayer)
|
||||
let pendingMediaSource = MediaSourceProxy(url: url, mimeType: mp4accMimeType)
|
||||
audioPlayer.load(mediaSource: pendingMediaSource, using: url, autoplay: true)
|
||||
return .success(())
|
||||
|
||||
Reference in New Issue
Block a user