StageVideo on Android Nexus 7 shows a black square

邮差的信 提交于 2019-12-11 10:36:58

问题


StageVideo in Adobe AIR 15, on a Nexus 7 with Android 4.4.3, exporting in both GPU and DIRECT, shows a black square instead of received video. It is a P2P RTMFP Video Chat. Same project on desktop works perfectly, once exported to Android, instead of remote StageVideo it shows a black square. Audio arrives perfectly, and other P2P features work well. Code is all right since same project compiles on AIR15 for desktop and works lovely. Any idea why this happens?


回答1:


The stage video is switching a render state. It's an annoying bug, and this is what you can do as a patch.

  1. Try to play.
  2. if RENDER_STATE has changed to UNAVAILABLE or SOFTWARE, play again!

This will cause black flickering and not the best UX, but the clip will play after a second or 2.

_stageVideo.addEventListener(StageVideoEvent.RENDER_STATE, function (e:StageVideoEvent):void{
                trace ("RENDER STATE: ", e.status);
                if (e.status == VideoStatus.UNAVAILABLE || e.status == VideoStatus.SOFTWARE)
                {
                    _ns.play(_videoURL);
                }
            });

If you find a more effective solution following this info, please post it. Thank you.



来源:https://stackoverflow.com/questions/26632755/stagevideo-on-android-nexus-7-shows-a-black-square

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!