开发者

Determining an initial NetStream buffersize based on bandwidth and bitrate

I'm trying to determine an initial value for NetStream.bufferTime based on the client's calculated bandwidth and the video's bitrate.

As far as I can tell you can't do开发者_运维百科 this, because you must have an initial buffer set BEFORE you call NetStream.play() (or use the default 2 seconds) and FMS does not call NetStream.onMetaData, where one would normally find the videodatarate, until after NetStream.play() is called.

Even if you modify NetStream.bufferTime during the onMetaData call back it doesn't effect when the video starts playing or when the NetStatus event registers "NetStatus.Buffer.Full".

Therefore my question is:

How do I find the Video Data Rate BEFORE I call NetStream.play?

-Or-

How do how do I reset the initial bufferTime before acctual play back begins and the NetStatus event fires with "NetStatus.Buffer.Full"

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜