在 iOS 设备上禁用应用程序视频外的视频

发布于 2024-12-02 19:21:40 字数 266 浏览 0 评论 0原文

我正在开发一个 iOS 应用程序,该应用程序包含受版权保护的视频。我可以使用它们在应用程序中看到,但在连接到电视时看不到。 IE。通过 HDMI 或组件 - 相反,当视频正在播放并且有人将电视输出连接到设备时,我需要显示一个屏幕,例如启动画面,说这是不允许的等等...

所以我的问题是,当电视输出设备已连接到该设备?或者我如何知道何时向 MPMoviePlayerController 请求电视输出(这是我用来显示视频的)?

我到处搜索这个问题但找不到任何答案!

谢谢。

I have an iOS app which I am developing, this app has videos which are copyright material. I am allowed to use them to be seen within the app but not to be seen when connected to a TV. ie. via HDMI or component - instead when a video is playing and someone connects a tv out lead to the device i need to display a screen like a splash screen saying it is not allowed etc...

So my question is how can i catch when a tv out device has been connected to the device? or how can i know when tv out has been requested to the MPMoviePlayerController (which is what im using to display the video)?

I have searched everywhere for this and can not find any answer!

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

嘦怹 2024-12-09 19:21:40

查看技术问答 QA1738:如何选择退出视频镜像< /a>.这是您基本上需要做的:

UIScreen *aScreen;

NSArray *screens = [UIScreen screens];
for (aScreen in screens) 
{
    if ([aScreen respondsToSelector:@selector(mirroredScreen)] 
              && [aScreen mirroredScreen] == [UIScreen mainScreen]) 
    {
        // The main screen is being mirrored.
    }
    else 
    {
        // The main screen is not being mirrored, or
        // you are not running on a compatible device.
    }
}

Check out Technical Q&A QA1738: How to Opt Out of Video Mirroring. Here is what you basically need to do:

UIScreen *aScreen;

NSArray *screens = [UIScreen screens];
for (aScreen in screens) 
{
    if ([aScreen respondsToSelector:@selector(mirroredScreen)] 
              && [aScreen mirroredScreen] == [UIScreen mainScreen]) 
    {
        // The main screen is being mirrored.
    }
    else 
    {
        // The main screen is not being mirrored, or
        // you are not running on a compatible device.
    }
}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文