0

When I try to capture screen on Android device using MediaProjection, in general, it's ok. But I see a blank space instead of video (I mean, in in the area which I wanted to capture included some adv videos on FaceBook or some movie on Netflix).

BTW, Android P

projection = projectionManager?.getMediaProjection(resultCode, data)

virtualDisplay = projection?.createVirtualDisplay(captorDisplayName,
                            width!!,
                            height!!,
                            density!!,
                            DisplayManager.VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR,
                            imageReader?.surface,
                            null,
                            null)`
  • I guess these areas somehow protected... but, in my point of view, anyway it should be possible to capture them as well – Alexey Glukharev Jan 21 '19 at 11:19
  • 1
    Try recording a screencast of some non-protected video, such as something that you recorded yourself. If that works, then either the apps are protecting the content (via `FLAG_SECURE`) or it's tied into Android's DRM system. – CommonsWare Jan 21 '19 at 12:47

0 Answers0