diff --git a/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/ExpandedPlayer.swift b/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/ExpandedPlayer.swift index 61265e7ca..cd6271ef5 100644 --- a/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/ExpandedPlayer.swift +++ b/apple/OmnivoreKit/Sources/App/Views/AudioPlayer/ExpandedPlayer.swift @@ -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() } diff --git a/apple/OmnivoreKit/Sources/Services/AudioSession/AudioController.swift b/apple/OmnivoreKit/Sources/Services/AudioSession/AudioController.swift index e5a6e454c..065c01933 100644 --- a/apple/OmnivoreKit/Sources/Services/AudioSession/AudioController.swift +++ b/apple/OmnivoreKit/Sources/Services/AudioSession/AudioController.swift @@ -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 {