-
Notifications
You must be signed in to change notification settings - Fork 146
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
call get ice servers when offer is received to avoid stale ice server… #86
base: master
Are you sure you want to change the base?
Conversation
This fixes the issue of stale ice server credentials but RTCPeerConnection.setConfiguration() is not supported in Firefox. |
examples/master.js
Outdated
@@ -122,8 +99,15 @@ async function startMaster(localView, remoteView, formValues, onStatsReport, onR | |||
master.signalingClient.on('sdpOffer', async (offer, remoteClientId) => { | |||
console.log('[MASTER] Received SDP offer from client: ' + remoteClientId); | |||
|
|||
// Get ICE server configuration. | |||
const getIceServerConfigPromise = master.kinesisVideoSignalingChannelsClient |
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.
I think we should await here, and pass the configuration directly to RTCPeerConnection
instead of using setConfiguration
.
d955a40
to
722a283
Compare
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.
LGTM
So a tradeoff with this approach is that the startup time might be increased due to having to fetch a new ICEServerConfig before the browser can start gathering ICE candidates on the master side.
|
… credential
Issue #, if available:
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.