mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-27 05:43:58 +02:00
Sync local progress with server progress
This commit is contained in:
@@ -179,12 +179,17 @@ public class AbsAudioPlayer: CAPPlugin {
|
||||
"value": PlayerHandler.getCurrentTime()
|
||||
])
|
||||
}
|
||||
|
||||
@objc func sendSleepTimerSet() {
|
||||
self.notifyListeners("onSleepTimerSet", data: [
|
||||
"value": PlayerHandler.remainingSleepTime
|
||||
])
|
||||
}
|
||||
|
||||
@objc func onLocalMediaProgressUpdate(_ localMediaProgress: [String: Any]) {
|
||||
self.notifyListeners("onLocalMediaProgressUpdate", data: localMediaProgress)
|
||||
}
|
||||
|
||||
@objc func onPlaybackFailed() {
|
||||
if (PlayerHandler.getPlayMethod() == PlayMethod.directplay.rawValue) {
|
||||
let playbackSession = PlayerHandler.getPlaybackSession()
|
||||
@@ -219,6 +224,7 @@ public class AbsAudioPlayer: CAPPlugin {
|
||||
"playWhenReady": playWhenReady,
|
||||
])
|
||||
}
|
||||
|
||||
@objc func sendPlaybackSession(session: [String: Any]) {
|
||||
self.notifyListeners("onPlaybackSession", data: session)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user