mirror of
https://github.com/sudoxnym/audiobookshelf-atv.git
synced 2026-07-13 23:42:21 +00:00
Send metadata when app did become active
This commit is contained in:
parent
7a9f6ff2ca
commit
7fbc2dddbe
1 changed files with 3 additions and 0 deletions
|
|
@ -13,6 +13,9 @@ public class AbsAudioPlayer: CAPPlugin {
|
|||
override public func load() {
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(sendMetadata), name: NSNotification.Name(PlayerEvents.update.rawValue), object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(sendPlaybackClosedEvent), name: NSNotification.Name(PlayerEvents.closed.rawValue), object: nil)
|
||||
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(sendMetadata), name: UIApplication.didBecomeActiveNotification, object: nil)
|
||||
NotificationCenter.default.addObserver(self, selector: #selector(sendMetadata), name: UIApplication.willEnterForegroundNotification, object: nil)
|
||||
}
|
||||
|
||||
@objc func prepareLibraryItem(_ call: CAPPluginCall) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue