问题
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
回答1:
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
来源:https://stackoverflow.com/questions/7288375/event-on-view-displayed-change-youtube-mpmovieplayerviewcontroller