I have a UIWebView on screen, which automatically redraws when the device is rotated. I don't want it to redraw if the user has invoked a video from the web before rotating because redrawing cancels the video playback (although audio continues).
None of the following helped:
UIWebViewis not hidden byMPMoviePlayerinstance- Media playback does not invoke
viewWillAppear,viewDidAppear,viewWillDisappear, orviewDidDisappear. self.view.windowdoesn't change, doesn't get any new subviewsUIWebviewdoes not get any additional subviews- the
UIWebViewdoes not get any new subviews or change anyisBlahBlahproperties [UIApplication sharedApplication]only has 1 window, and that window only has 1 view (my main view).- I tried the notification center thing (Notified when media player opens from UIWebView?) and did not receive notifications.
For reference, the video path I am testing with is http://trailers.apple.com/movies/fox/prometheus/prometheus-tlr1_r320i.mov
So basically my app has no way to detect that a video is currently playing. It seems like I should be able to detect, but searching around I couldn't find one. I don't need to interfere with the playback - just knowing it is playing would be fine.