Cannot play video inside WebView using iframe tag?
I am using the following data to display in a WebView
. These are the HTML tags along with
the iframe which is referring to a video.
Now the problem is when I click on it, it shows the play button but cannot play the video.
Can I play this video inside WebView
or not?
<p></p><P> because of Jon’s pro-growth, business-friendly policies,&nbsp;Utah's economy expanded at more than triple the national rate and was named the best state for business by&nbsp;<EM>Forbes.</em><BR /><BR /><IFRAME height=241 src="http://player.vimeo.com/video/25349114" frameBorder=0 width=425></iframe></p><br />
<P>America needs a dose of the same medicine. Today, our nation has the second highest corporate tax rate in the developed world. We have convoluted an开发者_如何学God confusing regulations.
<!--break--><!--break--><p></p>
when I try to run this url in the android browser it opens videoview and plays that file perfectly but why not in iframe? http://player.vimeo.com/video/25349114
The key thing is to enable browser plugins.
// how to enable the webview plugin changed in API 8
if (Build.VERSION.SDK_INT < 8) {
mWebView.getSettings().setPluginsEnabled(true);
} else {
mWebView.getSettings().setPluginState(PluginState.ON);
}
Also worth checking flash player is installed
WebView wv;
wv = (WebView) findViewById(R.id.mywebview);
wv.getSettings().setJavaScriptEnabled(true);
wv.getSettings().setBuiltInZoomControls(true);
wv.getSettings().setPluginsEnabled(true);
Use this code to load your video and also update the flashplayer of your device...
精彩评论