4

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.

S..
  • 5,511
  • 2
  • 36
  • 43
Khalid
  • 89
  • 3

1 Answers1

1

You can use following code

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviestart:)   name:MPMoviePlayerLoadStateDidChangeNotification object:nil];
 -(void)moviestart
{
//your code here
}
Rahul Patel
  • 5,858
  • 6
  • 46
  • 72