本文介绍了如何在 adobe air 中为 android 实现 stagevideo?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我一直在为我的客户在 Adob​​e AIR 中开发基于桌面的应用程序,该应用程序使用 mx:videoDisplay 和播放列表中的图像播放视频.现在,他还需要在 AIR for 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)文章和示例代码,但我找不到它在我的情况下播放.谁能帮我吗?我没时间了.

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 仅适用于 Android 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 或 Auto(当前默认为 CPU)在此处不起作用.这也会导致一些问题,因为并非所有 Android 设备都支持 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.

这篇关于如何在 adobe air 中为 android 实现 stagevideo?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 14:30