3

I would like to know when the YouTube MPMoviePlayerViewController appear (programmatically) after have clicked on the UIWebView which permit to play the video in iOS, to get and to have control on this view.

Because I want to get information from the player like the current playback time, loading time... like in a regular MPMoviePlayerViewController.

Thanks

Guillaume
  • 393
  • 2
  • 21

1 Answers1

3

You will, under no circumstances receive any notifications from the WebView embedded player.

Update: This is not entirely true. There are no documented notifications. However, there are notifications used by the UIWebView embedded movie player (which actually is NOT a MPMoviePlayerController).

See my answer on How to receive NSNotifications from UIWebView embedded Youtube video playback

Community
  • 1
  • 1
Till
  • 27,559
  • 13
  • 88
  • 122
  • In fact the MPMoviePlayerViewController appear and read the YouTube video, so, I guess the MPMoviePlayerViewController is the first responder. I want get notification from this view like: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(myMovieFinishedCallback:) name:MPMoviePlayerPlaybackDidFinishNotification object:player.moviePlayer]; AND get the current playback time... – Guillaume Sep 06 '11 at 23:26
  • I need to manage YTMovieView like current time, loading time, did finish playing... is it possible? – Guillaume Sep 07 '11 at 00:59
  • Once again, you will not get those notifications, period. – Till Sep 07 '11 at 07:07
  • Do you have any primary sources which explain why this is case? And do you know any workaround? also see: Get notifications when a Dailymotion video is played into a UIWebView . Thanks for making that clear anyway! – Gerold Meisinger Nov 18 '11 at 17:25