简体   繁体   English

Android关闭ChromeCast屏幕镜像功能

[英]Android turn off ChromeCast Screen Mirroring function

I have a problem with ChromeCast Screen Mirroring function. 我的ChromeCast屏幕镜像功能有问题。 Because my content is protected (DRM video) if the user use Screen Cast i need check and turn off or show something else (like protected content message picture) and not the video. 因为如果用户使用Screen Cast,我的内容受到保护(DRM视频),所以我需要检查并关闭或显示其他内容(例如受保护的内容消息图片)而不是视频。

My question is: Its possible detect Screen Mirroring and disable in code? 我的问题是:它可能检测屏幕镜像并在代码中禁用吗?

You can implement Chromecast-support in your app and choose which layout to cast when the screen is mirrored (so just cast an empty layout or information etc). 您可以在应用中实现Chromecast支持,并选择在镜像屏幕时要投射的版式(因此只需投射空版式或信息等)。 If you check the example PresentationWithMediaRouterActivity in Android ApiDemos (or Google it and you will find the files needed), you can see a good example implementation that does just that. 如果您查看Android ApiDemos(或Google的它)中的PresentationWithMediaRouterActivity示例,则可以看到一个很好的示例实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM