0

Hi I want to add some custom controls like a UIButton on movieplayer of UIWebView when it is loaded from that webview. Is there any possible way to access the movieplayer of uiwebview or override it with normal MPMoviePlayerController.

UPDATE

ok you can access it as follows first add notification

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(VideoEnterFullScreen:) name:@"UIMoviePlayerControllerDidEnterFullscreenNotification" object:nil];

and then

-(void)VideoEnterFullScreen:(NSNotification*)notification

{

 id moviePlayer = notification.object;  
 NSLog(@"");

}

But the problem is I cannot access any properties of this object that is UIMoviePlayerController

hariszaman
  • 8,202
  • 2
  • 40
  • 59

1 Answers1

0

You can use the open-source project here: https://github.com/blizzard-op/VideoPlayerKit

You can initialize it by: [VideoPlayerKit initWithContainingViewController:optionalTopView:hideTopViewWithControls:];

The optional properties are shown on the link I provided.

Steve Sahayadarlin
  • 1,164
  • 3
  • 15
  • 32
  • How can I use it with webview play YouTube video? – g212gs Jul 19 '14 at 05:02
  • You mean playing a youtube video with apple's UIWebView? – Steve Sahayadarlin Jul 19 '14 at 12:00
  • yeah, i want to play youtube video in uiwebview – g212gs Jul 21 '14 at 04:30
  • I know exactly how to do that... first you will need to start a new question then tag me in a comment so I know where your question is. I can answer it there. I have it at the tip of my tongue. I can answer it immediately. I have used many times – Steve Sahayadarlin Jul 21 '14 at 11:21
  • My Question link [http://stackoverflow.com/questions/24825534/webview-playback-control-programmatically-for-youtube-video-in-ios/24837789#24837789](http://stackoverflow.com/questions/24825534/webview-playback-control-programmatically-for-youtube-video-in-ios/24837789#24837789) – g212gs Jul 21 '14 at 11:33