1

I am using progressive streaming with VideoDisplay, the HTTP URL provided gets buffered completely even if I have configured it to start playing the video when the buffering reaches 20%, the trace message shows that the playing started(using mozilla / Flashbug+Firebug), but it doesnot show the video till the buffercounter reaches 100%

How can I get the video stream to play at the 20% of stream.

Code Segment where the check takes place

var loadedPct:uint = Math.round(100 * (event.bytesLoaded / event.bytesTotal));
            trace('waiting...');
            mainVideoCanvas.addChild(LoadingImage);
            VidLoadingLabel2.text = loadedPct.toString();
            mainVideoCanvas.addChild(VidLoadingLabel2);

            if (loadedPct >= 20)
            {

                trace(event.bytesLoaded);
                trace(loadedPct);
                player.load();
                player.play();
                trace(player.state);
                trace('Playing');
            }
            if (loadedPct == 100)
            {
                trace('Ready to Complete');
                trace(player.state);
                mainVideoCanvas.removeChild(VidLoadingLabel2);
                mainVideoCanvas.removeChild(LoadingImage);
                mainVideoCanvas.addChild(player);
                player.addEventListener(VideoEvent.COMPLETE, completePlay);

            }

Thanks and regards deadbrain

deadbrain
  • 21
  • 2
  • Don't you need a media server for any sort of progressive playing? Are you using one? – JeffryHouser May 07 '11 at 12:44
  • Yes, I am getting the stream from a remote streaming server, in this case bitcast streaming server... – deadbrain May 07 '11 at 13:35
  • 1
    I'm going with Flextras, you're not streaming it properly from the server. How about adding some code on how you're trying to play it. Also, that bit of code you added is adding an image and a label every time a progress event dispatches?! – J_A_X May 09 '11 at 12:40

1 Answers1

0

The web server needs specific support for the variant of HTTP that Flash speaks when it tries to stream a movie. Adobe isn't using bog-standard HTTP for this. If the web server doesn't have this support, you get the behavior you see: complete download before playback begins.

With H.264 and Apache, you can add the support you need for this with CodeShop's mod_h264_streaming plugin.

Warren Young
  • 40,875
  • 8
  • 85
  • 101