mpmusicplayercontroller

Fade out Playback Volume on MPMusicPlayerController on iOS 5

こ雲淡風輕ζ 提交于 2019-12-03 07:56:32
I was using this answer for how to fade out music player volume in my app, but in iOS 5, this leads to the on-screen HUD for volume appearing to the user, as if they had pressed the volume buttons on the side of their device. Does anyone know a workaround that doesn't display the HUD? kurtzmarc I found a solution here: applicationMusicPlayer volume notification It simply directs you to add an MPVolumeView to your view. For some reason, having that in the view hierarchy prevents the volume HUD from appearing. Works for me, hopefully for you too. 来源: https://stackoverflow.com/questions/7797726

How to stop MPMusicPlayerController from enabling screen locking

回眸只為那壹抹淺笑 提交于 2019-12-03 03:01:32
I have an application that requires the iPhone screen to remain active (or not, depending on user choice). I've done this by disabling the application idle timer, which works fine and dandy until I start playing media via the MPMusicPlayerController. Due to a bug in the SDK, this then reenables the idle timer with no apparent way to disable it again. My app flow is: App starts Screen stays on <...time passes...> Play audio file Idle timer kicks in Screen turns off I have an empty audio file playing in the background to stop the phone going into deep sleep, but I'd really like to keep the

iOS 9.3.2 Breaks MPMusicPlayerController

Deadly 提交于 2019-12-03 00:38:06
I'm trying to integrate Apple Music to my app, I managed to get it working flawlessly until this morning. After updating to iOS 9.3.2 nothing is the same: The permission system works the same ( SKCloudServiceController ) to retrieve the AuthorizationStatus and Capability of the user. However, the MPMusicPlayerController do not behave the same using the new iOS version, let me explain : On iOS 9.3.1, if I call the playerController.play() method after setting my tracks in playerController.setQueueWithStoreIDs(:_), I immediately receive the

how can i get songs from my iphone's ipod to my application in array in iphone sdk?

断了今生、忘了曾经 提交于 2019-12-02 21:54:02
问题 can i store or just create a customize view which allow user to play songs within from my application when user clicks on songs at that time the iphone's iPod(MusicPlayer) picker should not open it just show all songs in my application in TableView or PickerView it allows user to select the songs within my created customized view that TableView or PickerView.i have also seen this example. but it just opens the music player picker view. did you get my point is this possible to do that within

Background Audio and Remote Control Support using MPMusicPlayerController on iOS 4. Is this even possible?

我是研究僧i 提交于 2019-12-02 21:12:25
I've spent two days on this and have gotten nowhere. I'm trying to use [MPMusicPlayerController applicationMusicPlayer] to play audio chosen from the user's iPod library and have it run in the background as well as support remote events. Now getting the music actually playing is the easy part. Get the instance, pick the songs, assign the music queue and play. Done and done. BUT... a) I can't get it to play in the background, and b) even when in the foreground I can't get the remote control events to work at all! And before you ask, yes, I have set the plist entries, the audio session category,

how can i get songs from my iphone's ipod to my application in array in iphone sdk?

孤者浪人 提交于 2019-12-02 08:12:26
can i store or just create a customize view which allow user to play songs within from my application when user clicks on songs at that time the iphone's iPod(MusicPlayer) picker should not open it just show all songs in my application in TableView or PickerView it allows user to select the songs within my created customized view that TableView or PickerView. i have also seen this example. but it just opens the music player picker view. did you get my point is this possible to do that within my application.? just similar like this question here i found link that tells use API 3.0 Yes Amergin

How To Switch music from my app to the ipod

本秂侑毒 提交于 2019-12-02 06:04:07
i am using MusicPlayerController object in my app to play music. i know that its possible to keep playing my app music when it's terminate on the iphone ipod app. how can i do it? There are a few things involved. You have to choose between two music players, the application music player and the iPod music player: + (MPMusicPlayerController *)applicationMusicPlayer; + (MPMusicPlayerController *)iPodMusicPlayer; If you choose the iPodMusicPlayer, music will continue to play in the background and the user can stop it using the iPod (or Music) app. If you choose the applicationMusicPlayer, by

MPMusicPlayerController not responding to currentPlaybackRate near 1

好久不见. 提交于 2019-12-01 01:16:14
I'm trying to use the currentPlaybackRate property on MPMusicPlayerController to adjust the tempo of a music track as it plays. The property works as expected when the rate is less than 0.90 or greater than 1.13, but for the range just above and below 1, there seems to be no change in tempo. Here's what I'm trying: UIAppDelegate.musicPlayer = [MPMusicPlayerController iPodMusicPlayer]; ... load music player with track from library [UIAppDelegate.musicPlayer play]; - (void)speedUp{ UIAppDelegate.musicPlayer.currentPlaybackRate = UIAppDelegate.musicPlayer.currentPlaybackRate + 0.03125; } - (void

MPMusicPlayerController not responding to currentPlaybackRate near 1

℡╲_俬逩灬. 提交于 2019-11-30 20:08:37
问题 I'm trying to use the currentPlaybackRate property on MPMusicPlayerController to adjust the tempo of a music track as it plays. The property works as expected when the rate is less than 0.90 or greater than 1.13, but for the range just above and below 1, there seems to be no change in tempo. Here's what I'm trying: UIAppDelegate.musicPlayer = [MPMusicPlayerController iPodMusicPlayer]; ... load music player with track from library [UIAppDelegate.musicPlayer play]; - (void)speedUp{

iOS AudioSessionSetActive() blocking main thread?

戏子无情 提交于 2019-11-30 19:44:20
in my iOS app, I'm trying to implement "ducking": while my app plays a short "command-like" sound, any background music should be lowered in volume. Having finished playing the sound, the music volume should go back to its original value. As implemented, ducking basically works as expected. However, when I call AudioSessionSetActive(NO) in audioPlayerDidFinishPlaying: in order to end ducking, there is a small pause in any UI updates that occur at this point of time. This involves custom drawing, as well as for ex. automatic scrolling of text and so on. Now, here's the question: Is this a known