Sync local progress with server progress

This commit is contained in:
ronaldheft
2022-08-12 23:11:09 -04:00
parent 8d38f3358e
commit ef661bba37
6 changed files with 89 additions and 26 deletions
+6
View File
@@ -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)
}