mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Clear now playing info when play back is stopped
This commit is contained in:
parent
4087ff35d6
commit
cdd5ba7417
1 changed files with 5 additions and 0 deletions
|
|
@ -41,6 +41,7 @@ public class AudioSession: ObservableObject {
|
|||
|
||||
public func stop() {
|
||||
player?.stop()
|
||||
clearNowPlayingInfo()
|
||||
timer = nil
|
||||
player = nil
|
||||
item = nil
|
||||
|
|
@ -114,6 +115,10 @@ public class AudioSession: ObservableObject {
|
|||
}
|
||||
}
|
||||
|
||||
func clearNowPlayingInfo() {
|
||||
MPNowPlayingInfoCenter.default().nowPlayingInfo = [:]
|
||||
}
|
||||
|
||||
func setupRemoteControl() {
|
||||
UIApplication.shared.beginReceivingRemoteControlEvents()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue