Convert PlayerHandler to shared instance

This commit is contained in:
ronaldheft
2022-08-21 12:06:37 -04:00
parent fca0fd7bbb
commit 27d2ed2304
3 changed files with 13 additions and 11 deletions
+1 -1
View File
@@ -40,7 +40,7 @@ public class AbsAudioPlayer: CAPPlugin {
// Fetch the most recent active session
let activeSession = try await Realm().objects(PlaybackSession.self).where({ $0.isActiveSession == true }).last
if let activeSession = activeSession {
await PlayerProgress.syncFromServer()
await PlayerProgress.shared.syncFromServer()
try self.startPlaybackSession(activeSession, playWhenReady: false, playbackRate: PlayerSettings.main().playbackRate)
}
} catch {