Flex:带有 MXML 的 Adobe Flash Builder:HTML 渐进式流式传输不起作用!
我正在使用 VideoDisplay 的渐进式流式传输,即使我已将其配置为在缓冲达到 20% 时开始播放视频,提供的 HTTP URL 也会完全缓冲,跟踪消息显示播放已开始(使用 mozilla / Flashbug+Firebug),但在缓冲区计数器达到 100% 之前它不会显示视频
我怎样才能让视频流以 20% 的速度播放。
进行检查的代码段
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);
}
感谢和问候 死脑筋
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Web 服务器需要对 Flash 在尝试流式传输电影时使用的 HTTP 变体提供特定支持。 Adobe 并未为此使用 bog 标准 HTTP。如果网络服务器不支持此功能,您将看到以下行为:在播放开始之前完成下载。
借助 H.264 和 Apache,您可以使用 CodeShop 的
mod_h264_streaming
插件。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.