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(VideoEve开发者_开发技巧nt.COMPLETE, completePlay);
}
Thanks and regards deadbrain
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.
精彩评论