Fixed closePlayback

This commit is contained in:
Rasmus Krämer 2022-04-18 12:11:29 +02:00
parent 13665af0ed
commit 2f8e30accb
No known key found for this signature in database
GPG key ID: EC9E510611BFDAA2
6 changed files with 16 additions and 17 deletions

View file

@ -74,10 +74,9 @@ class AudioPlayer: NSObject {
print(error)
}
// DispatchQueue.main.sync {
DispatchQueue.main.sync {
UIApplication.shared.endReceivingRemoteControlEvents()
// }
}
NotificationCenter.default.post(name: NSNotification.Name(PlayerEvents.closed.rawValue), object: nil)
}
@ -166,7 +165,6 @@ class AudioPlayer: NSObject {
"Authorization": "Bearer \(Store.serverConfig!.token)"
]
debugPrint(activeAudioTrack)
return AVURLAsset(url: URL(string: "\(Store.serverConfig!.address)\(activeAudioTrack.contentUrl)")!, options: ["AVURLAssetHTTPHeaderFieldsKey": headers])
}
private func initAudioSession() {