Search code examples
iphoneios4notificationsmedia-playeravfoundation

MPMoviePlayerController notification question


Good Evening Fellas! Is it possible for me to get a notification from an MPMoviePlayerController while it is playing a video. I mean, if i am able to get it every second, millisecond etc. I have an indicator for the video current playback time that i want it updated continuously.

Thank you in advance.


Solution

  • The simplest way is going to be to set up a repeating timer yourself, and use that to update your display. e.g.:

    [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(updateTime:) userInfo:nil repeats:YES];