0

I use flex to develop a android app ,and I use Red5 Server as the Media Server to share video data.

I want the application to play a NetStream from Red5.

var ns:NetStream = new NetStream(nc);
var video:Video = new Video();
video.width = 313;
video.height = 194;
video.attachNetStream(ns);

ns.play("fromPC");

videoDisplay.addChild(video);

VideoDisplay is declared like this:

<s:VideoDisplay x="10" y="10"
                width="320" height="193"
                id="videoDisplay"/>

Adobe suggests to avoid using <s:VideoDisplay/> on mobile devices, but I found out it's working with Android 3.X and not in Android 4.X.

So I'd like to know what I can use to play a NetStream on Android 4.0 and later versions.

duTr
  • 714
  • 5
  • 21
user59853
  • 1
  • 1

1 Answers1

0

Use StageVideo instead of Video/VideoDisplay. Mobile devices perform much, much better with StageVideo.

Be sure that the color depth is 32bit in the app xml. Also be sure that there's no background on the application stage and that there's nothing on top of the StageVideo.

In addition, what devices are you testing on? There's at least one device (Galaxy Tab 7" 2.0) that has never played video through AIR for me.

Nathan
  • 241
  • 1
  • 6