Skip navigation
Claus Richter
Currently Being Moderated

Adobe Air Bug: embedded .flv in .swf does not start - Connection Error

Apr 14, 2011 10:09 PM



I have embedded an .flv video into an .swf (using Captivate CS5)


Then I use Dreamweaver and insert the swf into html.

So far everything works ok, the video is displayed.


Now I create an Air File in Dreamweaver.

Result; The video is not displayed. Message: "Connection Error"


I am not a programmer. Do I have to change the .xml file or is there any other fix for this?


Thank you very much!



  • Currently Being Moderated
    May 9, 2011 10:03 PM   in reply to Claus Richter

    I think you are running into a path resolution bug in AIR. The fix is to provide an absolute path to the video instead of a relative path. That does require a little programming, though.


    How are you passing the video URL to the video player?

    Mark as:
  • Currently Being Moderated
    Jun 3, 2011 9:36 PM   in reply to Claus Richter

    There is a known issue with the way that the URLs are resolved in this scenario. What happens is that the Flash Player instance loaded by the HTML loader asks the host -- in this case AIR instead of a browser -- to resolve the URL. AIR sees that the video file is part of the application and returns the URL as an app:// URL.


    The workaround is to use an absolute URL (which requires a small trick).


    For example, if you were passing in the URL file in the JavaScript code like this:




    You should do this instead:


          var File = window.runtime.flash.filesystem.File;

          flashVars.setAttribute("value","vid=" + new File(File.applicationDirectory.resolvePath("anFlv.flv").nativePath).u rl);

    Mark as:
  • Currently Being Moderated
    Feb 11, 2012 8:02 AM   in reply to Claus Richter

    ever got a solution to this?

    Mark as:
  • Currently Being Moderated
    Jun 11, 2012 4:16 PM   in reply to Joe ... Ward

    This would be somewhat usefull if we where calling the FLV from javascript.  However, both Clause and I are calling the flash object from the object tag. This is the default from Dreamweaver and also the prefered method for embeding a swf (my case) into a HTML Air app.  The codebase I am using to create my Air app is modified html5 from the client's current website.  (they would like this app to "look and work like the site")


    For me, all is good exept the video.  This app has to work offline or I'd just call the video from the website.


    Is there a working example somewhere out there we can look at?


    Life would be so much simpler if AIR supported the <video> tag in the webkit html engine.  I'll use h.264. I promise!



    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points