在与flash元素的网页采取截图 [英] take screenshot on web page with flash element

查看:718
本文介绍了在与flash元素的网页采取截图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想截取在WebView中显示的网页的屏幕截图。该网页可能包含 flash元素,我指的是 >,但当我截取屏幕截图时,页面的所有闪存部分都为空白。

I would like to take a screenshot of a page displayed in a WebView. The page may contains flash elements, I refer to google feedback, but when I take a screenshot all the flash parts of the page are blank.

无法控制flash元素(例如视频),因为它不是我的

The flash element(for example video) can not be controlled because it is not my own website.

除了我不想使用任何浏览器扩展

推荐答案

使用嵌入在同一页面上的JavaScript,不可能在网页上截取Flash元素的屏幕截图。所有可用的JS解决方案(此处的更多详细信息)正在读取当前DOM状态和在canvas元素上渲染(使用JS渲染引擎实现)网页。 Flash对象由单独的应用程序(Flash Player)执行。 JS无法访问其内容,在JS中没有Flash渲染引擎实现。

It's impossible to take a screenshot of Flash elements on the webpage using JavaScript embedded on the same page. All available JS solutions (more details here) are reading current DOM state and rendering (using JS render engine implementation) a web page on a canvas element. Flash object is executed by separate application - Flash Player. JS can't access its contents, there is no Flash render engine implementation in JS.

但是,由于你提到了WebView,而你正在谈论Flash,那么我假设你正在使用原生Android应用程式。因此,原生应用应该很容易创建屏幕截图(请参阅此)。

However, since you mentioned WebView and you are talking about Flash then I assume that you are working on the native Android app. Therefore, it should be fairly easy for a native app to create a screenshot (see this).

这篇关于在与flash元素的网页采取截图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆