Fixed issue with looping between Spotify and Loopify on auth.

Built out webAPI object to get access token and track data, and update the PlayheadNavigation view.

Tomorrow:

  • send a position to the IOScontroller when position is updated. (Does this get called with the button, or when the PlayheadNavigation State object gets updated?
  • Add TODO: items from this document to comments so that they are all in one place.
  • Subscribe to SPTAppRemotePlayerState and link it to the play head (using a Combine Publisher)

TODO: it’s a bit weird authorising the IOS app automatically and having it start playing right away, so if there’s no way to avoid playing automatically, add a sync button that needs pressing so auth isn’t automatic (to work well this should probably store the authentication state persistently if there’s any chance that it could stay connected for any period of time).

TODO: the v1.0 paradigm is to let Spotify handle searching and navigation:

  • Play a song in Spotify
  • Use Loopify to make a loop
    • Setting repeat1 on the track and storing the current repeat value to be released when the app loses focus But in the future, if there is a search/navigation function, this probably needs to go through the web API, which probably should use Peter Schorn’s API, and I’ll need to really figure out how it/Combine works.

Tags:

Categories:

Updated: