Flash 视频未在 Android 3.0.1 的 WebView 中显示 [英] Flash video not displaying in WebView for Android 3.0.1

查看:20
本文介绍了Flash 视频未在 Android 3.0.1 的 WebView 中显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的 WebView 来显示带有 Flash 的网站(Adobe Flash 网站)——在运行 Android 3.0.1 和新发布的 Flash 10.2 的 Xoom 平板电脑上进行测试

I have a simple WebView to display a website with Flash (the Adobe Flash website) -- testing on a Xoom tablet running Android 3.0.1 with newly released Flash 10.2

参考stackoverflow上的每个问题后,我设置了以下内容:

After referring to every question on stackoverflow, I've set the following:

mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.getSettings().setPluginState(WebSettings.PluginState.ON);
mWebView.loadUrl("http://www.adobe.com/software/flash/about/");

使用 getSettings() 为 WebView 启用了 插件JavaScript,但 Flash 无法显示.当我将 setPluginState 设置为 ON_DEMAND 时,它显示了正确的 Flash 占位符——再次,当我点击 Flash 应该在的项目时,Flash 消失了(好像Flash 视频无法呈现)并且只能听到音频(取决于 Flash 内容).

Both Plugins and JavaScript are enabled for the WebView using getSettings(), yet Flash fails to show up. When I set setPluginState to ON_DEMAND, it shows the correct placeholder for Flash -- yet again, when I tap the item where Flash should be, the Flash disappears (as if the Flash video is failing to render) and only the audio (depending on the Flash content) can be heard.

我还注意到,我可以点按丢失的 Flash,长按,然后点按新 Flash全屏"按钮应该所在的左上角,然后它就会在全屏模式下正确显示.但是当我回退到 WebView 时,它再次无法显示并且只播放音频.

I've also noticed that I can tap the missing Flash, do a long-hold tap, then tap the top left where the new Flash 'Fullscreen' button SHOULD be and it'll then show up correctly in Fullscreen mode. But when I fall back to the WebView, it again fails to show up and only plays the audio.

任何想法都值得赞赏!请不要只是让我回到几个月前发布的内容,而没有详细说明为什么我指的是在 Android 3.0 发布前几个月发布的帖子!再次感谢任何帮助.很棒的社区!

Any thoughts are appreciated! Please don't just refer me back to something posted months ago without some details on why I'm referring to a post months before the Android 3.0 release! Thanks again for any help. Great community!

推荐答案

所以经过一个半星期以上的搜索高低,尝试不同的技术,几乎准备把我的平板电脑扔出窗外,我终于想通了它出来了——我不太高兴它是多么容易修复;再说一次,我是!

So after a week and a half+ of searching high and low, trying different techniques, and just about near ready to throw my tablet out the window, I finally figured it out -- and I'm not too happy how EASY it was to fix; then again, I am!

请记住,这是针对 Flash 视频未加载到我的 Xoom Android 3.0.1 平板电脑上的 WebView 中并启用 PluginState 的问题.阅读我的问题,然后是答案.享受!

Remember, this was directed toward the ISSUE of Flash video not loading into the WebView on my Xoom Android 3.0.1 tablet with PluginState ON. Read my question and then the answer. Enjoy!

第 1 步:只需将此添加到您的应用程序清单 XML 下的标记

Step 1: Simply add this to the tag under your Applications Manifest XML

android:hardwareAccelerated="true"

第 2 步:加载您的应用并享受启用 Flash 的 WebView!

Step 2: Load up your app and enjoy your Flash enabled WebView!

祝你好运!

这篇关于Flash 视频未在 Android 3.0.1 的 WebView 中显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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