IPAD must-haves. And fun-to-haves.

Brighten your iPad with a colorful cover, stream to your TV, download pictures from your digital camera, and more. There’s already so much you can do with iPad and iPad mini

Apple Wireless Keyboard

The incredibly thin Apple Wireless Keyboard uses Bluetooth technology, which makes it compatible with iPad

Apple unveils iPad mini: ‘Thin as a pencil, light as paper’

iPad inspires creativity and hands-on learning with features you won’t find in any other educational tool

Lightning connector and FaceTime HD camera

Apple announces 4th generation iPad packing an A6X CPU

Pages

Showing posts with label MediaPlayer. Show all posts
Showing posts with label MediaPlayer. Show all posts

Monday, April 1, 2013

MediaPlayer framework add music without user input

I am working with MediaPlayer framework and have not been able to find much documentation so I am here to ask a question.

What I want to do is shuffle through all of the user's music. It seems that the shuffle mode can shuffle only when there is something in the queue. If this is the case how can i add all of the user's music without user input (using code that does not require mediapicker).


View the original article here

MediaPlayer framework add music without user input

I am working with MediaPlayer framework and have not been able to find much documentation so I am here to ask a question.

What I want to do is shuffle through all of the user's music. It seems that the shuffle mode can shuffle only when there is something in the queue. If this is the case how can i add all of the user's music without user input (using code that does not require mediapicker).


View the original article here

Thursday, March 28, 2013

MediaPlayer

I'm trying to make a music player app for iOS and am having some difficulty with MediaPlayer.framework.

Here is some code from my prototype:

- (IBAction)showMediaPicker:(id)sender{

    MPMediaPickerController *mediaPicker = [[MPMediaPickerController alloc] initWithMediaTypes: MPMediaTypeAny];

    mediaPicker.delegate = self;

    mediaPicker.allowsPickingMultipleItems = YES;

    mediaPicker.prompt = @"Select songs to play";

    [self presentViewController:mediaPicker animated:YES completion:nil];

}

 

- (void) mediaPicker: (MPMediaPickerController *) mediaPicker didPickMediaItems: (MPMediaItemCollection *) mediaItemCollection

{

    if (mediaItemCollection) {

        [musicPlayer setQueueWithItemCollection: mediaItemCollection];

        [musicPlayer play];

    }

    [self dismissViewControllerAnimated:YES completion:nil];

}

- (void) mediaPickerDidCancel: (MPMediaPickerController *) mediaPicker

{

    [self dismissViewControllerAnimated:YES completion:nil];

}

/*

musicPlayer is defined as:


In the .h file:

MPMusicPlayerController *musicPlayer;

@property (nonatomic, retain) MPMusicPlayerController *musicPlayer;

*/


This piece of code brings up a view to pick some songs to play. The problem is that if I pick song a and b, listen to a and decide to add song c and d, only c and d play. This means that the songs are not added to the queue, the queue is deleated and songs are added on top of that. This is also a problem because you can't(at least in the code I use)go back to the previous song or go to the next song unless it is in the queue.

How can I add to the queue without the data being deleated.

Also if you know any good documentation or tutorial on MediaPlayer.framework please share it.

I should also point out that i am in the process of learning iOS development so if it is a general problem could you plaese derect to me some documentation or to a tutorial.

Thanks in advance!


View the original article here