title: MP4 video remains hidden on mobile Flex app
body: <p>I'm currently struggling on my Flex mobile project using video player.
  Basically, the problem is that I don't seem to be able to play, or at least see, .MP4 videos at all (no video, no sound, the player view is simply empty) on a iOS mobile device. As soon as I replace the source with a .FLV video, everything is working perfectly.</p>
  
  <p>I have tried two approaches, even though they are using the same components underneath from what I've understood.</p>
  
  <ul>
  <li><p>OSMF: using VideoElement, MediaPlayer, MediaContainer and MediaPlayerSprite.</p>
  
  <pre><code>    private var media:VideoElement;
      private var mediaPlayer:MediaPlayer;
      private var mediaContainer:MediaContainer;
      private var mediaSprite:MediaPlayerSprite;
  
  
      protected function onViewCreationComplete(event:FlexEvent):void
      {
          media = new VideoElement(new URLResource("http://10.140.1.165/jobs/92/eproofing/in/pages/versions/1/page1/video.mp4"));
          mediaPlayer = new MediaPlayer(media);
          mediaContainer = new MediaContainer();
          mediaContainer.addMediaElement(media);
          mediaSprite = new MediaPlayerSprite(mediaPlayer, mediaContainer);
          mediaSprite.addEventListener(MouseEvent.CLICK, onVideoSpriteClicked, false, 0, true);
          mediaSprite.mediaPlayer.addEventListener(TimeEvent.CURRENT_TIME_CHANGE, onVideoTimeChanged);
  
          videoContainer.height = manager.selectedPage.formatHeight;
          videoContainer.width = manager.selectedPage.formatWidth;
          videoContainer.addChild(mediaSprite);
      }
  </code></pre></li>
  <li><p>StageVideo: using Video, NetConnection and NetStream (StageVideo object usage is actually not yet implemented in the following code, this will be the next step)</p>
  
  <pre><code>    private var video:Video;
      private var ns:NetStream;
      private var nc:NetConnection;
  
      private var isVideoPlaying:Boolean = false;
  
  
      protected function onViewCreationComplete(event:FlexEvent):void
      {
          video = new Video();
          nc = new NetConnection();
          nc.connect(null);
          ns = new NetStream(nc);
          ns.client = {onMetaData:onMetaData};
  
          ns.addEventListener(NetStatusEvent.NET_STATUS, onVideoLoaded);
          ns.play("http://10.140.1.165/jobs/92/eproofing/in/pages/versions/1/page1/video.mp4");
          this.isVideoPlaying = true;
      }
  
      private function onVideoLoaded(event:NetStatusEvent):void
      {
          video.attachNetStream(ns);
          videoContainer.addChild(video);
  
          videoContainer.height = video.height = video.videoHeight;
          videoContainer.width = video.width = video.videoWidth;
      }
  
      private function onMetaData(o:Object):void
      {
  
      }
  </code></pre></li>
  </ul>
  
  <p>Both gave me the same result: <strong>the video appears and is played correctly as long as I'm using .FLV, I can't see/hear anything as soon as I'm loading a .MP4 video instead</strong>
  And of course, MP4 is the format I want to use for this project. I might add that I'm using H.264 codec for these .MP4 files.</p>
  
  <p>Is there anything I'm doing wrong?</p>
  
  <p><strong>Note that both formats are working as long as I'm using the emulator, the .MP4 issue is only occurring when I deploy the app on my iPad.</strong></p>
  
  <p>This is a mobile <strong>Flex 4.6</strong> project, using <strong>AIR 3.9</strong> on <strong>Flash Builder 4.7</strong> for <strong>Windows 7 Pro</strong></p>