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

Why throw on empty iceServers list? #393

Closed
jan-ivar opened this issue Nov 17, 2015 · 1 comment
Closed

Why throw on empty iceServers list? #393

jan-ivar opened this issue Nov 17, 2015 · 1 comment

Comments

@jan-ivar
Copy link
Member

In setConfiguration under step 6 it says:

"2. If the server.urls dictionary member an empty list, then throw an InvalidAccessError and abort these steps."

This seems superfluous, inconsistent, surprising and problematic.

Superfluous, because it provides no invariant (omitting iceServers produces an empty list).

Inconsistent, because an empty list is a valid value (the default value in fact).

Surprising, because iceServers is not a required field.

Problematic, because some browsers (Firefox) allow end-users to configure a non-empty default, meaning explicitly providing an empty list has purpose.

An example of the latter is an app that wants to limit communication to the LAN (i.e. communicate exclusively with host candidates). new RTCPeerConnection({ iceServers: [] }) seems the most intuitive way to communicate this intent (to turn off any user-configured defaults in browsers like Firefox).

@stefhak
Copy link
Contributor

stefhak commented Dec 9, 2015

Closing since #394 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants