Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ketan rajput

macrumors newbie
Original poster
Feb 11, 2011
1
0
india, jalandhar , punjab
helow masters!!

m a newbie in iphone application development. m trying to develop a music player using <MediaPlayer/MediaPlayer.h> framework. my code is following:


NSNumber *durationNumber = [nowPlayingItem valueForProperty: MPMediaItemPropertyPlaybackDuration];
currentTimeSlider.maximumValue =[durationNumber floatValue];
currentItemTitleLabel.text = [nowPlayingItem valueForProperty: MPMediaItemPropertyTitle];
currentItemArtistLabel.text = [nowPlayingItem valueForProperty: MPMediaItemPropertyArtist];
currentItemAlbumLabel.text = [nowPlayingItem valueForProperty: MPMediaItemPropertyAlbumTitle];
MPMediaItemArtwork *coverArt = [nowPlayingItem valueForProperty: MPMediaItemPropertyArtwork];
currentItemDurationLabel.text = [NSString stringWithFormat:mad:"%02d:%02d", [durationNumber intValue] / 60,
[durationNumber intValue] % 60];


i guess this code is playing the current media content that can be on iphone or ipod. Is there any way to access the media library of mac( such as i tune library) . is it necessary to attach the device with this code?.if there is another way dn help me....
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.