Khalid
Khalid

Reputation: 89

MPMovieNaturalSizeAvailableNotification is not working?

I added a notification with the following code,

  [[NSNotificationCenter defaultCenter] addObserver:self
                                         selector:@selector(videoLoadingComplete)
                                           name:MPMovieNaturalSizeAvailableNotification
                                          object:self.streamPlayer];

but it did not enter in the videoLoadingComplete function even after the video stars playing.

Upvotes: 4

Views: 442

Answers (1)

Rahul Patel
Rahul Patel

Reputation: 5886

You can use following code

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviestart:)   name:MPMoviePlayerLoadStateDidChangeNotification object:nil];
 -(void)moviestart
{
//your code here
}

Upvotes: 1

Related Questions