Enhancing the *Skip To Previous* Functionality in Web API

The Skip To Previous feature in the Spotify Web API exhibits ambiguous behavior. The POST method on the /me/player/previous endpoint behaves inconsistently. The expected outcome is to transition to the previous track. However, if the current track has been playing for an unspecified duration – roughly a few seconds (not mentioned in a documentation) – the method acts differently. This inconsistency constitutes a clear flaw in design. The functionality to restart the current track should be in a separate endpoint.

Furthermore, there is no definitive workaround for this issue. Two potential approaches might be considered:

  1. Assuming a specific playback duration after which the method should be called once, and twice after that duration. The exact second for this transition is not specified in the documentation, and the response time of the API call is uncertain.
  2. Executing the method and then checking through a separate query if the track name has changed. Again, the timing of when the API updates the track name is unknown, and the duration of API requests is variable.

A potential solution could be to return some information in the response indicating whether the track position was reset or the track itself was changed. Another backward-compatible solution might involve the option to pass a parameter enforcing the change of track.

Child Item
Status: None
Child Item
Child Item
Child Item

Comments

Child Item
Child Item