mantou132 / Spotify-Lyrics

🎉 Desktop Spotify Web Player Instant Synchronised Lyrics
https://microsoftedge.microsoft.com/addons/detail/spotify-lyrics/aiehldpoaeaidnljjimhbojpblkbembm
843 stars 53 forks source link

Lyrics will not reload when playing the same song in different playlists #48

Closed mantou132 closed 3 years ago

mantou132 commented 3 years ago
// when next track
audio.addEventListener('emptied', () => {
  sharedData.resetData();
});

But the music information has not changed and updateTrack has not been triggered

mantou132 commented 3 years ago

The emptied event is triggered when the next track is clicked, at this moment:

audio.currentTime === 0;
isNaN(audio.duration)

Just judge audio.duration when rendering lyrics.