问题
I have a play service that is playing audio in background task. I am letting MediaController control the playback of the audio in a "player window" which handles the playback UI.
All works fine except then the song gets to the end. The player does not "reset" as I would like it to. I want the progress bar to return to 0 and the pause/play button to revert back to play.
I can get the progress bar to return to 0 with a call to mediaPlayer.seekTo(0); How do I get the MediaController to reset the pause/play button back to show the play button?
回答1:
So it turns out that show(0) after the audio has ended, re-displays the UI correctly. Thanks Cylon for the help!
来源:https://stackoverflow.com/questions/32673246/android-mediacontroller-end-of-song