5 Replies Latest reply on Feb 15, 2007 10:16 AM by g3brown

    Dynamic FLV  Loading Entire Video

      Using Flash 8 and the tutorial at http://reallyshiny.com/tutorials/flash.php, I created a dynamic FLV player. Everything works but the player loads the entire FLV video when going to the URL. Is there an easy way to prevent FLVPlayback component from loading the complete FLV video until someone clicks play? If there were several videos on the page or one video was very large it could take an unnecessary about of bandwidth to display the page, especially if the end user wasn't going to view that video.
        • 1. Re: Dynamic FLV  Loading Entire Video
          Nixy Level 1
          When you start loading anything, it will load entirely. You can't just load a part of it. Well, it could be possible to load a part and if the used doesn't click to play the video, if there is half or whatever the pourcent you want, you could simplyremove the clip. So the part loaded could stay in the browser cache, but it depends on many things like the cache size, the video size, etc.

          The best way is just to way that the user click play to start loading the clip and using a streaming or a progress download for the FLV
          • 2. Re: Dynamic FLV  Loading Entire Video
            g3brown Level 1
            I'm not sure I'm following you or perhaps I didn't explain myself well. I want to prevent the pre-caching of the flv until someone actually clicks play. The way it stands now, if I put 3 video players on a page each having a 2MB video, the page would have to load over 6MB even without playing the videos. When viewing YouTube videos the video doesn't start loading until you click the play button. My player starts loading instantly. It doesn't play the video until you click play, but it loads the entire flv you you view it's corresponding html page.
            • 3. Re: Dynamic FLV  Loading Entire Video
              Nixy Level 1
              Sorry, my mistake.
              Ok, I think that if you used a prebuilt component, the play button i used only to start the clip. You have to create your own Play button, that verify if the video exist or if it has to load it. So the first time, the video does not exist, then when the used will click on it, it will start the video load. Don't put the video path on the component, just feed it with actionScript. After that if the user stop the video or just pause it and press Play button again your code will check, then the video already exist and it will not start the load again, but just play it.

              Has I said, this is the way I think it should be, you have to Script your own play btn. May be there is other way, but I don't know them.

              Hope that can help you!
              • 4. Re: Dynamic FLV  Loading Entire Video
                SymTsb Level 2
                Actually, check the FLV Component in the AS manual. I'm not 100% positive but I believe you can limit the play of a particular clip. I remember doing something like this when I was helping a friend put together a Maya portfolio. Look into it though because I can't remember what we did anymore.
                • 5. Re: Dynamic FLV  Loading Entire Video
                  g3brown Level 1
                  I like the way the player works now, except that it loads the entire video before I click play. I don't understand what you mean by "limit the play". I don't understand ActionScript enough to do what I want, but it would seem simple to stop the FLV component from fetching the entire video. Actually I would think this would be the default behavior.

                  If I had a 100MB video on a site, I wouldn't want it to download the video unless someone actually clicked play. Otherwise a user just viewing the page could potentially waste 100MB worth of bandwidth. I really feel like I'm missing something simple here.