You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases two DataChannels with same label can be created mistakenly for the one webrtc connection. Two DataChannels with the same names can be created first in line 758 and then by the other side onDataChannel method in line 794 of webrtc_adaptor.js.
To Reproduce
1- Enable DataChannel in the server
2- Start publishing with webrtc in WebRTCAppEE/
3- Start playing same stream in WebRTCAppEE/play.html
4- Send text messages from dataChannels in developer console using statements like webRTCAdaptor.sendData("stream1", "Hi 2") from WebRTCAppEE/ and WebRTCAppEE/play.html
5- Stop publishing in WebRTCAppEE/
6- You will see in the console printouts that DataChannels are closed two times.
Expected behavior
Only one DataChannel should exist for the connection.
Solution in the Android side:
Only publisher or initiator in peer mode should createDataChannel in the initialization.
In the play mode DataChannel should be not created in the initialization. It should be received by the player in the onDataChannel method.
In peer mode DataChannel should be created only by the side who created the offer. The other side should receive DataChannel in the onDataChannel method.
Describe the bug
In some cases two DataChannels with same label can be created mistakenly for the one webrtc connection. Two DataChannels with the same names can be created first in line 758 and then by the other side onDataChannel method in line 794 of webrtc_adaptor.js.
To Reproduce
1- Enable DataChannel in the server
2- Start publishing with webrtc in WebRTCAppEE/
3- Start playing same stream in WebRTCAppEE/play.html
4- Send text messages from dataChannels in developer console using statements like webRTCAdaptor.sendData("stream1", "Hi 2") from WebRTCAppEE/ and WebRTCAppEE/play.html
5- Stop publishing in WebRTCAppEE/
6- You will see in the console printouts that DataChannels are closed two times.
Expected behavior
Only one DataChannel should exist for the connection.
Solution in the Android side:
Only publisher or initiator in peer mode should createDataChannel in the initialization.
In the play mode DataChannel should be not created in the initialization. It should be received by the player in the onDataChannel method.
In peer mode DataChannel should be created only by the side who created the offer. The other side should receive DataChannel in the onDataChannel method.
For more information check in-band negotiation in this stackoverflow entry: https://stackoverflow.com/questions/43788872/how-are-data-channels-negotiated-between-two-peers-with-webrtc
The text was updated successfully, but these errors were encountered: