Skip to main content
DJ Gecko
Inspiring
November 12, 2014
Question

Playing a video in AIR on a mobile device

  • November 12, 2014
  • 1 reply
  • 714 views

Does anyone have any walkthrough they can share for how to play a video in an mobile AIR app? This would be for a video that's bundled with the air app.

Thanks!

This topic has been closed for replies.

1 reply

DJ Gecko
DJ GeckoAuthor
Inspiring
November 13, 2014

Thank you for sharing that. But that's for the Flash Player. I hoping to find a tutorial that speaks specifically about mobile development. What codecs are supported, best practices, etc. I need something to share with students. Thanks!

Colin Holgate
Inspiring
November 13, 2014

I haven't seen a walkthrough, but these are the basic details:

You can play FLV with MP3 audio in the way you always did, if you used netstream that is. The FLVPlayback component won't work for iOS, because it has external code that Apple wouldn't allow. The video would be playing back just using the CPU, but at least you could use any rendermode. The performance wouldn't be ideal if you're doing full screen video.

You can play video that uses H.264/AAC in a StageWebView. It would be hardware decoded, and you could go full screen and other native like things. But, there are issues, especially on Android, where the video may even be upside down on some devices, or maybe the audio won't stop playing after you close the video.

Then there is StageVideo. It works almost identically to the old netstream way of working, except that it plays H.264/AAC with hardware decoding. Unlike Stage3D you can use either GPU or Direct rendermode, and there are many other advantages to using GPU over Direct. If you are using Stage3D (even via Starling), you will have to use Direct rendermode.

Since a recent version of AIR 15 StageVideo has also supported automatic software decoding as a fallback.

So, recent StageVideo is a good option, and certainly works on iOS and Android.