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.
- Try to play.
- 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.