We are developing a one-on-one P2P video chat application in AS3. For it to be useful in practice, it needs to be able to automaticaly choose the best video parameters based on the clients' bandwidth capacity. After all, it makes no sense to switch to a HD mode if the clients are on a slow connection link, or have a 160x120 picture quality when the bandwidth allows for much more.
So the question is, how do we estimate the bandwidth available to clients? It seems that none of the NetStreamInfo class's metrics contain this information. Not even maxBytesPerSecond, because when the receiving end's buffer is 0 (to minimize latency), maxBytesPerSecond more or less follows videoBytesPerSecond.
Should we take a closer look at indirect hints such as SRTT perhaps?
You can try to "probe" your connection by sending a large data chunk and measure the time it takes to reach the other end. You may want to do the probing in both directions as there may be important differences between one's upload and download.
Thank you for the suggestion. My ActionScript coder said that he used a similar technique for RTMP chats, but on slow connections the probing itself could take quite long (up to 20 seconds). Besides, I'm afraid that this approach doesn't look practical for monitoring the available bandwidth during the chat.