Skip to content
This repository has been archived by the owner on Mar 22, 2022. It is now read-only.

Restore support for data channels #10

Merged
merged 9 commits into from
Jul 8, 2019
Merged

Restore support for data channels #10

merged 9 commits into from
Jul 8, 2019

Conversation

djee-ms
Copy link
Member

@djee-ms djee-ms commented Jul 8, 2019

Restore support for adding and removing data channels to the peer connection.

The data channel is represented by a DataChannel object created by the peer connection by calling one of the variants of AddDataChannelAsync.

Fix the TestAppUWP sample app to use a data channel again for text chat as an example use.

Because all data channels use SCTP, the SCTP handshake must be performed during the initial connection, which is disabled by default unless the user calls AddDataChannelAsync before trying to connect (but, obviously, after the PeerConnection object is initialized). So add a failsafe boolean check sctp_negotiated_ to prevent creating a data channel without SCTP handshake, which otherwise stays in the kConnecting state forever for no apparent reason. This helps preventing common errors.

Fix a threading bug in TestAppUWP with OnLoaded event not waiting for the peer connection initializing to complete before firing. Also re-add support for renegotiation needed event so that e.g. local video can be toggled on and off even after the connection is established.

djee-ms added 9 commits July 5, 2019 14:56
When compiling UWP wrapper projects individually, the output libs are
places in a different folder than when compiled from the Visual Studio
solution of WebRTC UWP SDK. Add this alternate folder so that
Microsoft.MixedReality.WebRTC.Native.UWP can find the libs it needs to
link.
This allows e.g. starting the local video feed after the connection is
already established, and by extension stopping and starting it again.
This prevents creating unusable data channels.
@djee-ms djee-ms added bug Something isn't working enhancement New feature or request labels Jul 8, 2019
@djee-ms djee-ms added this to the Initial public preview milestone Jul 8, 2019
@djee-ms djee-ms requested a review from a team July 8, 2019 09:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants