admin on February 11th, 2012

mp.initialPlaybackTime = -1.0;

-(void)myMovieFinished NSNotification*)aNotification
{
    MPMoviePlayerController *moviePlayer = [aNotification object];
    [[NSNotificationCenter defaultCenter] removeObserver:self name:MPMoviePlayerDidFinishNotification object:moviePlayer];
    [moviePlayer release];
}

You can access currently played item by using currentItem property:
AVPlayerItem *currentItem = yourAVPlayer.currentItem;

Then you can easily get the requested time values
CMTime duration = currentItem.duration; //total time
CMTime currentTime = currentItem.currentTime; //playing time

继续阅读..

admin on February 6th, 2012

2011已经正式成为历史,新的一年 继续扎根技术领域,昂扬前进。

继续阅读..