问题描述
我正在尝试通过调用 loadDataWithBaseURL 方法并将嵌入数据传递给它来播放 SWF 视频。但是视频没有开始播放,只是显示白屏。难道我做错了什么 ?
源代码
protected void onCreate(Bundle savedInstanceState) {
// Get Web View from the layout.
mWebView = (WebView) findViewById(R.id.webViewOnlieWebCams);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setPluginsEnabled(true);
mWebView.getSettings().setAllowFileAccess(true);
String mimeType = "text/html";
String encoding = "utf-8";
String embed = "<embed type=\"application/x-shockwave-flash\" src=\"/bundles/mymain/swf/player-licensed.swf\" width=\"320\" height=\"390\" style=\"undefined\" id=\"mpl\" name=\"mpl\" quality=\"low\" allowfullscreen=\"true\" allowscriptaccess=\"always\" wmode=\"opaque\" flashvars=\"autostart=true&file=camera39.stream&streamer=rtmp://wss.yerevan.am/axis&logo=/bundles/mymain/images/logo10.png&logo.hide=false&logo.position=bottom-left&logo.timeout=3\">";
mWebView.loadDataWithBaseURL(null, embed, mimeType, encoding, "");
}