Questions tagged [mpnowplayinginfocenter]

This class displays song information, such as the title, the author, and the album cover, on the lock screen and in the multitasking bar.

146 questions
1
vote
1 answer

Set MPNowPlayingInfoCenter duration from AVPlayer?

I am trying to set MPNowPlayingInfoCenter, most of the key-value pairs work fine, but there is some kind of issue with playback time let mpic = MPNowPlayingInfoCenter.defaultCenter() mpic.nowPlayingInfo = [ …
longbow
  • 1,593
  • 1
  • 16
  • 39
1
vote
1 answer

App loses remote Control Inputs when setting MPNowPlayingInfoCenter

Derived from some other posts I was successfully able to get everything right for a music player. Last step would be to set MPNowPlayingInfoCenter values. Unfortunately as soon as I do this, the app loses capability to receive remoteControlEvents…
longbow
  • 1,593
  • 1
  • 16
  • 39
1
vote
0 answers

Creating an Apple Watch Music Remote App

I'm trying to create a music remote companion app on Apple Watch. According to Apple's documentation if you're using MPNowPlayingInfoCenter to show the now playing track on the lockscreen this should be synchronizing automatically to the apple watch…
Rimon
  • 178
  • 1
  • 10
1
vote
0 answers

MPNowPlayingInfoCenter customize times

I have an app with a continuous streaming. I want to know how to set the remaining time to 0:00 like tuneIn does, also how to set the playback duration for a continuous streaming on MPNowPlayingInfoCenter. Here is a screenshot of the TuneIn radio
Oscar J. Irun
  • 455
  • 5
  • 17
1
vote
1 answer

Lock Screen not respecting nowPlayingInfo dictionary

I'm trying to get my podcast app to display content in the lock screen, as well as respect the play/pause controls. Here is my code: - (void)playEpisodeAtIndex:(NSInteger)index { _currentIndex = index; TalkPodEpisode *episode =…
vsanthanam510
  • 360
  • 4
  • 14
1
vote
1 answer

iOS audio controls not working with singleton

I'm trying to use a class to manage a global AVAudioPlayer instance, but I can't get the lock screen controls to appear. The class subclasses UIResponder, but no matter what I try lock screen controls don't appear. Client classes use -…
Stefan Kendall
  • 66,414
  • 68
  • 253
  • 406
1
vote
1 answer

Swift. Receive remote control events to work with MPNowPLayingInfoCenter

As I understand, in order to show music player on lock screen, writing the following code is not enough. override func viewDidAppear(animated: Bool) { var mpic = MPNowPlayingInfoCenter.defaultCenter() mpic.nowPlayingInfo = [ …
Mega4alik
  • 597
  • 3
  • 10
  • 18
1
vote
0 answers

MPNowPlayingInfoCenter doesn't play on lock screen

I'm using MPMoviePlayerController to play audio/video and would like to continue playing when the app backgrounds and lock screen comes on. I'm setting MPNowPlayingInfoCenter's nowPlayingInfo in viewDidLoad and again on…
1
vote
1 answer

MPNowPlayingInfoCenter swift

StackOverflow I want to trying read current playing song from control center in ios7+ using swift lang In objective-c I could read it using this code NSDictionary *nowPlaying = @{MPMediaItemPropertyArtist: currentTrack.artist, …
gJamDev
  • 81
  • 1
  • 11
1
vote
0 answers

Dismissing MPNowPlayingInfoCenter

I have a recording app, and from the lockscreen, the user can pause the recording. This also makes the MPNowPlayingInfoCenter go away so that the user must go back to the app to start recording again. However, right when the user presses the pause…
MScottWaller
  • 3,321
  • 2
  • 24
  • 47
1
vote
1 answer

AVAudioPlayer, MPNowPlayingInfoCenter and audio metadata

I am using AVAudioPlayer to do audio streaming. Now I'd like to display some audio metadata (eg. artist, albumName, title and artwork) on lock screen. However I'm getting an issue like following: • if I use the statement NSURL *url = [NSURL…
stspb
  • 193
  • 2
  • 12
1
vote
1 answer

How to get nowplaying infomation in Thirdparty music application?

I want to get nowplaying infomation. So, following this code: NSDictionary *info = [[MPNowPlayingInfoCenter defaultCenter] nowPlayingInfo]; NSString *title = [info valueForKey:MPMediaItemPropertyTitle]; NSLog(@"%@",title); MPMusicPlayerController…
1
vote
0 answers

How to change nowPlayingInfo of MPNowPlayingInfoCenter retaining old artwork

I noticed that setting new nowPlayingInfo of [MPNowPlayingInfoCenter defaultCenter] replaces MPMediaItemPropertyArtwork value every new perform setNowPlayingInfo:. But in standart iphone music.app it doesn't happend! So how to set nowPlayingInfo…
Rost K.
  • 262
  • 2
  • 14
0
votes
0 answers

information is not displayed in now playing

I'm playing a mp4 on a remote url everything works even it plays in background the problem is that it doesn't show the information in the now playing bar it only shows the name of my project. mention that when I put this line if the info is shown…
Noise182
  • 36
  • 3
0
votes
0 answers

How to get Siri Suggested playlist/song above Now playing for Music apps like Apple music and Resso when airpods are connected

When Airpods are connected and there is no music already playing Siri suggests a playlist/songs above the Now Playing widget for the Apple Music app & Resso. This is probably due to Siri's "Show When listening" suggestions as when I turn it off…