Detect the end of the current track and the loading of the new track