is that UIWebView player a MPMoviePlayerController

2019-09-15 02:55发布

问题:

I need to play a youtube video in UIWebview and handle the event when user click the DOne button and when the video finish playing. I think of the solution that will handle the event that sent from UIWebview's media player.

My question is: 1. is that the UIWebview's media player a MPMoviewPlayerController? 2. How do i refer to that instance and handle the event it sent out (such as: pause, stop, done, finish playing...)

Thanks.

回答1:

1. is that the UIWebview's media player a MPMoviewPlayerController?

No.

2. How do i refer to that instance and handle the event it sent out (such as: pause, stop, done, finish playing...)

As drafted in my answer to a very similar question: How to receive NSNotifications from UIWebView embedded YouTube video playback