mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
Be able to pause the playback when it is buffering
This commit is contained in:
+4
-2
@@ -137,6 +137,9 @@ class VoiceBroadcastPlaybackViewModel: VoiceBroadcastPlaybackViewModelType, Voic
|
||||
|
||||
if let audioPlayer = audioPlayer, audioPlayer.isPlaying {
|
||||
audioPlayer.pause()
|
||||
} else {
|
||||
state.playbackState = .paused
|
||||
state.playingState.isLive = false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -380,8 +383,7 @@ extension VoiceBroadcastPlaybackViewModel: VoiceBroadcastAggregatorDelegate {
|
||||
|
||||
updateDuration()
|
||||
|
||||
if state.playbackState != .stopped {
|
||||
handleVoiceBroadcastChunksProcessing()
|
||||
if state.playbackState != .stopped, (state.playbackState != .paused && isActuallyPaused == true) { handleVoiceBroadcastChunksProcessing()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user