Q:

UIWebView Embed video callbacks are not working in iOS8?

In my application I am loading some webpages embedded with Photos and Videos. Also I am using the following notifications to manage the player,
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(embeddedVideoStarted:) name:@"UIMoviePlayerControllerDidEnterFullscreenNotification" object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(embeddedVideoEnded:) name:@"UIMoviePlayerControllerWillExitFullscreenNotification" object:nil];

This is working fine in iOS7, but in iOS8 its not working. Any workarounds? Thanks in advance.

A:

This is one option, I have found.. The problem is that is not Will is DID become hidden..
[[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(embeddedVideoStarted:)
                                                 name:UIWindowDidBecomeVisibleNotification
                                               object:self.view.window];

[[NSNotificationCenter defaultCenter] addObserver:self
                                             selector:@selector(embeddedVideoEnded:)
                                                 name:UIWindowDidBecomeHiddenNotification
                                               object:self.view.window];

If, I find a fix for the second notification I will posted it.. :)

