0 Replies Latest reply on Jun 23, 2011 9:19 AM by ffsys

    Load from file:// url




      I'm trying to get a very simple OSMF example loading from a file:// URL.


      When I load from an absolute http:// url the video is loaded and displayed.


      When I try to load from a relative URL or an absolute file:// URL the video is not loaded and displayed and no request is made to load the video.


      I don't think it is a security sandbox issue as I'm running in a trusted folder and would expect an exception for a security sandbox issue.


      Executing netLoader.canHandleResource() returns true for each URL.


      Surely I'm missing something obvious but I would expect this to work without any extra effort.


      Maybe this is a known issue of I need to do something else to load from file:// URLs.


      The code is so simple it's hardly worth posting:


      public function load( url:String ):void
           var resource:URLResource = new URLResource( url );
           _netLoader = new NetLoader();
           trace("VideoPlayer::load()", _netLoader.canHandleResource( resource ) );
           var media:VideoElement = new VideoElement( resource, _netLoader );
           //display has already been instantiated and added to the display list
           _display.addMediaElement( media );
           _player = new MediaPlayer();
           _player.media = media;


      Any help with this would be much appreciated.