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 bufferedamountlow event not sent if the threshold is 0? #29087

Open
achingbrain opened this issue Sep 13, 2023 · 2 comments
Open
Labels
area: WebRTC Needs help from someone with WebRTC domain knowledge Content:WebAPI Web API docs help wanted If you know something about this topic, we would love your help!

Comments

@achingbrain
Copy link
Contributor

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/RTCDataChannel/bufferedamountlow_event

What specific section or headline is this issue about?

The first section

What information was incorrect, unhelpful, or incomplete?

The intro paragraph states:

bufferedamountlow events aren't sent if bufferedAmountLowThreshold is 0.

This is not mentioned in the spec, nor does it seem to hold through experimental observation.

It was added in a generic "initial en-us content checkin" commit (warning, very large diff) so I'm not sure of it's provenance.

Where did this come from?

What did you expect to see?

This sentence probably shouldn't be there.

Do you have any supporting links, references, or citations?

The spec - https://www.w3.org/TR/webrtc

A demo - https://codepen.io/achingbrain/pen/qBLjZow?editors=0012

In the console you should see something like:

"peer1 opened datachannel"
"peer1 buffered amount" 65536 "waiting for it to be zero"
"peer2 got dataChannel" "test"
"peer1 buffered amount low event fired with threshold set to" 0
"peer1 buffered amount now" 0

Works in Chrome & Firefox

Do you have anything more you want to share?

No response

@achingbrain achingbrain added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Sep 13, 2023
@github-actions github-actions bot added the Content:WebAPI Web API docs label Sep 13, 2023
@hamishwillee
Copy link
Collaborator

It was added in a generic "initial en-us content checkin" commit (warning, very large diff) so I'm not sure of it's provenance.

Where did this come from?

What this means is that this content was copied from the old wiki (2020), which in turn means that there is much less opportunity for forensic analysis on who added and why.

A lot has changed in WebRTC since 2020 so it is quite possible this was valid at some point. Is there an easy web based test such as on wpt.live that can be used to test this? I can run it on older versions of browserstack to confirm for safari and versions back in 2020 to check?

Or to put it another way, you're probably right, but it would be good to be able to verify this using an official test.

@Josh-Cena Josh-Cena added area: WebRTC Needs help from someone with WebRTC domain knowledge help wanted If you know something about this topic, we would love your help! and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Sep 18, 2023
@bc-lee
Copy link
Contributor

bc-lee commented Jun 6, 2024

My analysis of the Web Platform Teset (WPT) result (https://wpt.fyi/results/webrtc/RTCDataChannel-bufferedAmount.html, specifically the test code of https://github.com/web-platform-tests/wpt/blob/245f9db0492aca614f7b7afdf86f1d39c6e0615d/webrtc/RTCDataChannel-bufferedAmount.html#L233) suggests that the bufferedamountlow event fires regardless of the bufferedAmountLowThreshold value. This contradicts the current MDN documentation, therefor an update to the MDN docs seems necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: WebRTC Needs help from someone with WebRTC domain knowledge Content:WebAPI Web API docs help wanted If you know something about this topic, we would love your help!
Projects
None yet
Development

No branches or pull requests

4 participants