Do not use prepareAsync when player may be used in callback

This commit is contained in:
tomaThomas 2024-12-19 19:06:29 +01:00
parent 045e027edc
commit 31d318df19
No known key found for this signature in database
GPG key ID: DEE963DC84059108

View file

@ -140,7 +140,7 @@ abstract class LocalPlayback(val context: Context) : Playback, MediaPlayer.OnErr
player.setOnPreparedListener(null)
completion(true)
}
player.prepareAsync()
player.prepare()
} catch (e: Exception) {
completion(false)
e.printStackTrace()