-
Notifications
You must be signed in to change notification settings - Fork 367
Feature: Dynamic ice server add #2164
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
base: release-v1.14.0
Are you sure you want to change the base?
Feature: Dynamic ice server add #2164
Conversation
- With this change, the application can start peer connection with single ICE server - This will allow peer connection to run IceAgent instantaneously without waiting for TURN servers - Once, the TURN servers available, application can call `peerConnectionUpdateIceServers` to update it In most of the cases, peer connection will take place with local + STUN candidates immediately
| */ | ||
| PUBLIC_API STATUS closePeerConnection(PRtcPeerConnection); | ||
|
|
||
| /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allows for pre-fetching of the host + stun candidates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wondering if you can modify the sample to use the new function? (testing the code path)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sirknightj I'll modify the sample and check for if a test case can be added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sirknightj added the commit which defers the ICE server fetch logic for testing purpose. (Test commit is not expected to be added in the upstream but temporary for testing, hence may not be clean.)
It fetches the ICE server after peerConnection is kicked off and adds the new servers later once the SDP answer is sent.
Tested with STUN/TURN and TURN only settings from the Test WebPage.
Please note that this test approach is not essentially better. It could only increase the connection time as the ICE server fetch is still blocking.
Only when this fetch is done asynchronuously and local+STUN cases (~80%?), this has the real benefit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently, there is no way to check if refresh needed and trigger ICE refresh in async way. Adding few functions for this exact purpose, and add TURN servers once that's refreshed would make sense here.
What was changed?
peerConnectionUpdateIceServersto update itWhy was it changed?
/v1/get-ice-server-configcallHow was it changed?
What testing was done for the changes?
Example code:
After TURN servers are available, call update server API
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.