Airplay from iPad - a separate UIView to display on Apple TV

杀马特。学长 韩版系。学妹 提交于 2019-12-04 09:46:24

问题


I want to use Airplay to send images in high definition to a Apple TV.

Airplay works fine on my iPad 2 with iOS 5.0.1.

When I start my app, my UIScreen screens array only has 1 item in it. (the iPad of course). I register for the notification for more screens, it never comes unless i bring up the multitasking bar and select my Apple TV. I don't want to do this.

I want an in app pop over where I can select the Apple TV or any other airplay device in the list.

I used MPVolumeView, which did give me that list - and did let me select the Apple TV - but I stil don't get the call back notification that the Apple TV has been selected - so that I can setup my UIWindow for the new view! (but the multitask bar does confirm that the Apple TV is now ticked and the icon from MPVolumeView does go blue too).

I've tried the externalDisplay sample app too, and this too only shows one screen in the list of UIScreens when the app starts.

What am I missing?

Thanks


回答1:


Unfortunately, I believe the behavior you are describing is accurate and by-design. When you're talking about accessing your Apple TV as another UIScreen, you're talking about "mirroring" and enabling mirroring requires the specific end-user action you describe: going to the multitasking bar and turning mirroring on.

It would be nice to be able to enable mirroring from within an app - I hope somebody corrects me if I'm wrong because I would like this for my app!



来源:https://stackoverflow.com/questions/8587218/airplay-from-ipad-a-separate-uiview-to-display-on-apple-tv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!