【问题标题】:Youtube iOS Player Helper library didn't workYoutube iOS 播放器助手库不起作用
【发布时间】:2015-01-11 10:06:50
【问题描述】:

我尝试实现 youtube-ios-player-helper 库以在我的应用中播放视频。我可以让播放器准备好并加载视频。并且可以显示起始缩略图。但是,当我尝试播放视频时,却收到了以下错误消息:

SendDelegateMessage(NSInvocation *): delegate (webView:identifierForInitialRequest:fromDataSource:) failed to return after waiting 10 seconds. main run loop mode: kCFRunLoopDefaultMode

然后我尝试构建和运行 youtube ios player helper 示例项目,它也遇到了同样的问题。有人可以帮我吗?提前致谢。

【问题讨论】:

标签: ios objective-c video youtube youtube-api


【解决方案1】:

不幸的是,这个 youtube iOS 助手有很多问题,比如布局、文件位置等。我已经起草了一些改进的版本供我自己使用,但我不介意分享它并帮助其他人使用它。 .

它的工作原理与 iOS 帮助程序相同,但它具有一些其他改进和功能,可以执行您可能感兴趣的其他事情..

您可以找到library here,如果您对如何使用它有任何疑问,请告诉我。

我已经将它构建到一个带有硬编码播放列表的项目中..

如果您需要帮助,我可以指导您如何使用它。请告诉我.. :)

希望对你有帮助!

编辑:

抱歉,差点忘了这个库现在需要你的 AppDelegate.h 和 AppDelegate.m 中的一些东西,如果你的应用设置为纵向,这将帮助你强制横向模式。

所以,只需将其添加到您的 AppDelegate.h

@property (nonatomic) BOOL videoIsInFullscreen;

然后,这个到你的 AppDelegate.m

- (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window{
    if(self.videoIsInFullscreen == YES)
    {
        return UIInterfaceOrientationMaskAllButUpsideDown;
    }
    else
    {
        return UIInterfaceOrientationMaskPortrait;
    }

那你应该没事:)

另外,我在这个库中添加了一个网站还没有完成,但它有点引导你完成how to use the library in here!!!

【讨论】:

  • 抱歉,过了一段时间才回复。毕竟是周末。 :P 我会看看的。非常感谢。
猜你喜欢
  • 2014-08-04
  • 2015-03-05
  • 2014-11-05
  • 2015-04-03
  • 2014-12-17
  • 1970-01-01
  • 1970-01-01
  • 2014-11-21
  • 1970-01-01
相关资源
最近更新 更多