3

I have a headache regarding the movie player launched by a UIWebView in one of my apps.

I would like to call some actions from these triggers :

UIMoviePlayerControllerDidEnterFullcreenNotification
UIMoviePlayerControllerDidExitFullcreenNotification

(not MPMoviePlayerWillEnterFullscreenNotification, which doesn't work in this case...)

The UIMoviePlayer calls work, but I am unable to find the documentation for these, and therefor fear that it might be rejected due to "use of undocumented / private framework"

Have anyone had luck finding the documentation for these ? Or know if one is allowed to use these in a real app ?

Nils Munch
  • 8,805
  • 11
  • 51
  • 103
  • The Movie Player launched by UIWebView will not register these notifications,coz its launched in its own `UIWindow` and you have no control over it. Its kind of Bug in Apple framework. – Shrey Jan 30 '12 at 15:45

1 Answers1

1

As far as I know, these notifications are not documented.

They have actually changed name since iOS 4.3 and are now called

UIMoviePlayerControllerDidEnterFullscreenNotification

and

UIMoviePlayerControllerDidExitFullscreenNotification

(Fullscreen instead of Fullcreen).

Since they are still undocumented, i wouldn't advise using them if you are planning to release your app on the App Store.

However, there may be workarounds, as suggested by H2CO3 in this answer here:

If you want to know when the video started or stopped playing, you could use the onplaying and/or onended events of the HTML5 <video> container, and call a URL which you can intercept in the webview's shouldStartLoadWithRequest method to execute the code you want.

HTML5 Event Attributes

Hope this helps :)

Community
  • 1
  • 1
Mutix
  • 4,196
  • 1
  • 27
  • 39