我试图在webview中播放html5视频,需要setPluginsEnabled
WebView.getSettings().setPluginsEnabled
但它不存在对象。
问题是什么 ?
这是我的代码:
package com.example.arachim;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import android.webkit.WebViewClient;
public class MainActivity extends Activity {
WebView view;
//@SuppressWarnings("deprecation")
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
view = new WebView(this);
String url= new String("http://broken-links.com/tests/video/");
WebChromeClient chromeClient = new WebChromeClient();
WebViewClient wvc = new WebViewClient();
view.setWebChromeClient(chromeClient);
view.setWebViewClient(wvc);
view.getSettings().setJavaScriptEnabled(true);
view.getSettings().setP
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}