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]
146 questions
2
votes
1 answer
The play/pause button does not update when play song
I'm building an music app that can integrate with CarPlay, everything is all right... I can display artist name, title, album name and some button controller on music player. However, there is an issue that when i play any song from CarPlay, the…

Le Minh
- 135
- 1
- 1
- 12
2
votes
0 answers
How to resume audio playback of other apps after deactiving the audio session and how to start audio playback in the background without mixing?
I am building a iOS app with Ionic and Capacitor. I use AVFoundation inside a Capacitor plugin which provides a public method to play an audio file accessible at a remote URL. The basics work, the audio file is successfully played. Now I want to…

speckro
- 21
- 3
2
votes
3 answers
Issue with updating playback time in MPNowPlayingInfoCenter from AVPlayer player periodic time observer block
I have an issue with updating playing info. Please have a look at the attached gif. In the end of the record playback sets to incorrect value.
I update the value by the key MPNowPlayingInfoPropertyElapsedPlaybackTime from the timer block. I check…

AlexEdunov
- 357
- 1
- 15
2
votes
0 answers
MPMediaItem and AVPlayerItem playback sequence in background
I'm having an issue with playing sequences of different kinds of items in a background.
In an app I'm working on we've introduced playlists which contain both content provided by the app and Apple Music content.
For that use AVPlayer and…

lukkasperek
- 21
- 3
2
votes
1 answer
Set nowplayingInfo for showing metadata not work on airplay Apple TV
I am sending metadata from an audio app via the MPNowPlayingInfoCenter : title, artist, artwork....
On iPhone devices, all this information is correctly displayed in the control center of the device (as well as in Carplay which uses also these…

htan
- 333
- 1
- 9
2
votes
0 answers
Update nowPlayingInfo currentTime after audio loops
try? AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback, mode: .default);
try? AVAudioSession.sharedInstance().setActive(true);
let path = Bundle.main.path(forResource: "sample", ofType: "mp3")!
let player…

Avery235
- 4,756
- 12
- 49
- 83
2
votes
1 answer
Handling playback events in CarPlay with MPNowPlayingInfoCenter
I am trying to build a sample audio app with CarPlay integration. The app is a test project - no API, no streaming, no complicated UI. Just a short list of song titles with the functionality to select one and play it. My goal is to handle the…

Teodora Georgieva
- 35
- 1
- 8
2
votes
0 answers
How to set audio details with an image on control center in Objective-C for iOS11?
I am trying to display audio details on control center as shown in the screenshot attached.
With the below code it is working as expected in all the versions of iOS except in iOS11:
if ([MPNowPlayingInfoCenter class]) {
NSString *progress =…

Krrish
- 271
- 3
- 17
2
votes
0 answers
Objective-C Lock screen media controller hide next/prev buttons
I am developing iOS media player app with Objective-C.
There is lock screen player and I would like to hide or disable prev and next button. Here is my code:
[MPRemoteCommandCenter sharedCommandCenter].previousTrackCommand.enabled =…

Dollah han
- 21
- 3
2
votes
0 answers
Change screen lock controls in runtime
My app is divided into two modules. For first module, even after screen lock the audio should play and the locked screen should show details related to media content. However, in the second module no special requirement is there. The audio should be…

A_G
- 2,260
- 3
- 23
- 56
2
votes
1 answer
iOS - Chromecast integration with MPNowPlayingInfoCenter to provide lock screen controls
I'm developing an iOS Obj-C app that uses the GoogleCast Framework.
I am trying to get the lock screen controls working via MPNowPlayingInfoCenter
I have added the correct permissions to my app to support backgrounding.
I am initialising the cast…

mhorgan
- 886
- 2
- 11
- 32
2
votes
0 answers
How do you distinguish between an iOS app entering background via the press of lock button vs otherwise?
In my app I want to show Now Playing Info on the lockscreen, if the app is still the main one when lock screen button is pressed. But I don't want to show the info if the app was backgrounded through switching to another app or via press of home…

Boon
- 40,656
- 60
- 209
- 315
2
votes
2 answers
MPNowPlayingInfoCenter throwing EXC_BAD_ACCESS
I am making an app that plays back audio and I have set it up so that the lock screen gets updated through MPNowPlayingInfoCenter, but I've run into a problem.
At seemingly random times, I get an EXC_BAD_ACCESS error when trying to update the now…

Liftoff
- 24,717
- 13
- 66
- 119
2
votes
0 answers
MPNowPlayingInfoCenter duration not displayed
I'm trying to write in Swift 2.2 (Xcode 7) an iOS 9 application that can play audio.
All my files are read from internet, so i choosed StreamingKit and can be played in background from multiple ViewController, so i created a singleton that store the…

alvinmeimoun
- 1,472
- 1
- 19
- 38
2
votes
1 answer
MPNowPlayingInfoCenter not show media info in iOS 8
I tried this code to show media info in Lockscreen and Control center but it does not show anything:
Class playingInfoCenter = NSClassFromString(@"MPNowPlayingInfoCenter");
if (playingInfoCenter) {
NSMutableDictionary *songInfo =…

NTNT
- 541
- 1
- 7
- 18