开发者

Blocking HDMI output of video

开发者 https://www.devze.com 2023-04-12 11:02 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号