1 Reply Latest reply on Mar 14, 2011 7:44 PM by TheRossman

    OSMF: No audio on Android?


      Hey All,


      Hoping someone can help shed some light on a bit of a weird issue.  We are investigating replacing our existing video player with an OSMF based player.


      There are a number of reasons for this but they aren't particularly relevant!


      Our target platforms are desktop browser (Flash), and also Android mobile (using Adobe AIR).


      I have an Android 2.3 handset.  I have an extremely simple OSMF player, implemented with the following code:


      import flash.display.Sprite;
      import flash.display.StageAlign;
      import flash.display.StageScaleMode;
      import flash.system.Capabilities;
      import flash.text.TextField;


      import org.osmf.containers.MediaContainer;
      import org.osmf.media.MediaPlayerSprite;
      import org.osmf.elements.VideoElement;
      import org.osmf.media.MediaPlayer;
      import org.osmf.media.URLResource;


      stage.scaleMode = StageScaleMode.NO_SCALE;
      stage.align = StageAlign.TOP_LEFT;

      var player:MediaPlayerSprite = new MediaPlayerSprite();
      var resource:URLResource = new URLResource("rtmp://URL TO MP4 FILE");
      //var resource:URLResource = new URLResource( "http://URL TO FLV FILE" );
      player.media = player.mediaFactory.createMediaElement(resource);


      Important: Both the FLV and MP4 file above, play fine in our existing flash-based player.


      On Android, if I use the HTTP FLV resource, the app plays the video no problem.  If I use the RTMP MP4 resource, the video plays fine but there is no audio.


      Clearly flash is capable of playing these files because they both work in our regular player (and we can verify they work on android by viewing our flash-based player in the Android web browser.)


      Is there some existing issue with audio not playing/not being supported or something?  At a bit of a loss to explain why this works with our existing player but does not work using OSMF.  I have tried OSMF 1.5 and also the 1.6 Sprint 1 (for StageVideo support) - both exhibit the same issue.


      Any feedback or advice would be greatly appreciated!