4 Replies Latest reply on May 6, 2010 12:29 PM by nmpg\pmorris

    problem playing flv files after creating release

      I'm having a problem that I just cant figure out. I created a simple application in flex builder 3 and I placed a video display component in the application. I created an assets folder under the src folder and placed a .flv file in there. I told the videoplayer in flex that the source was "assets/videofile.flv" and also to auto play. When I hit the run button, it works fine. The video plays fine (It plays out ot the local computer "e:\...\application name\bin-debug\application name.html").

      Next, I create a release version of the application (and it put it into the bin-release folder under the application). All files were copied up to my webserver using FTP and when I run the page from that location the video will not play. I checked to make sure that all the files were uploaded there and I had rights to the files and everything looks good.

      I then went back to flex builder 3 and put some buttons on the app to control the video (play, stop, pause) and when I run the app local it works fine. I create the release version, pushed it up to the web server and it won't auto play. When I push the play button I get this error:

      Error: 1000: Unable to make connection to server or to find FLV on server.
      at mx.controls.videoClasses::VideoPlayer/play()
      at mx.controls::VideoDisplay/play()
      at SmartCartDes/__vidctrl1_click()

      How I'm I supposed to create a release version and upload it to my server? Please, any help would be greatly appreciated.

      John Baranowski
        • 1. Re: problem playing flv files after creating release
          jjbaranowski Level 1
          I have some new information: I have been trying to upload this application to two different servers; one is in my office (microsoft IIS 6) and a second one is a hosted account I have for a client (also microsoft IIS 6) and niether of them work.

          I tried (just for the heck of it) to copy the bin-release content onto a linux server I have in my office and it works! I went back again and checked rights on the files on IIS and they look fine too. I made sure I gave all rights to the anonymous user account (IUSR_MACHINE NAME) and tried again with no luck. I don't think its a rights issue. There must be some settings on IIS for this to work. Any Ideas??????
          • 2. Re: problem playing flv files after creating release
            jjbaranowski Level 1
            Ok, I figured out what was wrong and I thought I should post the fix up here for all you folks who hopefully won't spends as much time as I have solving this.

            Windows 2003 Server (IIS) does not know what mime type the flv files are. There are no direct errors at all when you try to stream them from within a flex application. Here is how to add the .flv MIME type in Microsoft Windows IIS

            1.) Select the site to configure in IIS, right click and select "Properties"
            2.) Under HTTP Headers Tab, select "File Types" and under the MIME Map section and select "New Type"
            3.) Type ".flv" as the associated extension and "video/x-flv" as the content type.
            4.) Select "OK" and you're ready to go.

            This is very easy to do if you have control of your own server and you can configure IIS but I checked in my control panel for the clients hosting account and there are no settings like this to be found anywhere. It looks like I might have to ask the hosting provider to add this mime type on the server for me (bummer).

            I hope this helps!


            John Baranowski
            • 3. Re: problem playing flv files after creating release
              Sun of a .... I've been banging my head against the wall for a couple of months just trying to understand WHERE the problem might have been.

              My solution then was to just use a streaming media server like FMS (since I also wanted seeking ability to the rather long duration of audio/video files).

              I bow to you for pinpointing exactly what the problem is/was.

              THANK YOU!
              • 4. Re: problem playing flv files after creating release

                John Baranowski: You rock! Thanks a million! MS would've stopped supporting Win Server 2003 by the time I figured this out. Btw: The MIME type for f4v is video/mp4.


                Paul Morris