Event on view displayed change (Youtube MPMoviePlayerViewController)
Asked Answered
C

1

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

Chambliss answered 2/9, 2011 at 19:29 Comment(1)
This seems like a double-posting to me - not cool!Abortionist
A
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

Abortionist answered 4/9, 2011 at 21:51 Comment(4)
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...Chambliss
I need to manage YTMovieView like current time, loading time, did finish playing... is it possible?Chambliss
Once again, you will not get those notifications, period.Abortionist
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!Rib

© 2022 - 2024 — McMap. All rights reserved.