在 iOS 5 上阻止 AirPlay 镜像
在装有 iPad 2 或 iPhone 4S 的 iOS 5 上,用户可以通过 Apple TV 和 AirPlay 启用屏幕镜像。如何防止我的应用程序以这种方式被镜像?有什么方法可以检测到这种镜像的发生,以便我可以阻止我的内容被镜像吗?
这样做的原因是因为我有法律不允许在电视屏幕上显示的内容。
On iOS 5 with an iPad 2 or iPhone 4S, users can enable screen mirroring with their Apple TV and AirPlay. How can I prevent my app from being mirrored in this way? Is there any way to detect that this mirroring is taking place so I can prevent my content from being mirrored?
The reason for doing this is because I have content I'm not legally allowed to display on a television screen.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是一个非常非常糟糕的主意,我讨厌它,因为你抑制了你的用户。也就是说,AirPlay 镜像的工作方式与连接 VGA/HDMI 适配器相同,当您连接适配器时,您可以在“第二个显示器”上显示您想要的任何内容。如果您想“阻止”镜像,您可以将外部显示器的窗口设置为空白/纯黑视图。
查看 iOS 视图编程指南,特别是Windows 部分和 在外接显示器
This is a really really bad idea and I hate it as you are inhibiting your users. With that said, AirPlay mirroring works the same way as connecting the VGA/HDMI adapter, when you connect an adapter you have the ability to display whatever you want on the "second monitor". If you want to "block" mirroring you could set the external display's window to a blank/solid black view.
Check out the View Programming Guide for iOS, specifically the Windows section and Displaying Content on an External Display
只是在这里添加完成这项非常简单的工作的代码
Just to add the code for doing this pretty simple work Here