webrtc-pc
webrtc-pc copied to clipboard
RTCDataChannel::onbuffereamountlow should trigger when threshold goes below buffered_amount
Today the spec says:
bufferedAmountLowThreshold of type unsigned long ... When the bufferedAmount decreases from above this threshold to equal or below it, the bufferedamountlow event fires ...
Also:
[bufferamountlow] [Fired when...] The RTCDataChannel object's bufferedAmount decreases from above its bufferedAmountLowThreshold to less than or equal to its bufferedAmountLowThreshold.
It is reasonable to assume that also changing the bufferedAmountLowThreshold
to a value that is above or equal to buffered_amount
should trigger the event, if bufferedAmountLowThreshold
was below buffered_amount
before the change, as it would be the same transition.
With the current wording, the event will only be triggered when and only when the buffered_amount
value decreases.
Let me rephrase the core issue in my own words: "When bufferedAmountLowThreshold
is being lowered, a check needs to be made whether the bufferedamountlow
event needs to fire." Is that correct or is there more to it?
That would be a valid point. Then again, I think it's an ultra corner case and I doubt anyone ever ran into that. Still, correctness is key. :+1:
What is the behavior of existing implementations?
see also #1979