Android 如何在api 24上的webview中拍摄html页面的屏幕截图和视频?

Android 如何在api 24上的webview中拍摄html页面的屏幕截图和视频?,android,video,webview,screenshot,android-pixel-copy,Android,Video,Webview,Screenshot,Android Pixel Copy,我需要在Android API 24上截图 如果我使用下面的代码,我可以截图,但是html页面上的视频是黑色的方块 float scale = webView.getScale(); int height = (int) (webView.getContentHeight() * scale + 0.5); Bitmap bitmap = Bitmap.createBitmap(webView.getWidth(), height, Bitmap.Config.ARGB_8888);

我需要在Android API 24上截图

如果我使用下面的代码,我可以截图,但是html页面上的视频是黑色的方块

  float scale = webView.getScale();
  int height = (int) (webView.getContentHeight() * scale + 0.5);
  Bitmap bitmap = Bitmap.createBitmap(webView.getWidth(), height, Bitmap.Config.ARGB_8888); 

  Canvas canvas = new Canvas(bitmap);
  webView.draw(canvas);
我尝试使用PixelCopy,但我可以在Android Nuget中使用


如何在api 24上使用webview视频制作html页面的屏幕截图?

检查下面的链接视频是否加密-如果是,这是预期行为?检查下面的链接视频是否加密-如果是,这是预期行为?