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

Add ability to configure STUN & TURN servers in the client. #6

Merged
merged 7 commits into from
Oct 12, 2020
Merged

Conversation

mrgnr
Copy link
Member

@mrgnr mrgnr commented Oct 9, 2020

Add the ability for users to add, remove, and edit the list of STUN and TURN servers which are used when establishing WebRTC connections.

  • Add server-side support for fetching Twilio ICE servers
  • Add React components that allow users to add, remove, and edit STUN/TURN servers
  • Validate server configurations before passing them to the manager
  • Add tests for Redux actions
  • CSS styling

ice-servers

The server can now be configured to fetch a list of ICE servers (both
STUN and TURN) from Twilio. If using account credentials, set
`TWILIO_ACCOUNT_SID` with the account SID and `TWILIO_AUTH_TOKEN` with
the account auth token. If using API keys, set `TWILIO_ACCOUNT_SID` with
the account SID, `TWILIO_AUTH_TOKEN` with the API key secret, and
`TWILIO_KEY_SID` with the API key SID.
The list of ICE servers for an RTCPeerConnection can be updated using
the setConfiguration() method. This only works in Chromium/Safari, not
in Firefox. See https://bugzilla.mozilla.org/show_bug.cgi?id=1253706.
An `enabled` property has been added to ICE server objects in the Redux
store. This allows us to add empty servers in the UI without passing
them to the manager. Then, when a server is saved, it is enabled and can
be passed to the manager. Validation (i.e. checking the format of urls
and requiring username/credential for TURN servers) will be added in a
later commit.
@mrgnr mrgnr added the enhancement New feature or request label Oct 10, 2020
We use basic HTML form validation with the `pattern` and `required`
attributes on form inputs. The URLs input must be a comma-separated list
of URLs, each prefixed with the server type (i.e. stun: or turn:).
Username and password are required fields for TURN servers, but not
required for STUN servers.
Instead of having separate bits of state and different actions for TURN
and STUN servers, treat everything generically as an ICE server. The
`kind` attribute of an ICE server object can be used when TURN and STUN
servers need to be treated differently.
And bump development version number.
@mrgnr mrgnr marked this pull request as ready for review October 12, 2020 11:55
@mrgnr mrgnr merged commit 00469e7 into master Oct 12, 2020
@mrgnr mrgnr deleted the turn branch December 18, 2020 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant