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.

140 questions
53
votes
5 answers

Is there a public way to force MPNowPlayingInfoCenter to show podcast controls?

I would like Control Center (via MPNowPlayingInfoCenter) to show the forward 15 seconds / back 15 seconds controls that Apple shows with podcasts, like so: The utter lack of documentation tells me that there's no obvious way to do this, but has…
DesignatedNerd
  • 2,474
  • 1
  • 23
  • 43
45
votes
3 answers

MPNowPlayingInfoCenter not reacting properly when pausing playback

I am trying to get MPNowPlayingInfoCenter to work properly when pausing playback. (I have a streaming music app that uses AVPlayer for playback, and I am playing back in my Apple TV over Airplay.) Everything but pausing seems to be reflected…
Jaanus
  • 17,268
  • 14
  • 62
  • 102
32
votes
4 answers

Get current playing song from Spotify iOS app

I'm trying to get info about the current playing song in Spotify iOS app. The scenario is as follows: Open Spotify iOS app, start playing a song. Put the app in background and open my iOS app. Is there any way I could get the song playing on…
buddy
  • 329
  • 3
  • 5
31
votes
2 answers

MPNowPlayingInfoCenter Disappears when audio stream stalls

My app plays streaming audio via AVPlayer, and uses MPNowPlayingInfoCenter to display info about the stream on the device lock screen. This works fine when audio is actually playing, but if the stream stalls due to network slowdowns (i.e. I receive…
Tom Harrington
  • 62,792
  • 9
  • 129
  • 149
27
votes
2 answers

Change lock screen background audio controls text?

I have an iOS app that streams background audio using AVAudioSession. It is working correctly, but I am curious, is there any way to change the text on the lock screen audio controls? Right now it simply displays the name of my app, but I would like…
Keller
  • 16,803
  • 8
  • 53
  • 71
16
votes
3 answers

Set MPNowPlayingInfoCenter with other background audio playing

I am trying to play a video using MPMoviePlayerController for an iOS app in Swift. My goal is to be able to play system music with something like apple music, then open my app and have the audio mix in, but I want my app to be able to take control…
Alex Pelletier
  • 4,448
  • 6
  • 30
  • 54
16
votes
3 answers

MPNowPlayingInfoCenter - elapsed time keeps counting when audio paused

I'm currently trying to figure out how to specify the elapsed time in the MPNowPlayingInfoCenter, on iOS. When I start playing, I set the elapsed time to 0 and the playback rate to 1. This works fine. Then I pause the audio. This is correctly…
aspyct
  • 3,193
  • 7
  • 26
  • 50
15
votes
6 answers

MPNowPlayingInfoCenter nowPlayingInfo not updating at end of track

I have a method that changes the audio track played by my app's AVPlayer and also sets MPNowPlayingInfoCenter.defaultCenter().nowPlayingInfo for the new track: func setTrackNumber(trackNum: Int) { self.trackNum = trackNum …
Hélène Martin
  • 1,329
  • 1
  • 13
  • 33
14
votes
1 answer

Play/Pause and Elapsed Time not updating in iOS command center properly

I have a video player that can play from the iOS command center and lock screen. When I toggle a play/pause button in my app, it should update the play/pause button in the command center (MPRemoteCommandCenter) by updating the nowPlayingInfo…
JEL
  • 1,368
  • 2
  • 19
  • 43
14
votes
4 answers

MPMediaItemArtwork init(image:) deprecated in iOS 10.0

Apple has deprecated init(image:) method in MPMediaItemArtwork in iOS 10. What is the new alternative. the class shows interface shows method below to be available in the new OS version public init(boundsSize: CGSize, requestHandler: @escaping…
carbonr
  • 5,921
  • 5
  • 43
  • 70
13
votes
3 answers

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…
Ashish Awaghad
  • 2,822
  • 3
  • 22
  • 33
12
votes
2 answers

MPNowPlayingInfoCenter nowPlayingInfo ignored for AVPlayer audio via AirPlay

I have implemented audio playback using AVPlayer, playing a remote mp3 url. I want to display the information about the currently playing audio using the MPNowPlayingInfoCenter nowPlayingInfo method. When I lock the screen, I do see the image and…
Andrew Kuklewicz
  • 10,291
  • 1
  • 31
  • 42
11
votes
3 answers

Can I hide the rewind button in the iOS Lock Screen Music controls?

My app doesn’t support going back to previous tracks, and I’m wondering if I can tell the lock screen music controls to hide their rewind/previous track button. I use the MPNowPlayingInfoCenter to communicate that information to the lock…
Luke
  • 8,709
  • 14
  • 74
  • 140
11
votes
1 answer

MPNowPlayingInfoCenter AVPlayer on iOS 7

I'm making an app that streams music. I'm trying to display metadata (title, artist and artwork image) on the lock screen. MPNowPlayingInfoCenter seems to work well with MediaPlayer.framework, but I can't figure to make it work with AVPlayer on iOS…
Rémy Virin
  • 3,213
  • 20
  • 40
11
votes
3 answers

Reading MP3 information using objective c

I have mp3 files stored on the iPhone and I my application should to be able to read the ID3 information, i.e length in seconds, artist, etc. Does anyone know how to do this or what library to use in Objective-C? Your thoughts are much appreciated.
TonyNeallon
  • 6,557
  • 12
  • 40
  • 49
1
2 3
9 10