mapbox-navigation-android icon indicating copy to clipboard operation
mapbox-navigation-android copied to clipboard

Optimize MapboxSpeechPlayer so it reuses a single instance of MediaPlayer

Open devotaaabel opened this issue 8 years ago • 4 comments

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.

devotaaabel avatar Apr 04 '18 15:04 devotaaabel

@JunDai is this something we'd like to consider for 1.0?

cc @abhishek1508

Guardiola31337 avatar Jul 08 '20 14:07 Guardiola31337

@JunDai Do we still have this issue in 1.0. I think it's fixed Please confirm.

abhishek1508 avatar Jul 14 '20 19:07 abhishek1508

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

JunDai avatar Jul 15 '20 17:07 JunDai

MediaPlayer docs suggest the opposite https://developer.android.com/guide/topics/media/mediaplayer#releaseplayer

Closing here as not necessary.

cc @LukasPaczos

Guardiola31337 avatar Feb 11 '21 17:02 Guardiola31337