如何在视频暂停时使用 Flash 缓冲流

发布于 2024-10-05 11:12:26 字数 576 浏览 3 评论 0原文

我需要一个允许在暂停时缓冲视频的功能,但我找不到如何直接执行此操作...

我注意到,当我暂停视频时,会触发事件“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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文