Questions tagged [mpmediaplayercontroller]

92 questions
45
votes
4 answers

Quitting app causes error "Message from debugger: Terminated due to signal 9"

I'm writing a basic music player app but having some problems when it comes to handling the app state transitions. I'm using Swift 3 and MPMusicPlayerController.systemMusicPlayer() The goal is this: 1) Keep music playing when user taps the Home…
wayneh
  • 4,393
  • 9
  • 35
  • 70
13
votes
1 answer

How does Spotify customize the media playback controls on iOS?

Spotify on iOS has a very interesting Control Center integration. Notice the hamburger button below. The same thing is on the lock screen! How do they do those? Is there an API in MPMediaCenter or something?
Moshe
  • 57,511
  • 78
  • 272
  • 425
11
votes
2 answers

MPMusicPlayerController.applicationQueuePlayer bugs in iOS 13.4

I submitted Feedback about this in Feedback Assistant already, but figured I'd post here too -- as of iOS 13.4, I have noticed various bugs in the MediaPlayer framework, specifically with the applicationQueuePlayer and applicationMusicPlayer. The…
alinder
  • 186
  • 7
11
votes
3 answers

Simulator crashes on AQMEIOManager

The simulator crashes when trying to play audio. 13:22:14.211 App [2965:5603] <0xb03e7000> Error '!obj' trying to fetch default input device's sample rate 13:22:14.211 App [2965:5603] <0xb03e7000> Error getting audio input device sample rate:…
11
votes
1 answer

MediaPlayer.framework: How to "translate" MPMusicRepeatModeDefault into an actual mode?

As is stated in Apple documents: enum { MPMusicRepeatModeDefault, MPMusicRepeatModeNone, MPMusicRepeatModeOne, MPMusicRepeatModeAll }; typedef NSInteger MPMusicRepeatMode; Yet, MPMusicRepeatModeDefault is described as The user’s…
Matoe
  • 2,742
  • 6
  • 33
  • 52
6
votes
1 answer

Fade (animate) Volume using MPMediaPlayer Swift 4

I'm using Xcode 10+, Swift 4, and targeting iOS 11.4+ with MPMediaPlayer I'd like to programmatically fade out the volume of the player (like Apple does when you quit their music player). As well, I don't want to see anything (like the VolumeView…
wayneh
  • 4,393
  • 9
  • 35
  • 70
5
votes
1 answer

Play Song at specific index of MPMediaItemCollection in Swift

I try to make my own Musicplayer with Swift. I need to jump to a specific song/index of my MPMediaItemCollection and start to play it but i can only find methods like skipToNextItem() and skipToPreviousItem(). Is there any other way to do that than…
5
votes
1 answer

MPMediaItemPropertyArtwork empty with Apple Music

I can't retrieve MPMediaItemPropertyArtwork while playing a song from Apple Music with iOS 8.4 I've try to read image of nowPlayingItem (lldb) po [[[MPMusicPlayerController systemMusicPlayer] nowPlayingItem]…
Martino Bonfiglioli
  • 1,567
  • 1
  • 15
  • 29
5
votes
2 answers

MPMoviePlayerPlaybackDidFinishNotification being called again in iPhone 4.3 simulator when setting contentURL

NOTE: See the updates at the bottom. I have an application to play videos one by one from a list. So, to test this functionality, I created a simple application with only one view controller. I referenced this blog before implementing this view…
Jomoos
  • 12,823
  • 10
  • 55
  • 92
5
votes
1 answer

MPMusicPlayerController deprecated with iOS 6

I've just seen iOS 5.1 to iOS 6.0 API Differences released by Apple. They say that some important methods of MPMusicPlayerController.h are removed to MPMediaPlayback protocol (play, pause, stop...). Does somebody know how to update my application…
Vincent Cotro
  • 314
  • 2
  • 7
4
votes
1 answer

MPMusicPlayerController Track Length

Using an MPMusicPlayerController is there a way to query the tracks length? Using .currentPlaybackTime I can figure out how far I am into the track but I have no way of knowing how long the track is. My [MPMediaItem…
TurqMage
  • 3,321
  • 2
  • 31
  • 52
4
votes
3 answers

remoteControlReceivedWithEvent works in simulator but not device

I am working on an app that will be playing music from the iPod library. I am playing the music via MPMediaPlayerController by retrieving the selected item from a table and passing it to a detail view controller: MPMediaItem *item = (MPMediaItem…
Jeff B
  • 223
  • 1
  • 3
  • 12
4
votes
0 answers

Creating an imovie-like frame strip with pinch/zoom

Does anyone know how apple created the filmstrip of frame-by-frame from a video? I'd like to implement similar functionality, showing a frame every 5 sec or so, with a pinch/zoom functionality that either increases resolution (frame every 1 sec) or…
XeroxDucati
  • 5,130
  • 2
  • 37
  • 66
4
votes
2 answers

iOS: MPMusicPlayerControllerPlaybackStateDidChangeNotification called multiple times on certain devices

I have an application that plays back music. I'm using the following code to listen to playback state changes from the MPMusicPlayerController to update the UI. More precisely I toggle the look of the play button between play and…
znq
  • 44,613
  • 41
  • 116
  • 144
4
votes
1 answer

play 200fps video on 30fps on iOS

i'am looking for the possibility to play a video @200fps in slow motion (30fps) on the iPhone. MPMediaPlayer is no solution. the video (600frames ~3 sec) plays in 2 sec. I would like 30fps ~ 20 sec. i have set the…
1
2 3 4 5 6 7