How to buffer stream when the video is paused with flash

跟風遠走 提交于 2019-12-12 03:44:59

问题


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!


回答1:


here's an example on wondefl.net based on your code



来源:https://stackoverflow.com/questions/4319818/how-to-buffer-stream-when-the-video-is-paused-with-flash

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!