Questions tagged [mpmusicplayercontroller]

Use an MPMusicPlayerController object, or music player, to play media items from the device iPod library.

Use an object, or music player, to play media items from the device iPod library. There are two types of music player:

  • The application music player plays music locally within your app. It is not aware of the iPod app’s now-playing item, nor does it affect the iPod state.

  • The iPod music player employs the built-in iPod app on your behalf. On instantiation, it takes on the current iPod app state, such as the identification of the now-playing item. If a user switches away from your app while music is playing, that music continues to play. The iPod app then has your music player’s most recently-set repeat mode, shuffle mode, playback state, and now-playing item.

External Resources

374 questions
5
votes
1 answer

How to sync music from pc to iphone music library programmatically?

I have downloaded music from website url or from pc via sharing application and stored it to local document directory. Now I want to add stored musics from local directory to device's music library programmatically. So how to sync music from local…
Sunil Zalavadiya
  • 1,993
  • 25
  • 36
5
votes
1 answer

iPhone - What's the right audio player for my app?

I'm designing a music app that plays music from the user's iPhone music library and I'm having problems figuring out which audio player is the right one to use for it (AVAudioPlayer, AVPlayer, or MPMusicPlayer). My app needs to do the…
5
votes
1 answer

control background music from 3rd party apps ios

Is there a way to control music currently playing in the background? I am able to control the native ipod application with the MPMusicPlayerController iPodMusicPlayer, but what i basically want is the functionality of the ipod controller in the task…
audub
  • 435
  • 3
  • 14
4
votes
2 answers

How to set music playback slider in music player

i created a music player with previous and next functionality in my app.i want to impliment song playback slider. how to do this?
Vivek Parikh
  • 627
  • 8
  • 18
  • 31
4
votes
1 answer

Did MPMusicPlayerController change with iOS 5?

I had an app which worked correctly in iOS 4.3, after upgrading to iOS 5 it behaves in another way. After executing these lines on iOS 4.3 mp.playbackState is set to MPMusicPlaybackStatePaused, however in iOS 5 it is still set to…
OtoLeo
  • 363
  • 3
  • 19
4
votes
2 answers

MPMusicPlayerController know the previous and next song

MPMusicPlayerController gives me the property nowPlayingItem, but i'm also interestend in the previous e next song. Is there any way to retrive a MPMediaItem with the next and previous elements?
Luca Bernardi
  • 4,191
  • 2
  • 31
  • 39
4
votes
3 answers

MPMusicPlayerController and setNowPlayingItem

I'm using MPMusicPlayerController, specifically with setNowPlayingItem protocol and it's for cydia. But I have some issues and theos' warning when i make. It seems that some of the protocols and methods are not working and I receive some warning…
Nicolò Ciraci
  • 678
  • 5
  • 23
4
votes
0 answers

Playing musicVideos within Our App using musicKit

I have gone through following link:- https://developer.apple.com/videos/play/wwdc2017/502/?time=362 I have also downloaded demo project from above mentioned…
Meet
  • 1,196
  • 12
  • 26
4
votes
1 answer

Get album artwork from MP3 file/ID3 tag

I'm trying to get the album artwork from a MP3 file. In this case I use AVAudioPlayer to play the file. Here's the code that I thought would get the album artwork: MPMusicPlayerController *controller = [MPMusicPlayerController…
4
votes
1 answer

Detecting When An Apple Music Song Has Finished Playing

I'm writing an app that needs to enact an action when a song has finished playing. I'm using MPMusicPlayerController.applicationQueuePlayer() as my music player to play the user's apple music. I was wondering if there was a way I could detect when a…
4
votes
1 answer

Using MPMusicPlayerController play a MPMediaItemCollection, how to get the event of at end of playing

I'm using the MPMusicPlayerController to play MPMediaItems in a MPMediaItemCollection. How can I fire an event when the MPMediaItems are done playing?
arachide
  • 8,006
  • 18
  • 71
  • 134
4
votes
1 answer

MPMusicPlayerController won't interact with Remote Controls

even though this question ist asked many times and I didn't find any satisfying answer to this, I still wanna give it another try: I'm trying to play MPMediaItems with the MPMusicPlayerController. So far so good. This is needed to play files from…
driedel
  • 178
  • 9
4
votes
1 answer

iOS MediaPlayer Remote control events not working

I'am trying to add remote control events to a music player app, but can't get it working. Some facts: I'm using [MPMusicPlayerController applicationMusicPlayer]; I added Audio, AirPlay and Picture in Picture background modes; The example is…
RM335
  • 97
  • 8
4
votes
0 answers

Showing track name and artist for music, podcasts and any apps [Swift]

I've been trying to find a way to access the track name and artist information from any background audio just like the iOS control center player (swipe up view). I have a part of my app that needs to display the track name and artist of any current…
Troy R
  • 426
  • 2
  • 16
4
votes
0 answers

How do I play music using the system.musicplayer() after the stock Music app has been terminated?

So I'm making a music player using system.musicplayer() since ipod.musicplayer() was deprecated with iOS 8. Anyway, I have pause and play buttons that work perfectly when the stock music app is open in the background but not when it is terminated…
cyril
  • 3,020
  • 6
  • 36
  • 61