Ios8 iOS上的流媒体电影,有人能做到吗?

Ios8 iOS上的流媒体电影,有人能做到吗?,ios8,autolayout,vuforia,Ios8,Autolayout,Vuforia,我试图在视频播放示例中支持外部电影。您(应该)可以通过查找示例代码远程文件并更改bool来实现这一点,所以我这样做了 在我尝试播放视频之前,一切都正常。我可以看到它加载到播放器中,但当它出现时,屏幕仍然是黑色的——尽管我可以听到声音 这伴随着日志中的输出块: 2014-10-14 09:12:50.904 MARL_Adhoc[578:145994] Unable to simultaneously satisfy constraints. Probably at least one of th

我试图在视频播放示例中支持外部电影。您(应该)可以通过查找示例代码远程文件并更改bool来实现这一点,所以我这样做了

在我尝试播放视频之前,一切都正常。我可以看到它加载到播放器中,但当它出现时,屏幕仍然是黑色的——尽管我可以听到声音

这伴随着日志中的输出块:

2014-10-14 09:12:50.904 MARL_Adhoc[578:145994] Unable to simultaneously satisfy constraints.
Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
(
    "<NSLayoutConstraint:0x191f08b0 H:|-(34)-[MPKnockoutButton:0x17a876b0](LTR)   (Names: '|':_UIBackdropContentView:0x191d7180 )>",
    "<NSLayoutConstraint:0x191f0920 H:[MPKnockoutButton:0x17a876b0]-(34)-[MPDetailSlider:0x17a8bc50](LTR)>",
    "<NSLayoutConstraint:0x191f0950 H:[MPDetailSlider:0x17a8bc50]-(34)-[UIView:0x191d75d0](LTR)>",
    "<NSLayoutConstraint:0x191f08e0 UIView:0x191d75d0.right == _UIBackdropView:0x191d6890.right - 34>",
    "<NSLayoutConstraint:0x191d7bf0 H:|-(0)-[_UIBackdropView:0x191d6890]   (Names: '|':MPVideoPlaybackOverlayView:0x191d6650 )>",
    "<NSLayoutConstraint:0x191d7c60 H:[_UIBackdropView:0x191d6890]-(0)-|   (Names: '|':MPVideoPlaybackOverlayView:0x191d6650 )>",
    "<NSAutoresizingMaskLayoutConstraint:0x17a7eea0 h=-&- v=-&- _UIBackdropContentView:0x191d7180.midX == _UIBackdropView:0x191d6890.midX>",
    "<NSAutoresizingMaskLayoutConstraint:0x17a7eed0 h=-&- v=-&- _UIBackdropContentView:0x191d7180.width == _UIBackdropView:0x191d6890.width>",
    "<NSAutoresizingMaskLayoutConstraint:0x191ebfd0 h=-&- v=-&- MPSwipableView:0x17a90350.width == MPMovieView:0x1912deb0.width>",
    "<NSLayoutConstraint:0x191ec300 'UIView-Encapsulated-Layout-Width' H:[MPMovieView:0x1912deb0(320)]>",
    "<NSAutoresizingMaskLayoutConstraint:0x17a78ef0 h=-&- v=-&- MPVideoContainerView:0x1912cb30.width == MPSwipableView:0x17a90350.width - 320>",
    "<NSAutoresizingMaskLayoutConstraint:0x191ea8b0 h=-&- v=-&- MPVideoPlaybackOverlayView:0x191d6650.width == MPVideoContainerView:0x1912cb30.width>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x191f0920 H:[MPKnockoutButton:0x17a876b0]-(34)-[MPDetailSlider:0x17a8bc50](LTR)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
2014-10-14 09:12:50.904 MARL_Adhoc[578:145994]无法同时满足约束条件。
可能下面列表中至少有一个约束是您不想要的。试着这样做:(1)看看每个约束,试着找出你不期望的约束;(2) 找到添加了不需要的约束的代码,然后修复它。(注意:如果您看到不理解的NSAutoresizingMaskLayoutConstraints,请参阅UIView属性TranslatesAutoResizingMaskToConstraints的文档)
(
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
"",
""
)
将尝试通过打破约束进行恢复
在UIViewAlertForUnsatifiableConstraints处创建一个符号断点,以便在调试器中捕获该断点。
中列出的UIView上UIConstraintBasedLayoutDebugging类别中的方法也可能会有所帮助。
好的,太好了。问题是,UIViewAlertForUnsatifiableConstraints没有出现在我的代码中的任何地方,或者据我所知,Vuforia(应该出现吗?或者这是在说其他什么?)。在可见代码中,我找不到任何正在调用的约束或布局方法。界面生成器中似乎也没有

有人在iOS7/8上进行了全屏播放吗?

这为我解决了这个问题:
  • 将MPMoviePlayerController更改为MPMoviePlayerServices控制器
  • 初始化MPMoviePlayerViewController后: viewController.view.setTranslatesAutoresizingMaskIntoConstraints(真)

  • 由于我没有使用自动布局,所以播放时出现同样的问题是可行的。在我的例子中,progressbar会从屏幕上消失,只有当应用程序旋转时才会返回。如果关闭autolayout可以做到这一点,我可以问一下你是如何在应用程序中做到这一点的吗?这个应用程序是企业应用程序,根本不使用Autolayouts。但是将movieplayer添加到子视图会导致约束clash.interest。好的,让我看看整个自动布局的事情,看看我是否能找到一个全局开关或什么。好的,我确实在这个视图中关闭了自动布局。还是没有视频!我确实听到了声音,只是没有视频。嘿,德里斯,我在哪里做这两个改变中的第一个?在故事板上还是在代码里?@Maury你是如何初始化你的电影播放器的?与其初始化MPMoviePlayerController,不如实例化mpmovieplayervicewcontrollerorry Dries,现在就有机会玩这个。如果您指的是VideoPlayerHelper.h和.mm中的两个实例,我无法做出您建议的更改;当应用程序尝试触发播放时,它会收到属于MPMoviePlayerController的方法,而不是MPMoviePlayerViewController的方法。您在构建时没有收到一堆编译器警告吗?