I am trying to load a webpage that has an mp4 video on it. It displays a blank screen for android 4.3 (JellyBean) but it works for all versions after that. Any idea why this is?
Below is my code
public class VideoSample extends ActionBarActivity {
private WebView mWebViewPlayer;
private String mSampleMp4 = "http://techslides.com/demos/sample-videos/small.mp4";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_lime_light);
mWebViewPlayer = (WebView) findViewById(R.id.limeWebView);
mWebViewPlayer.getSettings().setJavaScriptEnabled(true);
mWebViewPlayer.getSettings().setLoadWithOverviewMode(true);
try {
mWebViewPlayer.loadUrl(mSampleMp4);
} catch (Exception e) {
e.printStackTrace();
}
}
}
I am not getting any errors either. I have searched teh forum for a similar problem but Im not having any luck.
What if you use setWebViewClient(new WebViewClient()); and setPluginsEnabled(true); to webview?