【问题标题】:how to customize MoviePlayer of UIWebView如何自定义 UIWebView 的 MoviePlayer
【发布时间】:2014-07-16 12:00:54
【问题描述】:

您好,我想在 UIWebView 的电影播放器​​上添加一些自定义控件,例如从该 webview 加载的 UIButton。是否有任何可能的方式来访问 uiwebview 的电影播放器​​或用普通的 MPMoviePlayerController 覆盖它。

更新

好的,您可以按如下方式访问它首先添加通知

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

然后

-(void)VideoEnterFullScreen:(NSNotification*)notification

{

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

}

但问题是我无法访问该对象的任何属性,即 UIMoviePlayerController

【问题讨论】:

    标签: ios html uiwebview mpmovieplayercontroller uiwebviewdelegate


    【解决方案1】:

    您可以在这里使用开源项目:https://github.com/blizzard-op/VideoPlayerKit

    您可以通过以下方式对其进行初始化:[VideoPlayerKit initWithContainingViewController:optionalTopView:hideTopViewWithControls:];

    可选属性显示在我提供的链接上。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-09-22
    • 1970-01-01
    • 1970-01-01
    • 2012-06-19
    相关资源
    最近更新 更多