i am trying to load a webpage on a web view where the page has a video in it. i am able to load the web page on the web view but the video is not playing and the audio is heard. this is the link i m loading to a web view.
http://html5videoformatconverter.com/html5-video-tag-example.html
and all i m doing is
public class VideoActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
WebView mWebView = (WebView) findViewById(R.id.wvVideo);
mWebView.setWebChromeClient(chromeClient);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setPluginsEnabled(true);
mWebView.loadUrl("http://html5videoformatconverter.com/html5-video-tag-example.html");
}
private WebChromeClient chromeClient = new WebChromeClient(){
@Override
public void onShowCustomView(View view, CustomViewCallback callback) {
// TODO Auto-generated method stub
super.onShowCustomView(view, callback);
if(view instanceof FrameLayout){
FrameLayout frame = (FrameLayout)view;
if(frame.getFocusedChild()instanceof VideoView){
VideoView video = (VideoView)frame.getFocusedChild();
frame.removeView(video);
video.start();
}
}
}
};
}
pls help me modify my code. thanks