webview本地视频文件

时间:2013-09-10 08:44:18

标签: android flash webview

首先,我想指定一件事:

webView.loadUrl("http://mydomain.com/file.html"); // working

但不是如果它是这样的本地文件:

webView.loadUrl("file:///android_asset/file.html"); // won't working

Html文件:

swfobject.embedSWF("file.swf", "flashcontent", "100%", "100%", "9.0.124", "expressInstall.swf", flashvars, params, attributes);

webView .java文件:

webView = (WebView) findViewById(R.id.webView1);
webView.setWebChromeClient(new WebChromeClient());
webView.getSettings().setJavaScriptEnabled(true);
webView.getSettings().setAllowFileAccess(true);
webView.getSettings().setPluginState(PluginState.ON);


webView.loadUrl("file:///android_asset/file.html");

我的清单:

<uses-sdk android:minSdkVersion="11" />
    ...
    <application
    android:hardwareAccelerated="true"...

我的资产文件夹:

file .html
file .xml
file .swf
file .f4v

我的file.swf调用f4v电影,但只显示黑屏。

如果你可以帮助我,那么非常感谢!!!

编辑:我的logcat eclipse

09-10 10:07:29.420: E/webview(11210): registerForStylusPenEvent onAttachedToWindow
09-10 10:07:29.420: E/webview(11210): registerForStylusPenEvent START
09-10 10:07:29.425: E/webview(11210): registerForStylusPenEvent END
09-10 10:07:29.605: E/SpannableStringBuilder(11210): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length
09-10 10:07:29.605: E/SpannableStringBuilder(11210): SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length

0 个答案:

没有答案