在android webview中播放视频 [英] Playing videos in android webview

查看:99
本文介绍了在android webview中播放视频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用播放视频的网络视图在Android中创建一个Web浏览器但它不起作用。任何人都可以帮助我播放来自未知src的视频。

I am trying to create a web browser in android using web view that plays a video but it won''t work. Can anybody help please me play videos from unknown src.

推荐答案

除了可能在具有Flash的设备上之外,您无法显示嵌入的视频。如果您可以解析YouTube视频详细信息,则可以构建一个ACTION_VIEW意图,该意图将在YouTube应用程序上显示(对于那些拥有YouTube应用程序的Android设备)。还要尝试HTML5的
You cannot show video embedded except perhaps on devices that have Flash. If you can parse out the YouTube video details, you may be able to construct an ACTION_VIEW Intent that will show them on the YouTube application(for those Android devices that have the YouTube application). Also experiment with HTML5''s
<video>

标记,在浏览器应用程序中受支持,因此可以在WebView中使用。

tag, which is supported in the Browser application and may therefore work in WebView.


这篇关于在android webview中播放视频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆