cor*_*rey 8 flash android fullscreen webview
我正在将Flash SWF加载到Android WebView中.
我希望SWF立即全屏和专注.
处理flash的类名是com.adobe.flashplayer.FlashPaintSurface.看着日志,当我手动全屏显示闪光灯时,它会调用com.adobe.flashplayer.FlashPaintSurface.toggleFullScreen().
我的问题的第一部分是:如何手动为Flash SWF调用该方法?
请注意,对于嵌入了闪存的webview,我似乎能够正确地全屏显示它的唯一方法(使用Flash的surfaceview全屏而不是闪存显示在其上方webview view)是用两个手指触摸屏幕直到界面弹出在屏幕的顶部,并没有可靠地发生.
对于焦点,我在我的webview类中调用:
@Override
protected boolean drawChild (Canvas canvas, View child, long drawingTime) {
if (child.getClass().getName().equals("com.adobe.flashplayer.FlashPaintSurface")) {
child.requestFocus();
}
return super.drawChild(canvas, child, drawingTime);
}
Run Code Online (Sandbox Code Playgroud)
这并没有像我想象的那样设定焦点.虽然我假设,如果正确完全屏蔽,FlashPaintSurface应该给自己的焦点.但如果第一部分不可行,我想至少不必在启动时点击它来关注SWF.
请注意我动态执行此操作,而不是调用我自己创建的SWF,因此无法使用Actionscript解决此问题.
我使用之前解决Problem to load flv video in webview 的代码成功实现了这一点。可能会有一些帮助。
嵌入标签如下所示:
<embed
style="width:100%; height:100%"
src="./FLVPlayer.swf?fullscreen=true&video=./expression_sad.flv"
autoplay="true"
quality="high"
bgcolor="#000000"
name="VideoPlayer"
align="middle"
allowScriptAccess="*"
allowFullScreen="true"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5145 次 |
| 最近记录: |