从Android的web视图播放本地的SWF文件 [英] Playing SWF files locally from Android Webview

查看:179
本文介绍了从Android的web视图播放本地的SWF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是浏览,播放的FLV视频在Android的SWF文件的正确方法?在code,我使用的是现在以启用Web视图Flash支持的

What is the right way to view .Swf files that plays .Flv videos in Android? The code that I am using right now to enable Flash support in web view is

    WebView mWebView = (WebView) findViewById(R.id.webview);
    mWebView.getSettings().setJavaScriptEnabled(true);
    mWebView.getSettings().setAllowFileAccess(true);
    mWebView.getSettings().setPluginsEnabled(true);
    mWebView.getSettings().setSupportZoom(false);
    mWebView.getSettings().setAppCacheEnabled(false);
    mWebView.getSettings().setAllowContentAccess(true);
    mWebView.getSettings().setCacheMode(mWebView.getSettings().LOAD_NO_CACHE);

有关HTML文件,我使用SWFObject。

For the HTML file, I'm using swfObject.

问题是,我可以打开该SWF文件从市场上的第三方应用程序,如SWF播放器就好了。另外,我可以通过直接调用它通过文件加载从浏览器的HTML页面:///。然而,当我用我的WebView加载它,我坚持一个空白屏幕。任何提示?

The problem is that I can open up the SWF file just fine from third party apps like SWF Player from the market. In addition, I can load up the HTML page from the browser by calling it directly through file:///. However, when I load it up using my webview, I'm stuck with a blank screen. Any tips?

感谢。

推荐答案

你有:

<application android:hardwareAccelerated="true"...

在你的Andr​​oidManifest.xml?

in your AndroidManifest.xml?

我对3.2有类似的问题,这解决了我。 4. +有这个默认启用的(我相信)。

I had a similar problem on 3.2 and this solved it for me. 4.+ has this enabled by default (I believe).

ð/.

这篇关于从Android的web视图播放本地的SWF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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