Execute callback on prepare

This commit is contained in:
Naveen 2023-08-27 23:20:13 +05:30
parent a096825f0c
commit 92400516e7
No known key found for this signature in database
GPG key ID: 0E155DAD31671DA3

View file

@ -58,6 +58,7 @@ fun MediaController.maybePreparePlayer(context: Context, callback: (success: Boo
context.audioHelper.getAllQueuedTracksLazily { tracks, startIndex, startPositionMs ->
if (!prepared) {
prepareUsingTracks(tracks = tracks, startIndex = startIndex, startPosition = startPositionMs) {
callback(it)
prepared = it
}
} else {