3

I'm not able to pause the track.

both -playing property on SPSession & -setIsPlaying property on SPPlaybackMAnager already provides this functionality but it all cause to stop a song not pause the song.

What should I do to pause the running track?

Niru Mukund Shah
  • 4,637
  • 2
  • 20
  • 34

1 Answers1

7

Only use SPPlaybackManager's controls if you use it at all.

Set playing to false to pause playback, playing to true to resume. Please note that this is for playing Spotify music in your own application, not controlling the Spotify client.

See the "Simple Player" examples that come with CocoaLibSpotify to see how to do playback.

iKenndac
  • 18,730
  • 3
  • 35
  • 51
  • yes daniel, I've set playing property to false & to resume it again I've turn it to true. & it resumes the song from the starting not from the point from which I have paused. Same thing occurs for "Simple Player" example came with CocoaLibSpotify – Niru Mukund Shah Oct 13 '12 at 03:45
  • If you look at the code in Simple Player, it specifically starts the track again every time you push play. Don't call `playTrack:` when you resume, just set the `playing` property. – iKenndac Oct 13 '12 at 15:43
  • 1
    NOTE: It seems to be called `isPlaying`. – vaughan Nov 28 '13 at 14:00