如何在视频暂停时使用 Flash 缓冲流
我需要一个允许在暂停时缓冲视频的功能,但我找不到如何直接执行此操作...
我注意到,当我暂停视频时,会触发事件“NetStream.Buffer.Flush”。并且根据语言参考:“数据已完成流式传输,剩余缓冲区将被清空。”,我必须重新缓冲它,对吧?但是,同样根据参考文献,它不应该停止缓冲:
从 Flash Player 9.0.115.0 开始, Flash Player 不再清除 NetStream.pause() 时的缓冲区 叫。这种行为被称为“聪明 暂停”。在 Flash Player 9.0.115.0 之前, Flash Player 等待缓冲区 在恢复播放之前填满, 这常常导致延迟。
我使用Flash Professional进行调试,跟踪到的版本号是:MAC 10,0,22,91;对于流媒体服务器,我使用 red5。如果您对我的代码感兴趣,这里是: http://pastebin.com/kwTfiEH9
我'我现在完全困惑了。非常感谢任何推动!
I need a feature of allowing buffering the video when it's paused, which I cannot find how to do it directly...
I notice that, when I pause the video, the event "NetStream.Buffer.Flush" is triggered. And according to the language reference: "Data has finished streaming, and the remaining buffer will be emptied.", I have to re-buffer it, right? However, also according to the reference, it shouldn't stop buffering:
Starting with Flash Player 9.0.115.0,
Flash Player no longer clears the
buffer when NetStream.pause() is
called. This behavior is called "smart
pause". Before Flash Player 9.0.115.0,
Flash Player waited for the buffer to
fill up before resuming playback,
which often caused a delay.
I'm using Flash Professional to do the debugging, and the traced version number is: MAC 10,0,22,91; and for the streaming server, I use red5. And if you're interested with my code, here it is: http://pastebin.com/kwTfiEH9
I'm now totally confused. Any push is appreciated very much!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这里是 wondefl.net 上基于您的代码的示例
here's an example on wondefl.net based on your code