mirror of
https://github.com/cmclark00/RetroMusicPlayer.git
synced 2025-05-17 23:55:21 +01:00
Merge pull request #1705 from tomaThomas/fix-could-not-play-song
Do not use prepareAsync when player may be used in callback
This commit is contained in:
commit
394856e516
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ abstract class LocalPlayback(val context: Context) : Playback, MediaPlayer.OnErr
|
||||||
player.setOnPreparedListener(null)
|
player.setOnPreparedListener(null)
|
||||||
completion(true)
|
completion(true)
|
||||||
}
|
}
|
||||||
player.prepareAsync()
|
player.prepare()
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
completion(false)
|
completion(false)
|
||||||
e.printStackTrace()
|
e.printStackTrace()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue