android - 无法使用 iframe 标签在 WebView 内播放视频?

标签 android iframe webview

我正在使用以下数据在 WebView 中显示。这些是 HTML 标签以及 引用视频的 iframe。

现在的问题是当我点击它时,它显示播放按钮但无法播放视频。

我能否在 WebView 中播放此视频?

<p></p><P> because of Jon’s pro-growth, business-friendly policies, Utah's economy expanded at more than triple the national rate and was named the best state for business by <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 and confusing regulations. 
<!--break--><!--break--><p></p>

当我尝试在 android 浏览器中运行此 url 时,它会打开 videoview 并完美播放该文件,但为什么不在 iframe 中运行? http://player.vimeo.com/video/25349114

最佳答案

关键是启用浏览器插件。

// 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);
}

同样值得一试 flash player is installed

关于android - 无法使用 iframe 标签在 WebView 内播放视频?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6546939/

相关文章:

Android VideoView,方向改变时无缝播放

java - 地点自动完成未找到类 "com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable"

android - 需要一个字符串,但在 $.Result 处是 BEGIN_OBJECT

javascript - 在 iframe(不同域)上获取推荐 url?

css - 尝试仅使用 div 和 css 而不是表格来实现格式化

android - 现有的应用程序与 android 3.0 XOOM 一起爆炸。 ZoomButtonsController 泄漏?

android - 快捷方式将光标移动到方法android studio中的下一个/上一个参数?

javascript - 如何在 Google 搜索结果页面中嵌入 iframe

iphone - 如何在 iPhone 的 webview 中加载地址?

Android webview html 合规性?