Skip to content

ICE: Enable TWCC feedback for audio-only connections - #3674

Open
SteveMcFarlin wants to merge 1 commit into
meetecho:masterfrom
SteveMcFarlin:enable-twcc-audio
Open

SteveMcFarlin wants to merge 1 commit into
meetecho:masterfrom
SteveMcFarlin:enable-twcc-audio

Conversation

@SteveMcFarlin

Copy link
Copy Markdown

TWCC feedback currently requires an inbound video stream, preventing feedback on audio-only connections.
This change falls back to an inbound audio stream when no video stream has a valid peer SSRC and sets the RTCP media type to match the selected stream. Video remains preferred when available.

Chrome and FF both enable TWCC for audio only. In Chrome you need to explicitly disable it with WebRTC-Audio-ABWENoTWCC. It is enabled for Opus.

Reference Issue: 3673

@lminiero

lminiero commented Sep 11, 2026

Copy link
Copy Markdown
Member

Somehting looks broken in the patch, I see a lot of empty lines added that aren't supposed to be there.

Edit: unless it's Githhub that's showng them horribly in its UI?
Edit2: yep, Github's fault,nevermind that!

@SteveMcFarlin

SteveMcFarlin commented Sep 11, 2026

Copy link
Copy Markdown
Author

Let me know what you think on this patch. I checked Chrome/FF for TWCC with audio. Thus far I have not seen any regressions.

@Bug-Fairy

Copy link
Copy Markdown
Contributor

Wouldn't it be more correct to send feedback for both audio and video, if both are negotiated? Since Firefox and Chrome negotiate TWCC for both, and tag packets appropriately.

Also noticed Janus does not add TWCC extension to audio packets even if negotiated, but that is better left for a separate PR.

@lminiero

Copy link
Copy Markdown
Member

Also noticed Janus does not add TWCC extension to audio packets even if negotiated, but that is better left for a separate PR.

That's because, at the time, there was no TWCC for audio. IIRC Firefox only did it for video streams, as seems confirmed in the blog post where I documented my BWE experiments:

[..] while Chrome by default includes all RTP streams as part of TWCC, Firefox only does it for video streams, while it ignores audio streams instead.

As such, in order to avoid issues depending on whether we were offering or answering, we kept audio out of it too. If Firefox is now doing it for audio too, I agree that the behaviour should be changed in Janus too.

@lminiero

Copy link
Copy Markdown
Member

Let me know what you think on this patch. I checked Chrome/FF for TWCC with audio. Thus far I have not seen any regressions.

Looks good to merge for me. @SteveMcFarlin as a first-time contributor we need your signature for the CLA, though: not sure why the automated comment didn't appear.

@Bug-Fairy

Copy link
Copy Markdown
Contributor

I can confirm TWCC extension is present in audio packets for both Chrome and Firefox.

Can't check Safari at this time and have yet to check if feedback is being sent for audio packets.

@SteveMcFarlin

Copy link
Copy Markdown
Author

I have not checked Safari, but a cursory search says it does support TWCC for both audio and video. I signed the CLA.

@Bug-Fairy

Copy link
Copy Markdown
Contributor

Just checked Safari. It also includes the TWCC extension in both audio and video packets.

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

Successfully merging this pull request may close these issues.

4 participants