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

Can not show album artwork on Carplay music

I'm building an iOS Music app that can integrate with Apple Carplay, i can play music on Carplay normally and can display some information of song such as title, album, artist name. However can not display album artwork. This is bulk code for…
Le Minh
  • 135
  • 1
  • 1
  • 12
1
vote
0 answers

iPhone lock screen controls do not show up when AVPlayer is paused, how can I fix this?

I am streaming a video file but only playing the audio for it using AVPlayer. I am successfully able to play/pause, continue playing while in background, and interact with the lock screen controls to control the player. The only issue is if I pause…
1
vote
0 answers

Can't update iOS Remote Command Center for AVPlayer?

I have a simple video player (just an AVPlayer, playing an M3U8 video file) and I previously got it playing background audio just fine using the following: NSError *audioError; [[AVAudioSession sharedInstance]…
1
vote
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.
1
vote
2 answers

How to prevent iOS app from being suspended

I have an iOS app that needs to track user's geolocation for a research project. However, the app gets automatically suspended by the iOS after a few hours and the geolocation tracking stops working. Geofencing is not sufficient for my case as it's…
1
vote
0 answers

now playing info not showing on lock screen

I am switching my music playing app from AVPlayer to MPMusicPlayerController. When the App uses AVPlayer, the now playing info shows as expected. But if I use MPMusicPlayerController, I see the now playing controls in the command centre, but not on…
mmm
  • 65
  • 10
1
vote
1 answer

Display Nowplaying item meta in lock screen without playing media on phone

I am writing an app in objective-c and have problems with MPNowPlayingInfoCenter and MPRemoteCommandCenter. The app plays music on a remote server and I am trying to display this information in the lockscreen / in control center. So far I don't…
1
vote
1 answer

How to update MPNowPlayingInfoCenter when using MPMusicPlayerApplicationController

I'm trying to update MPNowPlayingInfoCenter with the song info of a track that I'm playing from Apple Music. I have done the following: Set my background mode to: "Audio, Airplay, and Picture in Picture", Correctly set my AVAudioSession category: …
Wayne Hartman
  • 18,369
  • 7
  • 84
  • 116
1
vote
0 answers

setup now playing info

I'm trying to build a music app. Music is playing perfectly. Now I want to setup now playing info in my app that will show music control center. So how can I setup this into my below code? class MusicPlayer: NSObject { static let player =…
1
vote
0 answers

Control Center's progress view does not pause

I've set up control center for my AVAudioPlayer. Everything works great, except for the progress bar in control center, which continues counting up whenever the AVAudioPlayer is paused. How can I fix this? Here's what I have so far: func…
1
vote
2 answers

How can I get current audio URL playing inside my app from WKWebView?

I have a WKWebView and I am checking if audio is playing using [[AVAudioSession sharedInstance] isOtherAudioPlaying] I tried to get some information about it using : [MPNowPlayingInfoCenter defaultCenter] nowPlayingInfo] but it was nil. Then…
user7067775
1
vote
1 answer

MPNowPlayingInfoCenter does't show previous and next buttons

I'm playing a video using AVPlayerViewController, and I noticed that in now playing center, previous and next buttons were replaced with 15 seconds back and forth seeking buttons. The problem is that I need previous and next buttons to be visible.…
iOS Dev
  • 4,143
  • 5
  • 30
  • 58
1
vote
0 answers

MPNowPlayingInfoCenter disappeared all value

I want to display playback(seekbar, next button & prev button) and Song name , Artist name ,Image etc. on lock screen if song is playing and user locked his iPhone. But I got one issue. Issue is the MPNowPlayingInfoCenter info value display once for…
Yogendra Patel
  • 813
  • 2
  • 8
  • 24
1
vote
2 answers

How can i get current time of background audio? (iOS)

I have audio app. For listening audio i use AVFoundationFramework and make it in background with info by MPNowPlayingInfoCenter. If user making segue to other screen the audio are playing. I want show him info about playing audio on this new screen.…
1
vote
1 answer

Swift 2 - Change buttons Background/Lock-Screen MediaPlayer

In my app I have enabled the background audio in order for the user to play,pause, skip tracks from lock-screen. Everything works however, I cannot find the way to show the next track and previous track buttons. Right Now the `MediaPlayer' is…
SNos
  • 3,430
  • 5
  • 42
  • 92