如何实现的StageVideo在Adobe AIR为Android? [英] How to implement stagevideo in adobe air for android?

查看:468
本文介绍了如何实现的StageVideo在Adobe AIR为Android?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在开发基于桌面的应用程序,我在Adobe AIR客户其使用MX播放视频:VideoDisplay的和图像的播放列表。现在,他需要与空气相同的code基为Android以及相同的应用程序。

I have been developing desktop based app for my customer in Adobe AIR which plays video using mx:videoDisplay and images in a playlist. Now he needs the same app with same code base in AIR for Android as well.

我能够使该应用程序的APK。但他想的StageVideo播放的视频。 我搜索,发现这个(http://www.adobe.com/devnet/flashplayer/articles/stage_video.html)的文章和样品code,但我找不到在我的情况下玩。 任何一个可以帮助我吗?我很短的时间。

i am able to make the APK of that app. but he wants StageVideo to play the videos. i searched and found this(http://www.adobe.com/devnet/flashplayer/articles/stage_video.html) article and sample code but i could not find this to play in my case. can any one help me out? i am short of time.

推荐答案

从我的测试中,的StageVideo 只曾在安卓4.0+。它绝对没有在2.3的工作,我无法得到它在3.0上运行,尽管这可能只是由于低迷的平板电脑,我们有可用于测试。

From my testing, StageVideo only worked in Android 4.0+. It definitely did not work in 2.3 and I could not get it to run on 3.0, though that may have just been due to the lackluster tablet we had available for testing.

您还必须使用任何GPU或直接渲染模式。使用CPU或自动(目前默认为CPU)将不会在这里工作。这也将导致一些问题,因为并非所有的Andr​​oid设备都支持GPU或直接渲染和GPU渲染都有自己的怪癖(如不允许半透明像素)。

You must also use either GPU or Direct rendering mode. Using CPU or Auto (which currently defaults to CPU) will not work here. This will also cause some issues since not all Android devices support GPU or Direct rendering and GPU rendering has its own quirks (like not allowing semi-transparent pixels).

还有一件事值得一提:是的StageVideo不显示列表上。它直接呈现在舞台上,这是的的一切。所以,如果你试图把它放在你的应用程序,一切在舞台上会覆盖它。为了解决这个问题,我创建了一个不断抽出,然后将该应用到我的顶层容器口罩的自定义类。这种面膜有效地通过我的应用程序砸出一个洞,这样的视频播放器可以看到。

Another thing worth noting: StageVideo is not in the display list. It is rendered directly on the stage, which is below everything. So if you try to place it in your app, everything else on the stage will be covering it. To get around this, I created a custom class that continuously drew out a mask that was then applied to my top-level container. This mask effectively punched a hole through my app so that the video player could be seen.

的StageVideo不可否认流畅和一个伟大的表演者,但最终它是实现一个真正的痛苦。除非你的客户绝对苛求你使用它,我建议坚持的VideoDisplay或使基础上,OSMF包你自己的视频播放器。

StageVideo is undeniable smooth and a great performer, but in the end it is a real pain to implement. Unless your client is absolutely demanding you use it, I suggest sticking to VideoDisplay or making your own video player based on the OSMF packages.

这篇关于如何实现的StageVideo在Adobe AIR为Android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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