This commit adds an option to put DTLS Fingerprint specification
at the media description level rather then the session description
level. This enhances compatibility with some 3rd party webrtc
implementations (notably Kurento).
Before ICEServers wasn't thread safe. If a Configuration
was shared among multiple PeerConnections the sanitization logic
could cause race conditions.
Resolves#1246
In SetLocalDescription guard iceGatherer.Gather by checking state.
We don't put this check inside Gather because ORTC doesn't have the
function as re-entrant
Resolves#1144
Co-authored-by: jeremija
Assert that SetLocalDescription always starts ICE candidate
gathering. #763 broke this behavior (and diverted from the RFC)
by starting gathering in SetRemoteDescription in some cases.
Fixes#763
Before a:setup=actpass was showing up twice in each media description.
It is already being added in the addTransceiverSDP and
addDataMediaSection methods. This commit removes the extra call.
These are generated at runtime (depending if we are doing Plan-B or
Unified Plan). Currently this field is actually unused, so just getting
rid of it.
Relates to #106
Before our RTPTransceiver logic would only allow Sendrecv to
match with another Sendrecv. Instead allow a SendRecv to be used
with a local Recvonly
Co-authored-by: Sean DuBois <sean@siobud.com>
Add OnICECandidate and OnICEGatheringStateChange methods to
PeerConnection. The main goal of this change is to improve API
compatibility with the JavaScript/Wasm bindings. It does not actually
add trickle ICE support or change the ICE candidate gathering process,
which is still synchronous in the Go implementation. Rather, it fires
the appropriate events similar to they way they would be fired in a true
trickle ICE process.
Remove unused OnNegotiationNeeded event handler. This handler is not
required for most applications and would be difficult to implement in
Go. This commit removes the handler from the JavaScript/Wasm bindings,
which leads to a more similar API for Go and JavaScript/Wasm.
Add OnICEGatheringStateChange to the JavaScript/Wasm bindings. Also
changes the Go implementation so that the function signatures match.
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.
The tests are run in a Node.js environment, and this does not include
any browser tests. This requires the wrtc package from npm as well as a
shim which adds portions of the WebRTC API to the global scope.
Some tests introduced here can be combined when differences between the
Go API and the WASM bindings are addressed and as missing features are
added to the WASM bindings.
We can and should add more tests in the future to improve test coverage.
This should be considered the minimum number of tests reuqired to ensure
basic functionality is working.