Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ class NowPlayableObserver: ViewModel, MediaPlayerObserver {
if playbackRequestStateBeforeInterruption == .playing {
if options.contains(.shouldResume) {
manager?.setPlaybackRequestStatus(status: .playing)
manager?.proxy?.play()
} else {
manager?.setPlaybackRequestStatus(status: .paused)
}
Expand Down
8 changes: 2 additions & 6 deletions Shared/Services/Notifications.swift
Original file line number Diff line number Diff line change
Expand Up @@ -230,12 +230,8 @@ extension Notifications.Key {
else {
return nil
}
guard let optionsUInt = userInfo[AVAudioSessionInterruptionOptionKey] as? UInt
else {
return nil
}

let options = AVAudioSession.InterruptionOptions(rawValue: optionsUInt)
let options = (userInfo[AVAudioSessionInterruptionOptionKey] as? UInt)
.map(AVAudioSession.InterruptionOptions.init(rawValue:)) ?? []

return (type, options)
}
Expand Down
Loading