1

The idea isn't so much providing information to the user in the lock screen (see How to set current playback duration and elapsed time on iOS 7 lockscreen? for that) but rather I want my app to read the playback position in seconds, then if that value is above a certain threshold skip back by that threshold. If it's less than that threshold and the current track is in a playlist queue, determine the length of the previous track in the queue, and go back to that track, setting playback position to:

position = last.length - threshold + last_position

Where last is the previous track and last_position is the playback position in the track which was playing when the event occurred.

I'm using the Model / ControllerView spec for my app so I have my UIEvents trapped in the Controller. I just can't quite grasp how I get the current playback position. How would I capture a reference to the MPNowPlayingInfoCenter? I'm writing in Objective-C.

Community
  • 1
  • 1
TimeHorse
  • 510
  • 3
  • 14

0 Answers0