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
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.
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…
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…
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 …
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…
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:…
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…
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 .…
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…
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…
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…
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…
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.…
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…
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…
1 2 3
9
10