Repository navigation
Fix extractRtpCapabilities() mixing up audio and video RTP header extensions - #397
Merged
Merged
Conversation
…ensions `headerExtensionMap` was indexed by preferred id alone. Since all m= sections are bundled, the browser gives the same id to a given extension in every m= section that supports it (sdes:mid, abs-send-time, transport-cc or abs-capture-time typically share their id between the audio and the video m= section), so audio and video fought for the same map slot and the last m= section in the SDP won. The other kind's extension simply disappeared from the extracted capabilities (`matchHeaderExtensions()` requires both kinds to be equal) and hence from the answer we generate. Among other things, this made Chrome stop the mandatory sdes:mid extension in transceivers of the losing kind, eventually making `transport.produce()` fail with "Failed to execute 'setHeaderExtensionsToNegotiate' on 'RTCRtpTransceiver': Attempted to stop a mandatory extension". Index `headerExtensionMap` by kind and preferred id so that each kind keeps its own entry. Both kinds now always get their full set of extensions, every answer carries all its extmaps (sdes:mid included), and the m= section order no longer has any effect. Added a regression test.
Member
|
Assumptions in this PR are incorrect. By spec it's mandated that ALL extension RTP extension URIs in a bundled PeerConnection share the same |
Member
Author
Precisely the rationale of this PR. |
Member
|
Yeah, this is the fix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
headerExtensionMapwas indexed by preferred id alone. Since all m= sections are bundled, the browser gives the same id to a given extension in every m= section that supports it (sdes:mid, abs-send-time, transport-cc or abs-capture-time typically share their id between the audio and the video m= section), so audio and video fought for the same map slot and the last m= section in the SDP won. The other kind's extension simply disappeared from the extracted capabilities (matchHeaderExtensions()requires both kinds to be equal) and hence from the answer we generate.Among other things, this made Chrome stop the mandatory sdes:mid extension in transceivers of the losing kind, eventually making
transport.produce()fail with "Failed to execute 'setHeaderExtensionsToNegotiate' onRTCRtpTransceiver: Attempted to stop a mandatory extension".Index
headerExtensionMapby kind and preferred id so that each kind keeps its own entry. Both kinds now always get their full set of extensions, every answer carries all its extmaps (sdes:mid included), and the m= section order no longer has any effect. Added a regression test.Fixes #394