简体   繁体   中英

Android MediaController End Of song

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?

So it turns out that show(0) after the audio has ended, re-displays the UI correctly. Thanks Cylon for the help!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM