We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
现在当前播放的数据是只有一个实例:
private PlayingMusic mCurrentPlay = new PlayingMusic("00:00", "00:00");
但是当切换歌曲时,只是更换了部分播放数据:
public void setChangingPlayingMusic(boolean changingPlayingMusic) { mIsChangingPlayingMusic = changingPlayingMusic; if (mIsChangingPlayingMusic) { ... mCurrentPlay.setBaseInfo(mPlayingInfoManager.getMusicAlbum(), getCurrentPlayingMusic()); .... } } public void setBaseInfo(B musicAlbum, M music) { //要用当前实际播放的列表,因为不同模式存在不同的播放列表 this.title = music.getTitle(); this.summary = musicAlbum.getSummary(); this.albumId = musicAlbum.getAlbumId(); this.musicId = music.getMusicId(); this.img = music.getCoverImg(); this.artist = (A) music.getArtist(); this.music = music; }
这个时候的播放进度和时间是没有被重置的,分发当前播放音乐消息时会把上一首的播放数据也带过去,造成数据污染, 建议在更换歌曲时重置一下播放进度和时间:
public void setChangingPlayingMusic(boolean changingPlayingMusic) { mIsChangingPlayingMusic = changingPlayingMusic; if (mIsChangingPlayingMusic) { // 重置播放时间和进度数据 mCurrentPlay.setNowTime("00:00"); mCurrentPlay.setAllTime("00:00"); mCurrentPlay.setPlayerPosition(0); mCurrentPlay.setDuration(0); mCurrentPlay.setBaseInfo(mPlayingInfoManager.getMusicAlbum(), getCurrentPlayingMusic()); .... } }
The text was updated successfully, but these errors were encountered:
感谢反馈
Sorry, something went wrong.
开源非吾一人战斗,我们希望每位有效贡献者皆可出现在 contributions 名单。 本 issue 具实用性,可否邀您 fork & pull request,我看到则予以处理。
已PR,格式化了一下代码。
No branches or pull requests
现在当前播放的数据是只有一个实例:
但是当切换歌曲时,只是更换了部分播放数据:
这个时候的播放进度和时间是没有被重置的,分发当前播放音乐消息时会把上一首的播放数据也带过去,造成数据污染,
建议在更换歌曲时重置一下播放进度和时间:
The text was updated successfully, but these errors were encountered: