Optimize MapboxSpeechPlayer so it reuses a single instance of MediaPlayer
Right now, MapboxSpeechPlayer creates a new MediaPlayer for every instruction. Ideally it would reuse the same instance, though there are state issues to work around.
@JunDai is this something we'd like to consider for 1.0?
cc @abhishek1508
@JunDai Do we still have this issue in 1.0. I think it's fixed Please confirm.
no, it's still an issue at 1.0. I tried to use a single instance of MediaPlayer before, I have seen issues which I can't remember though.
Given it's working normally and it's only an enhancement, I would prefer to defer this. Not in 1.0 release.
cc: @Guardiola31337 / @abhishek1508
MediaPlayer docs suggest the opposite https://developer.android.com/guide/topics/media/mediaplayer#releaseplayer
Closing here as not necessary.
cc @LukasPaczos