* Return error to user when remote doesn't support codecs
* Assert that bindings are properly incremented/decremented
* Assert that a added track doesn't error even when disconnected
Relates to #1526
This modification attempts to fix a deadlock happens when closing a
peer-connection.
The deadlock scenario is:
- routine-1: DTLSTransport.Stop is called during closing, which holds
the writer-lock of DTLSTransport, and it blocked by accepting from
session.closed channel when trying to close SRTPSession.
- routine-2: its stacks located in the routine launched in
srtp.session.start(...), this routine should close the session.closed
channel, however, it blocked when sending to
srtp.SessionSRTP.session.newStream
- routine-3: this routine should call strp.SessionSRTP.AcceptStream
to release routine-2. However, it blocked when calling
DTLSTransport.getSRTPSession(), it requires the reader-lock.
To resolve this issue, the instance of SessionSRTP is kept in
atomic.Value and avoid the requirement of reader-lock in
DTLSTransport.
Fixes#1430
Sometimes the replay protection of SRTP and SRTCP needs to be disabled.
This change adds disableSRTPReplayProtection and
DisableSRTCPReplayProtection helpers to SettingEngine.
PeerConnection.Close() doesn't match the W3C RFC on closing,
re-order the transports so that they close in the proper order.
In the future we will use the DTLS Close alert and RTCP Bye to
better communicate shutdown
There are some direct usages of unexported fields of ICETransport
from non ice-related methods. This would be problematic when ice
once ice related code is moved to a separate packet. Added proxy
methods to ICETransport to avoid this.
Instead of printing the error to stdout return the error to the user.
This may not be a hard error (as later certificates would have passed)
but it never is good to be in a state where you have certificates in a
broken state.
Resolves#586
Writing to a Track shouldn't return errors for an individual
RTPSender. This filters ErrNoCandidatePairs from being returned
and instead just returns nil
Resolves#523
Resolves#478. Adds minimal JavaScript/WASM bindings. This makes it
possible to compile core parts of pions/webrtc to WASM and run it in the
browser. Only data channels are supported for now and there is
limited/no support for certificates and credentials.