NetStream http Video not playing on IOS device


I am trying to play a video on iPad, my code is below :

public function init_RTMP():void { videoURL = "http://rest************_iphone_high.mp4"; vid = new Video(); nc = new NetConnection(); nc.addEventListener(NetStatusEvent.NET_STATUS, onConnectionStatus); nc.connect(null); } private function onConnectionStatus(e:NetStatusEvent):void { if (e.info.code == "NetConnection.Connect.Success") { trace("Creating NetStream"); netStreamObj = new NetStream(nc); metaListener = new Object(); metaListener.onMetaData = received_Meta; netStreamObj.client = metaListener; netStreamObj.play(videoURL); vid.attachNetStream(netStreamObj); addChild(vid); } }

when i play it on my system it is working fine, but when i create a IOS app of it and installs on device, it shows white blank screen.

If anyone have same problem or any idea please share with me.


As VC.One pointed out, AIR for iOS does not play most (but not all, it will occasionally play a very specific encode type) h.264 encoded videos. There are three solutions:

<ol><li>As VC.One said, you encode as FLV. Doing this is not good and I would not recommend it. FLV is not hardware accelerated (unless things have changed recently and I have not seen the updates) and will run entirely off the CPU meaning your app will run slowly and the app will eat battery much quicker than normal.</li> <li>Use <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/StageWebView.html" rel="nofollow">StageWebView</a>, in which case you just plug in the URL to the video and it will play the video using the native video player. This has the down side in that you cannot skint he player and you cannot control it. Once it begins playing, you have no control over it except for unloading the page. This works very well, however, and is fairly easy to implement, though the video will appear on top of the stage (it is <strong>not</strong> in the Display List).</li> <li>The last option is to use <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/StageVideo.html" rel="nofollow">StageVideo</a>. This will play videos using the native framework, so you can easily play h.264 <em>and</em> it will be hardware accelerated. Additionally, this is just a NetStream player so you have full control over it. And best yet, it has no chrome so you can build a player around the video screen. However, like StageWebView, StageVideo is <strong>not</strong> in the Display List. But unlike StageWebView, it is rendered directly on the stage, <em>below</em> everything else. So the app itself will cover the video. You can get around this by creating a class to mask your app around the video, but it is incredibly difficult to properly pull off. It took me about 12 hours to create my StageVideo player and the masking class, plus another half day later on fixing issues with the masking class and how it handles DPI changes (hint: do NOT set applicationDPI if you are using Flex)</li> </ol>

As always, make sure your AIR SDK is up to date as well. 3.5-3.7 have all added a ton of new features and bug fixes for iOS applications so updating to AIR 3.7 might actually solve or make your issue less of a problem (I don't think it will, but it is always worth a shot, right?)


See this link:


<a href="https://stackoverflow.com/questions/11032141/netstream-video-not-playing-on-ipad" rel="nofollow">Netstream video not playing on iPad</a>


Basically it was fixed by encoding the video file as FLV not MP4.


  • Use MongoDB array as stack
  • How to remove trailing space from marquee?
  • How to edit css for jquery datepicker prev/next buttons?
  • How to unwind to the first view controller on a navigation stack
  • What is the Linux Equivalent of Kernel32.dll?
  • not able to create VC++ project, with VS11
  • Why does the following throw an “Object doesn't support property or method 'importNode
  • Microsoft Excel Pivot miscalculation in Sum for positive and negative numbers
  • Why must we declare a variable name when adding a method to a struct in Golang?
  • How to split circle in to the sectors in google maps?
  • Error in installing package: fatal error: stdlib.h: no such file or directory
  • Application level floating views with navigation in Android
  • Is there a way to save the selected text and highlight it again once the page is refreshed?
  • Django model inheritance, filtering models
  • AndEngine Applying Transparancy to AndEngine View
  • Using a canvas object in a thread to do simple animations - Java
  • Rails Find when some params will be blank
  • Why does access(2) check for real and not effective UID?
  • Android fill_parent issue
  • Avoid links criss cross / overlap in d3.js using force layout
  • Read text file and split every line in MSBuild
  • C# - Serializing and deserializing static member
  • How to draw moving and Running sine wave chart using JFree chart in java?
  • How would I use PHP exceptions to define a redirect?
  • Java applet as stand-alone Windows application?
  • Controls, properties, events and timers running in design time
  • Join two tables and save into third-sql
  • Arrow is showed instead of the material design version hamburger icon. Why doesn't syncState in
  • How to model a transition system with SPIN
  • Updated Ionic CLI but shows previous version (Windows)
  • ORA-29908: missing primary invocation for ancillary operator
  • Matrix multiplication with MKL
  • InvalidAuthenticityToken between subdomains when logging in with Rails app
  • Error creating VM instance in Google Compute Engine
  • Hits per day in Google Big Query
  • Setting background image for body element in xhtml (for different monitors and resolutions)
  • Can Visual Studio XAML designer handle font family names with spaces as a resource?
  • File not found error Google Drive API
  • Converting MP3 duration time
  • How to load view controller without button in storyboard?