Search code examples
ios7seekbaraudio-playermpnowplayinginfocentercontrol-center

How to change the current position of a track on iOS 7 control center?


I have a player in an IOS app with a custom player inside this one.

And when I'm seeking for a new position from the app, the current position in control center keep moving but does not jump to the new position.

I don't found a property to set in the MPNowPlayingInfoCenter.


Solution

  • have a look at the additional metadata properties:

    https://developer.apple.com/library/ios/documentation/mediaplayer/reference/MPNowPlayingInfoCenter_Class/Reference/Reference.html#//apple_ref/doc/constant_group/Additional_Metadata_Properties

    MPNowPlayingInfoPropertyElapsedPlaybackTime is what you are searching for