iphone - ios4 中不显示外部视频

标签 iphone objective-c cocoa-touch external-display

我需要将视频输出从我的 iPhone 应用程序发送到外部视频屏幕。我使用的是 Apple 复合 AV 电缆。当我通过 iPod 应用程序播放视频时,我会得到视频输出,但是当我这样做时

[[UIScreen screens] count];

我只能看到一个屏幕,即手机主屏幕。对于我的应用程序,我需要有一个完全独立的窗口,就像这里的过程一样:

Support for External Displays and Projectors An iPad can now be connected to an external display through a supported cable. Applications can use this connection to present content in addition to the content on the device’s main screen. Depending on the cable, you can output content at up to a 720p (1280 x 720) resolution. A resolution of 1024 by 768 resolution may also be available if you prefer to use that aspect ratio.

To display content on an external display, do the following:

Use the screens class method of the UIScreen class to determine if an external display is available. If an external screen is available, get the screen object and look at the values in its availableModes property. This property contains the configurations supported by the screen. Select the UIScreenMode object corresponding to the desired resolution and assign it to the currentMode property of the screen object. reate a new window object (UIWindow) to display your content. Create a new window object (UIWindow) to display your content. Assign the screen object to the screen property of your new window. Configure the window (by adding views or setting up your OpenGL ES rendering context). Show the window.

所有这些都是 here以更易读的格式。我正在使用 iphone,而不是 ipad,但文档说 ios4 中的 iphone 现在支持外部屏幕。

如何让手机意识到连接了另一个屏幕?谢谢

最佳答案

为了子孙后代,

我的问题是我使用的是 iPhone 3GS。 ios4 视频输出需要 iPhone 4(我听说它也适用于 3.2 的 ipad)。使用 iPhone 4,我能够输出复合视频。

关于iphone - ios4 中不显示外部视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3168350/

相关文章:

iphone - 使用 Dirac 在 iPhone 中实时改变音调

ios - UIWebView 专注于特定方 block

iphone - NSObject 和 UIViewController 有什么区别

iphone - iPhone 设备上的 Paypal SDK 支持

iphone - 显示按日期对核心数据进行排序

ios - 在 iOS 上,为什么下面的 UITapGestureRecognizer (Tap) 不起作用?

iOS:逐步集成 PayPal braintree

ios - 有没有办法在 AVPlayerLayer 中捕获 View 的屏幕截图?

ios - 带有 NSAttributedString 和自定义属性的 UITextView 不起作用

ios无尽的视频录制