Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable audio scrubber in iOS Lock Screen control panel?

I have the following dictionary for MPNowPlayingInfoCenter

@{MPMediaItemPropertyAlbumTitle: @"First Title",
                                MPMediaItemPropertyArtwork: [[MPMediaItemArtwork alloc] initWithImage:[UIImage imageNamed:@"Album-Cover.jpg"]],
                                MPMediaItemPropertyPlaybackDuration:[NSNumber numberWithDouble:self.storyAudioPlayer.duration],
                                MPNowPlayingInfoPropertyElapsedPlaybackTime:[NSNumber numberWithDouble:self.storyAudioPlayer.currentTime],
                                MPNowPlayingInfoPropertyPlaybackRate:@1.0
                                }

Everything else is working fine but I can't seek songs using the slider. As shown in the image. What parameter am I missing?

Lock screen screenshot

like image 929
Ashish Awaghad Avatar asked Sep 22 '13 07:09

Ashish Awaghad


2 Answers

You can do it on iOS 9.1 and higher with help of MPRemoteCommandCenter and changePlaybackPositionCommand.

See my answer

like image 152
Neiman Aleksei Avatar answered Oct 18 '22 09:10

Neiman Aleksei


You can't. You could file a bug report to Apple so that they implement it someday.

EDIT: It's now possible to do it since iOS 9

like image 3
Felix Lapalme Avatar answered Oct 18 '22 11:10

Felix Lapalme