mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Dont fully close audio player on error
This gives users the ability to change the selected language if the error was related to language / voice.
This commit is contained in:
parent
983e15bdda
commit
3e4f9409df
2 changed files with 6 additions and 2 deletions
|
|
@ -346,6 +346,10 @@
|
|||
if let itemAudioProperties = self.audioController.itemAudioProperties {
|
||||
playerContent(itemAudioProperties)
|
||||
.tint(.appGrayTextContrast)
|
||||
.alert("There was an error playing back your audio.",
|
||||
isPresented: $audioController.playbackError) {
|
||||
Button("Dismiss", role: .none) {}
|
||||
}
|
||||
} else {
|
||||
EmptyView()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@
|
|||
}
|
||||
|
||||
public func stopWithError() {
|
||||
stop()
|
||||
pause()
|
||||
playbackError = true
|
||||
}
|
||||
|
||||
|
|
@ -667,7 +667,7 @@
|
|||
@objc func fireTimer() {
|
||||
if let player = player {
|
||||
if player.error != nil || player.currentItem?.error != nil {
|
||||
stop()
|
||||
stopWithError()
|
||||
}
|
||||
|
||||
if let durations = durations {
|
||||
|
|
|
|||
Loading…
Reference in a new issue