The peerIdentity field can be null, in which case the peer identity
is not checked. We used to send the empty string in that case, which
happens to work with common browsers but is probably incorrect.
The parser included in the ice package strictly adheres to RFC 7064,
however, this can be problematic when attempting to use ICE server URLs
that were automatically generated by a third party.
Twilio, for example, has been seen to send the following in its list of
ICE servers:
stun:global.stun.twilio.com:3478?transport=udp
which would require user intervention to sanitise before passing to
Pion.
This patch side-steps this aspect of ice.ParseURL by pre-stripping any
queries that may be present so that we can allow URLs of this form.
By default, we should be using unified-plan as the
SDP format of choice. This patch adds a PeerConnection
configuration option to allow the user to specify that
they want plan-b only, unified-plan only, or a special
compatibility mode where a plan-b answer will be generated
IFF a plan-b offer is received.
Fixes#515
This includes a few small and closely related changes:
1. All occurrences of the build tag `+build js` have been changed to the
more precise `+build js,wasm`. This will exclude the files from being
included by third-party compilers like GopherJS, with which they are
incompatible.
2. Some files which are incompatible with JavaScript/Wasm now have the
correct build tag (`+build -js`) so they will be excluded from Wasm
builds.
3. Some configuration options which are incompatible with
JavaScript/Wasm (or at least the current bindings) will now no longer
appear in Wasm builds. This meant creating new files with new struct
definitions and the appropriate build tags.