Sync player session with server media progress

This commit is contained in:
ronaldheft
2022-08-18 17:08:41 -04:00
parent 519969eee0
commit 5fd3f3c080
3 changed files with 51 additions and 0 deletions
+1
View File
@@ -40,6 +40,7 @@ public class AbsAudioPlayer: CAPPlugin {
let activeSession = try Realm().objects(PlaybackSession.self).where({ $0.isActiveSession == true }).last
if let activeSession = activeSession {
try self.startPlaybackSession(activeSession, playWhenReady: false)
PlayerHandler.syncServerProgressDuringPause()
}
} catch {
NSLog("Failed to restore playback session")