Re: [webrtc-pc] RTCDataChannel.bufferedAmount value

> But I want to know whether there's a particular reason why it needs to be that way

Because then you can reliably check `bufferedAmount` to avoid calling `send` when the buffered amount is above some threshold. It guarantees that `bufferedAmount` is always greater than or equal to the actual buffered amount.

For example:

while (haveDataToSend()) {
  if (dc.bufferedAmount > bufferFullThreshold) {
    // bufferedamountlow event will cause us to resume sending.
  } else {

GitHub Notification of comment by taylor-b
Please view or discuss this issue at using your GitHub account

Received on Monday, 2 April 2018 23:53:07 UTC