Blocking HDMI output of video
For legal reasons we need to prevent users from playing the video in our app on external screen (TV, monitors), I know how to stop airplay output but we need to stop HDMI output as well, does anybody know if we can do this or perhaps we can detect HDMI output and stop 开发者_如何学运维the video playing altogether.
You can detect the external HDMI screens with: [[UIScreen screens] count]
Then you can get the external screen instance with: UIScreen* secondScreen = [[UIScreen screens] objectAtIndex:1];
Finally, you can create new UIWindow, ititialize it with the same screen bounds and assign the external screen to its .screen. You can add new views to this UIWindow instance.
精彩评论