This class displays song information, such as the title, the author, and the album cover, on the lock screen and in the multitasking bar.
Questions tagged [mpnowplayinginfocenter]
140 questions
0
votes
0 answers
How we detect when the app comes in Foreground by clicking on MPNowPlayingInfoCenter view in iOS swift
We are using AVPlayer in our app and when app is in background state and user taps on the MPNowPlayingInfoCenter view and app launch than how we detect that app is launched by on click of MPNowPlayingInfoCenter view.
Please suggest.
![](../../users/profiles/5345550.webp)
Fusioni Technologies
- 135
- 8
0
votes
0 answers
Lock Screen play/pause controls not changing
I would like to change play/pause button icon on a lock screen when I tap play/pause in the app.
When I tap play/pause from a lock screen, I receive it in the app and update the view, but when I tap it in the app, it doesn't update on a lock…
![](../../users/profiles/7648917.webp)
Mateusz
- 116
- 1
- 6
0
votes
1 answer
ios swift MPMediaItemArtwork requestHandler return image from SDWebImage
How to load image asynchronous from sdwebimage to MPMediaItemArtwork in MPNowPlayingInfoCenter ?
MPMediaItemPropertyArtwork: MPMediaItemArtwork(boundsSize: CGSize(width: 200, height: 200), requestHandler: { (size) -> UIImage in
let…
![](../../users/profiles/4910154.webp)
Farzad
- 1,667
- 19
- 44
0
votes
1 answer
Swift Updating media metadata in Control Center doesn't work when called in two methods
I have two methods that are supposed to display media info in CC/Lock screen
func updateGeneralMetadata() {
guard player.url != nil, let _ = player.url else {
nowPlayingInfoCenter.nowPlayingInfo = nil
return
…
![](../../users/profiles/7235585.webp)
Adam
- 1,107
- 1
- 12
- 24
0
votes
1 answer
MPNowPlayingInfoCenter Live icon
I am making a radio app and noticed in the iHeartRadio app, along with the Apple Music app (Beats 1) there seems to be a Live icon for live media. I wanted to implement this into my app but have no idea on how to do it. I am using Swift 3 and…
![](../../users/profiles/5240556.webp)
Brian B
- 7
- 4
0
votes
1 answer
Set MPNowPlayingInfoCenter currentTime and songLength from AVAudioPlayer
I'm having trouble setting the currentTime and songLength of the MPNowPlayingInfoCenter. Here's my code:
func updateNowPlayingCenter (title: String, artist: String, albumArt: AnyObject, currentTime: NSNumber, songLength: NSNumber, PlaybackRate:…
![](../../users/profiles/7207202.webp)
iFunnyVlogger
- 347
- 1
- 4
- 15
0
votes
1 answer
How to add seek buttons on iOS lock screen?
How to setup MPRemoteCommandCenter/MPNowPlayingInfoCenter to add seek buttons? Result that I want to achieve is on the screenshot.
I have already added this code:
[[MPRemoteCommandCenter sharedCommandCenter].seekForwardCommand…
![](../../users/profiles/6809483.webp)
Vlad Semenov
- 23
- 6
0
votes
1 answer
How to Implementing MPNowPlayingInfoCenter using AvAudioPlayer
I am in the midst of creating an iOS mobile app for a client that will play a variety of audio tracks.
One of the features that I wanted to implement was to display information about a currently-playing audio track on the lock screen and banner .…
![](../../users/profiles/4772661.webp)
linto jacob
- 193
- 16
0
votes
1 answer
Change UIButton Image while receiving UIEventSubtypeRemoteControlPause - Objective c - iOS
I've successfully managed to get music controls in lockscreen while playing with AVPlayer but the issue is that I would like to change UIButon image when the user press the play / pause button in lockscreen (according to the player state).
Thanks to…
![](../../users/profiles/2450887.webp)
Synny
- 532
- 4
- 18
0
votes
1 answer
Set title and image for now play audio in background
How do I set the title and image of now playing audio in background using the AVPlayer?
My code so far:
let path: String = String(format: "pathtoaudio")
let aPlayerItem: AVPlayerItem = AVPlayerItem(URL: NSURL(string: path)!)
let…
![](../../users/profiles/2316966.webp)
Mhmd Backer Shehadi
- 471
- 8
- 26
0
votes
1 answer
MPNowPlayingInfoCenter info being overwritten by AVPlayer
I'm working an iOS application that uses an AVPlayer to play songs represented by AVPlayerItems.
I've tried setting the nowPlayingInfo property of MPNowPlayingInfoCenter.defaultCenter() but it appears that the info gets immediately overwritten by…
![](../../users/profiles/1888423.webp)
Andrew
- 101
- 1
- 9
0
votes
1 answer
Change lock screen button in iOS
I am developing a music application and I have managed to control lock screen events with "MPNowPlayingInfoCenter". I want to know is it possible to hide next and previous button and just display play/pause and slider? How?
And is it possible to…
![](../../users/profiles/3004884.webp)
Niloufar
- 432
- 1
- 4
- 21
0
votes
1 answer
MPNowPlayingInfoCenter showing as paused
I'm using AVQueuePlayer within my app to play some media. I'm attempting to use MPNowPlayingInfoCenter to show the current status of playback when the app is backgrounded. My issue is the play button is always showing, even when media is playing.…
![](../../users/profiles/816002.webp)
squarefrog
- 4,615
- 4
- 29
- 61
0
votes
1 answer
Retrieving / updating individual MPNowPlayingInfoCenter properties
In a basic audio AVPlayer instance, we're playing back an HLS stream and setting the Now Playing info (successfully), but cannot access the properties of the MPNowPlayingInfoCenter that are being set.
The category and active status of our…
![](../../users/profiles/612189.webp)
jterry
- 5,899
- 2
- 27
- 36
0
votes
1 answer
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…
![](../../users/profiles/1587729.webp)
Damien Romito
- 8,463
- 8
- 57
- 71