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

Include sdpMid and sdpMLineIndex for ICECandidates returned by OneICECandidate #2990

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

joeturki
Copy link
Member

@joeturki joeturki commented Jan 4, 2025

Description

Currently, Pion returns an empty sdpMid and a 0 sdpMLineIndex. This PR ensures Pion returns the corresponding sdpMid and sdpMLineIndex for ICE candidates for clients that expects it. Fixes trickle issues.

Changes

  1. ICECandidates: New fields SDPMid and SDPMLineIndex.
  2. ICECandidates: Two new constructors newIdentifiedICECandidateFromICE and newIdentifiedICECandidatesFromICE.
  3. ICEGatherer: SetMediaStreamIdentification and return the correct SDPMid and SDPMLineIndex.
  4. extractICEDetails: Return a struct instead of multiple values sdpICEDetails, return the picked SDPMid and SDPMLineIndex.
  5. Added new tests.

Reference issue

Fixes #2690
Fixes #1833

@joeturki joeturki requested a review from Sean-Der January 4, 2025 13:48
Copy link

codecov bot commented Jan 4, 2025

Codecov Report

Attention: Patch coverage is 87.17949% with 10 lines in your changes missing coverage. Please review.

Project coverage is 78.00%. Comparing base (1ee0299) to head (aa6f53c).

Files with missing lines Patch % Lines
icecandidate.go 71.42% 4 Missing and 2 partials ⚠️
peerconnection.go 75.00% 0 Missing and 2 partials ⚠️
sdp.go 93.10% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2990      +/-   ##
==========================================
+ Coverage   77.93%   78.00%   +0.06%     
==========================================
  Files          89       89              
  Lines       10546    10587      +41     
==========================================
+ Hits         8219     8258      +39     
  Misses       1838     1838              
- Partials      489      491       +2     
Flag Coverage Δ
go 79.57% <87.17%> (+0.06%) ⬆️
wasm 63.51% <71.42%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

icegatherer.go Outdated Show resolved Hide resolved
sdpicedetails.go Outdated Show resolved Hide resolved
@Sean-Der
Copy link
Member

Sean-Der commented Jan 5, 2025

@joeturki This is the highest quality PR I have seen in a long time. This is really impressive stuff.

When I read this I feel like I am reading code of someone who has been intimately involved with WebRTC/Go for years. I am so excited for you to be more involved :)

@Sean-Der
Copy link
Member

Sean-Der commented Jan 5, 2025

Mind squashing everything into one commit and address the comments I left! Then we can merge this right away :)

@joeturki joeturki force-pushed the fix/trickle-ice-ind branch from b7c60b4 to b3109ce Compare January 5, 2025 06:16
@joeturki joeturki requested a review from Sean-Der January 5, 2025 06:20
@joeturki
Copy link
Member Author

joeturki commented Jan 5, 2025

Thanks :) I think it's ready.

@joeturki joeturki force-pushed the fix/trickle-ice-ind branch from b3109ce to aa6f53c Compare January 5, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants