Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTCDataChannel::onbuffereamountlow should trigger when threshold goes below buffered_amount #2654

Open
boivie opened this issue May 27, 2021 · 3 comments
Assignees

Comments

@boivie
Copy link

boivie commented May 27, 2021

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.

@lgrahl
Copy link
Contributor

lgrahl commented May 27, 2021

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. 👍

@alvestrand
Copy link
Contributor

What is the behavior of existing implementations?

@alvestrand alvestrand self-assigned this May 27, 2021
@fippo
Copy link
Contributor

fippo commented May 30, 2021

see also #1979

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants