Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

Apple Script returns incorrect playback position if crossfade is enabled

Apple Script returns incorrect playback position if crossfade is enabled

Plan

Free/Premium

Country

India 

Device

M1 MacBook Air

Operating System

macOS Ventura.

 

My Question or Issue

The reported playback position from the Apple Script API is delayed by however many seconds of crossfade you have set, only when the song autoplayed or played next in queue without manual play button clicked (and hence the crossfade was utilized). 

 

Steps: 

1. Enable crossfade to 2 seconds.

2. Play a song till the ending

3. Query the playback position on apple script (it is accurate)

4. Queue a new song and wait for Spotify to automatically play the next song

5. Query the playback position on Apple Script (it is off by 2 seconds. It is 2 seconds higher than it should be)

 

If you pause the song and unpause, querying the apple script results in a correct playback position. Therefore for my project, I am publishing a help page that instructs users to disable crossfade, or I might incorporate a workaround to play/pause after every song change. I hope Spotify quickly fixes this.

 

Spotify Version: Spotify for macOS (Apple Silicon)
1.2.19.941.gbf202593

Reply
2 Replies

I would like to simply see a user's crossfade setting, to know how many seconds are being used for crossfading. This way, a secondary (and more accurate) playlist duration could be computed based on the user's crossfade preference.

Update: This occurs regardless of crossfade settings. This occurs whenever a song autoplays. I could be listening to an album and the next song could play once the current song is over. This induces lag within the playback position. The only solution is to play/pause. Horrible behaviour. My product which incorporates AppleScript to fetch the current playback position has been affected by this. 

 

Suggested posts