lijinke666 / react-music-player

[Stop the maintenance] :musical_note: Maybe the best beautiful HTML5 responsive player component for react :)
https://lijinke666.github.io/react-music-player/
MIT License
714 stars 210 forks source link

onAudioPlayTrackChange audioInfo is for previous track #405

Closed grahamlyus closed 2 years ago

grahamlyus commented 3 years ago

Version

react-jinke-music-player@4.24.1

Description

In the onAudioPlayTrackChange callback, audioInfo is for the previous track - shouldn't it be for the new track?

The callback is invoked using this.state value before the state is updated in the loadAudio callback. I think it should match the new track as in onPlayIndexChange

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.