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
"%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....
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
[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....