Prior to the iOS7 update, I used ...
UIImage *image = [moviePlayer thumbnailImageAtTime:1.0 timeOption:MPMovieTimeOptionNearestKeyFrame];
... with great success, so that my application can still show the video that the user has just made.
I understand this method since iOS7 is now deprecated and I need an alternative. I see a method there
- (void)requestThumbnailImagesAtTimes:(NSArray *)playbackTimes timeOption:(MPMovieTimeOption)option
but how can I return an image from it so that I can put it in the image of the videoReview button?
Thanks, Jim.
**** Edited question by trying the notification center method ***
I used the following code -
[moviePlayer requestThumbnailImagesAtTimes:times timeOption:MPMovieTimeOptionNearestKeyFrame]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MPMoviePlayerThumbnailImageRequestDidFinishNotification::) name:MPMoviePlayerThumbnailImageRequestDidFinishNotification object:moviePlayer];
I made NSArray times from two NSNumber objects 1 and 2.
Then I tried to capture the notification using the following method
-(void)MPMoviePlayerThumbnailImageRequestDidFinishNotification: (NSDictionary*)info{ UIImage *image = [info objectForKey:MPMoviePlayerThumbnailImageKey];
Then he proceeded to use this thumbnail as a button image as a preview .... but that did not work.
If you see from my encoding where I made a mistake, your help will be appreciated again. Greetings
deprecated image ios7 video nsnotificationcenter
Jim Tierney Sep 30 '13 at 23:48 2013-09-30 23:48
source share