Skip to content

Dynamically determine ICE agent's role #205

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

Merged
merged 4 commits into from
Mar 10, 2025
Merged

Dynamically determine ICE agent's role #205

merged 4 commits into from
Mar 10, 2025

Conversation

mickel8
Copy link
Member

@mickel8 mickel8 commented Mar 10, 2025

ICE agent's role should be dynamically determined based on who sends the offer first and whether any side is running ice-lite. See: https://www.w3.org/TR/webrtc/#ref-for-dfn-icerole-1

So far, we have been always setting ICE agent's role to controlled and we were counting on ICE role conflict resolution.
However, some implementations does not support role conflict resolution and rely on correct role determination. See pion/ice#359 (comment)

In such case, we will get stuck and never establish ICE connection.

This PR, removes hard-coded agent's role and dynamically determines it according to W3C spec linked above.

Copy link

codecov bot commented Mar 10, 2025

Codecov Report

Attention: Patch coverage is 90.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 88.26%. Comparing base (880099e) to head (fc68977).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
lib/ex_webrtc/peer_connection.ex 87.50% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #205      +/-   ##
==========================================
- Coverage   88.30%   88.26%   -0.05%     
==========================================
  Files          49       49              
  Lines        2549     2565      +16     
==========================================
+ Hits         2251     2264      +13     
- Misses        298      301       +3     
Files with missing lines Coverage Δ
lib/ex_webrtc/ice_transport.ex 80.00% <100.00%> (+3.07%) ⬆️
lib/ex_webrtc/sdp_utils.ex 91.01% <100.00%> (+0.05%) ⬆️
lib/ex_webrtc/peer_connection.ex 86.40% <87.50%> (-0.04%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 880099e...fc68977. Read the comment docs.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mickel8 mickel8 merged commit bdbd9bd into master Mar 10, 2025
3 checks passed
@mickel8 mickel8 deleted the ice-role branch March 10, 2025 21:51
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.

1 participant