我正在尝试在WebView中运行SWF文件 但是我什么也没显示 尽管我可以通过应用程序Dolphin Video运行相同的文件,但这意味着可以 怎么做?
我的代码
webView?.settings?.javaScriptEnabled = true;
webView?.settings?.allowFileAccess = true;
webView?.settings?.useWideViewPort = false
webView?.settings?.loadWithOverviewMode = false
webView?.settings?.setSupportZoom(false)
webView?.settings?.pluginState = WebSettings.PluginState.ON
webView?.settings?.setAppCacheEnabled(true)
webView?.settings?.databaseEnabled = true
webView?.settings?.domStorageEnabled = true
webView?.webChromeClient = WebChromeClient()
var html = "<object width=\"550\" height=\"400\"> " +
"<param name=\"movie\" value=\"file:///android_asset/test.swf\"> " +
"<embed src=\"file:///android_asset/test.swf\" width=\"550\" height=\"400\"> " +
"</embed> </object>"
var mimeType = "text/html"
var encoding = "utf-8"
webView?.loadDataWithBaseURL("null", html, mimeType, encoding, "")
只显示白屏