如何使用Android的媒体codeC记录的WebView活动的屏幕? [英] How to record webview activity screen using Android MediaCodec?

查看:229
本文介绍了如何使用Android的媒体codeC记录的WebView活动的屏幕?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须在一个web视图记录用户活动的任务,换言之,我需要而在用户定位在一个web视图创建mp4视频文件。 pretty的挑战性:) 我的字体在Android的4.3引入了媒体codeC:已扩大到包括一种方法,通过提供一个表面(通过createInputSurface法)输入。这使得输入来自相机preVIEW或OpenGL ES渲染。 我甚至找到一个例子,你可以记录游戏写在OpenGL: http://bigflake.com/media$c$cc/

I have the task to record user activity in a webview, in other words I need to create an mp4 video file while the user navigates in a webview. Pretty challenging :) I font that in Android 4.3 introduced MediaCodec : was expanded to include a way to provide input through a Surface (via the createInputSurface method). This allows input to come from camera preview or OpenGL ES rendering. I even find an example where you could record a game written in opengl : http://bigflake.com/mediacodec/

我的问题是:我怎么可能录制的WebView活动?我认为如果我能得出的WebView内容的OpenGL纹理,比一切都将被罚款。但我不知道如何做到这一点。

My question is : how could I record a webview activity ? I assume that If I could draw the webview content to opengl texture, than everything would be fine. But I don't know how to do this.

任何人可以帮助我在这?

Can anybody help me on this?

推荐答案

为什么不试试<一href="http://developer.android.com/reference/android/webkit/WebView.html#onDraw%28android.graphics.Canvas%29"相对=nofollow> WebView.onDraw 第一,而不是使用OpenGL?后一种方式可能是更复杂的,并且不支持的所有设备。

Why not try WebView.onDraw first, instead of using OpenGL? The latter approach may be more complicated, and not supported by all devices.

一旦你将能够获得的截图,那么你可以创建视频(的创建从Android上图像序列),一个单独的任务,其中媒体codeC应该帮助视频。

Once you will be able to obtain the screenshots, then you can create the video (to create video from image sequence on android), a separate task where mediacodec should help.

这篇关于如何使用Android的媒体codeC记录的WebView活动的屏幕?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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