I'm trying to play html5 video in webview and need to setPluginsEnabled
WebView.getSettings().setPluginsEnabled
but it's not exist for object.
what is the problem ?
this is my code:
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;
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…