Questions tagged [mpmediaplayercontroller]

92 questions
0
votes
1 answer

Quitting MPMediaPlayerController view

I am writing a simple method to start a streaming video full-screen and letting the user quit pressing the "Done" button. Problem is, I can't remove the MPMediaPlayerController view, or perhaps I am doing it the wrong way. -…
Fr4ncis
  • 1,387
  • 1
  • 11
  • 23
0
votes
3 answers

Is it possible to run an NSThread or NSTimer on iOS 4 device when it enters the background state?

I am writing an audio application which plays media items from the iPod music library using the iPod music player. Now I know it is possible for the iPod to carry on playing when it is in the background, but I want to also run either a Thread or a…
Sabobin
  • 4,256
  • 4
  • 27
  • 33
0
votes
1 answer

Build Command-Center like Media Controls

I want to build a control in my app that can play/pause and skip the sound that is played in the background. This should behave the same way as the media control does for all different media sources at the control center. Screenshot I played around…
0
votes
1 answer

how can set media play controller in layout?

how can set media play controller in layout? when I slider the recycleview, the media play controller cannot hold in layout, how can setting it?
0
votes
2 answers

UILabels and UISlider for song time not updating in Mac Catalyst music player

I recently built a simple music app that does fine on my deactivated iPhone. I have since bought a Mac mini so I could run it natively on that platform with Mac Catalyst. So far it has adapted well, but I am stymied by UILabels and UISlider for…
0
votes
1 answer

Problems switching between playlists and setting timers in Swift iOS MPMediaPlayer app

I am building a music player app meant to mimic radio or internet streaming automation. I have already succeeded in pulling music from playlists and filtering by last date played so songs do not frequently repeat (a pet peeve about my iPod). I want…
TCollette
  • 11
  • 1
  • 1
  • 4
0
votes
1 answer

How do I setup an MPErrorDomain listener

I'm trying to understand how to handle errors in obj-c on the MediaPlayer and we had someone do some work to do this for us on the AVPlayer but the way that is handled on AVPlayer is different, from what I can see in the documentation, than how…
0
votes
0 answers

MPMediaPlayer prepend not keeping track of queue

I have a music app I have coded using Swift and I have found a bug that Apple has acknowledged as a bug on their end. In the app I can tap a button and play songs based on the currently playing song. I am using prepend to create queue's. So for…
RubberDucky4444
  • 2,330
  • 5
  • 38
  • 70
0
votes
3 answers

Can't set MPMusicPlayerController queue with MPMusicPlayerMediaItemQueueDescriptor

This code results in silence: let query = MPMediaQuery.songs() let result = query.items guard let items = result, items.count > 0 else {return} let song = items[0] let player = MPMusicPlayerController.applicationQueuePlayer let coll =…
matt
  • 515,959
  • 87
  • 875
  • 1,141
0
votes
0 answers

MPNowPlayingInfoCenter not showing player Info in lockscreen in real device in ios 10

I am working on the music player app in which song info is to be displayed in lockscreen when the phone gets locked, I have added the following method in - (void)applicationWillResignActive:(UIApplication *)application of…
Dinesh Kumar
  • 165
  • 1
  • 14
0
votes
2 answers

Can't get key value as String from metadata

I'm grabbing metadata from an MPMediaItem like this: let url = item.value(forProperty:MPMediaItemPropertyAssetURL) as? NSURL let asset = AVURLAsset(url: url! as URL, options: nil) let metaArray = asset.metadata for metadata in metaArray{ …
wayneh
  • 4,393
  • 9
  • 35
  • 70
0
votes
1 answer

MPMediaItemPropertyTitle with MPMediaPlayer and Podcast causes Fatal Error

My MPMediaplayer is working pretty well for Music, but when I start working with Podcasts things are different. I'm trying to get two things: 1) The name the Podcast Title ("This American Life") 2) The Episode Title ("My Holiday") This line of code…
wayneh
  • 4,393
  • 9
  • 35
  • 70
0
votes
2 answers

MPMusicPlayerControllerPlaybackStateDidChangeNotification determine if song has ended

When using notification center, how do you determine that the song has ended? NSNotificationCenter.defaultCenter().addObserver(self, selector:#selector(updateNowPlayingInfo), …
justdan0227
  • 1,374
  • 18
  • 48
0
votes
1 answer

iOS Admob ad starts playing with lock screen buttons - BUG?

I have a music streaming app in which I use lock screen controls to play/pause/next the song. I have Admob Interstitial ads in my app. However when I use the lock screen controls, it gets passed down to the video ad as well because of which the…
0
votes
0 answers

get time taken to buffer while playing a video in iOS

When we play an online video through MPMoviePlayerViewController there will be some buffer time in all the cases. Is there any way by which we can capture the buffer time. My perception was that there should be some callback methods which gets…
kaustubh
  • 90
  • 1
  • 7