UIWebView Embedded video callbacks not working in iOS8?

In my application, I load some web pages embedded in Photos and Videos. I also use the following notifications to control 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 works fine in iOS7, but it doesn't work in iOS8. Any workarounds? Thanks in advance.

+5
source share
1 answer

This is one of the options I found .. The problem is that not the DISC will becomes 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 notice, I will post it. :)

+4
source

Source: https://habr.com/ru/post/1202315/


All Articles