EspoirX / StarrySky

🔥A Powerful and Streamline MusicLibrary(一个丰富的音乐播放封装库,支持多种音频格式,完美解决你的问题。)
https://github.com/EspoirX/StarrySky
MIT License
1.39k stars 210 forks source link

Playlist stops playing when run in the background #166

Closed dovahkrid closed 3 years ago

dovahkrid commented 4 years ago

The whole MediaSessionConnection seems doesn't work when the app plays in the background after a few songs. The nowPlaying won't update, so mediaHasChanged in ExoPlayback will be false and the music stop.

MediaSessionConnection will "revive" when the app is opened again, but it's already late.

dovahkrid commented 4 years ago

1 more issue: The players stop switching new song when the screen turned off after a few songs. It plays again when turn on the screen (unlock not required). This only happens on Android 9 Pie.

EspoirX commented 3 years ago

Please use the latest version