通过电视输出播放 iPhone 电影

发布于 2024-09-27 15:58:59 字数 602 浏览 7 评论 0原文

有没有什么方法可以模拟视频应用程序,以便我们仍然保持对设备(iPad/iPhone)的控制,但通过电缆将视频发送到电视?我研究了屏幕镜像,但它对于视频来说太慢了,而且无论如何,苹果不再允许屏幕镜像使用的 UIGetScreenImage() 。

视频应用程序似乎完全满足了我的需要,但我没有看到任何简单的方法可以实现这一点。

更新(10/15/10):显然通过 UIWebView 播放的电影有 TV-Out 支持,而 MPMoviePlayerController 电影则没有。

http://rebelalfons.posterous.com/iphone-os-support-for -tv-out

但是,有一个警告:这不适用于更新到最新 iOS 的旧设备。即 iPod touch、iPhone 3G 和 iPhone 3G。 3GS 无法使用,而 iPhone 4 和 iPad 可以。希望我们可以使用更多的东西来填补兼容性方面的空白,因为我知道这是可能的。 AirVideo 和 StreamToMe 等应用程序目前支持此功能。

Is there any way to emulate the Videos app such that we still maintain controls on the device (iPad/iPhone), but sends the video out through the cables to the TV? I looked into screen mirroring, but it's way too slow for videos, and regardless, the UIGetScreenImage() used by screen mirroring is no longer allowed by Apple.

The Videos app seems to have exactly what I need, but I don't see anything simple to make that happen.

Update (10/15/10): So apparently movies played through UIWebView have TV-Out support, while MPMoviePlayerController movies don't.

http://rebelalfons.posterous.com/iphone-os-support-for-tv-out

However, there is a caveat: this does not work on older devices updated to the most recent iOS. That is, iPod touches, iPhone 3G & 3GS don't work, while iPhone 4 and iPads do. Hoping there's some more stuff that we can use to fill in the gaps in compability, since I know its possible. Apps like AirVideo and StreamToMe currently support this functionality.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

卖梦商人 2024-10-04 15:58:59

我不确定是否有官方方法可以做到这一点。但就您的示例而言,AirVideo 使用 Swizzling 方法(请查看: http://www.cocoadev.com /index.pl?MethodSwizzling)来覆盖电影播放器​​中的检查,并像视频应用程序一样工作,

我猜有些在 SDK 上进行了一些逆向工程,您可以找到进行检查的位置,并且将该方法与您的自定义方法混合在一起。

I am not sure if there is an official way to do this. But as for your examples, AirVideo uses method Swizzling (check out: http://www.cocoadev.com/index.pl?MethodSwizzling) to override checks in Movie Player, and acting like Videos app

I guess some with some reverse engineering on SDK, you can find where the checks are made, and swizzle that method, with your custom one.

皓月长歌 2024-10-04 15:58:59

在 3.2 及更高版本中(发布您链接到的站点),UIScreen 有一个类方法“screens”,如果没有可用的外部显示器,它将返回一个对象(主屏幕)的数组,或者返回两个屏幕(主屏幕)以及外部屏幕 — 如果连接了电视线。该任务应该很简单,只需将您想要在外部屏幕上显示的视图放置在其框架内,并将您想要在设备上显示的控件放置在另一个框架内即可。

你尝试过吗?

编辑一条附加评论:同样从 3.2 开始,明确允许创建一个 MPMovieController,然后从中获取视图以将其视为普通的 UIView,而不是进行完整的“呈现”。这样您就可以获得可以根据需要定位的电影视图。

In 3.2 and later (postdating the site you link to), UIScreen has a class method, 'screens' that'll return an array of one object — the main screen — if no external display is available, or two screens — the main screen and the external screen — if a TV lead is connected. The task should be as simple as positioning the views you want to appear on the external screen within its frame and the controls you want on the device within the other.

Have you tried that?

Edited for one additional comment: also as of 3.2, it is explicitly permissible to create an MPMovieController and then grab the view from it to treat as a normal UIView rather than doing a full 'present'. So that's how you'd get a movie view that you can position as you wish.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文