ios - Detect when a webview video becomes fullscreen on ios8 -


i have app users can open videos uiwebview, including youtube ones. in ios7, able notification when started playing, or when became full screen, vital me show options user , modify interface.

i used use this:

[[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(videoexitfullscreen:) name:@"uimovieplayercontrollerdidexitfullscreennotification" object:nil];  [[nsnotificationcenter defaultcenter] addobserver:self selector:@selector(videoenterfullscreen:) name:@"uimovieplayercontrollerdidenterfullscreennotification" object:nil]; 

however, since ios8, can't achieve this. notification no longer triggered uiwebview videos. however, still triggered normal videos, non-webview, i've tested.

any idea of have changed?

this work around found this..

[[nsnotificationcenter defaultcenter] addobserver:self                                              selector:@selector(videoexitfullscreen:)                                                  name:uiwindowdidbecomevisiblenotification                                                object:self.view.window];  [[nsnotificationcenter defaultcenter] addobserver:self                                              selector:@selector(videoenterfullscreen:)                                                  name:uiwindowdidbecomehiddennotification                                                object:self.view.window]; 

Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -