Go WASM interop supports x509, PEM and other cryptography functions
(but not all), so there is no reason not to include those in
the wasm build.
This will also fix compilation errors for when something is
using webrtc and targets both wasm and server
The PR was tested locally (via a simple web folder with wasm_exec.js
and index.html) and I confirmed being able to generate a X509
certificate
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.
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.