开发者

Can Flash pause an RTMP stream immediately?

I can stream video RTMP just fine in JW Player by LongTail Media. The Pause seems to work, however using Windows 7's Resource Monitor I can see that the player continues to download data when the video is paused, it downloads for about 60 seconds (and does not seem to be longer for longer videos). I have found the same using the examples on longtailmedia's website, so I know it is not something I have done.

I want a way to pause the video and have it stop downloading, this will save us lots of bandwidth. But also have it continue where it left off if play is pressed again.

I checked the logs on our wowza media server, which indicates that the player actually waits 60s before it sends the pause command to the server.

LongTail's support say that the pause functionality uses the built in NetStream class and its behaviour is out of their control.

I have tested flowplayer online examples, and a couple of Adobe / OSMF examples and they all continue to download for 60 seconds after the video is paused.

A way to get this working in JW player would be best, but Are there any开发者_StackOverflow flash players that will stop downloading while paused?

If this is not possible with RTMP are there any technologies that will do this with a flash player?

thanks :)


Taking a quick peek at the AS3 reference:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html#maxPauseBufferTime

maxPauseBufferTime property
maxPauseBufferTime:Number Runtime Versions: Flash Player 10, AIR 1.5, Flash Lite 4 Specifies how long to buffer messages during pause mode, in seconds. This property can be used to limit how much buffering is done during pause mode. As soon as the value of NetStream.bufferLength reaches this limit, it stops buffering.

If this value is not set, it defaults the limit to 60 seconds or twice the value of NetStream.bufferTime on each pause, whichever is higher.

Implementation public function get maxPauseBufferTime():Number public function set maxPauseBufferTime(value:Number):void

You may want to compile a plugin, or build the player from source - and make some changes, as this seems to be the behaviour you are seeing!


This is really how HTTP download works. Check Youtube, or other players, they'll do the same. It's practically impossible to have multiple downloaded parts in buffer, and the loading-while-paused is actually handy for people who have a slow connection but do want to see the HiQ video.

This is the exact same behavior as all RTMP streaming from servers such as FMS and Red5. Viewing a 5MB video can easily create total traffic of 10-15MB per view if the user scrubs much. (As an aside, you are talking about traffic, NOT bandwidth.) This is why I don't recommend using RTMP streaming. Yet there are many video sites using RTMP streaming for millions of use...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜