Android turn off ChromeCast Screen Mirroring function

折月煮酒 提交于 2019-12-04 05:05:43

问题


I have a problem with ChromeCast Screen Mirroring function. 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.

My question is: Its possible detect Screen Mirroring and disable in code?


回答1:


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). 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.



来源:https://stackoverflow.com/questions/26620764/android-turn-off-chromecast-screen-mirroring-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!