Open roman-richter opened 3 years ago
I had an issue with getting the data channel up and running, it was because I didn't specify a IceCandidate.SdpMid when I was sending the candidates, for some reason the other side (which was another implementation of webrtc) did not specify this, unsure why. I saw in logs that the there was "application0" ids sent around, so I hardcoded that and it started working. I also had to wait until I got the DataChannel.StateChanged and checked that the state was open, it took under a second for this event to occur though.. So my tip is to double check those messages.
Hardcoding application0 worked for me since right now only thing we are using is the data channels.
IceCandidate's SdpMlineIndex and SdpMid properties are always 0. Is this correct behavior?
If you only have 1 data channel and no audio/video tracks, then yes, there's a single media line with id=0.
Are local descriptions set automatically?
Yes, the local description created by CreateOffer()
and CreateAnswer()
is automatically applied internally by the native library before the SDP message is passed to LocalOfferReadyToSend
.
Hardcoding application0 worked for me
Not sure why that is.
Hello,
my goal is to create a data channel for my UWP app, so it will be possible to send data from one PC to another. I created a solution according to documentation, but I'm getting this exception:
The problem is that the state of my DataChannel will never become 'Open' and is stuck at 'Connecting' state. Similarly, the
IceStateChanged
event will only get fired with 'Checking' state and never with 'Connected' one. I have read that this could happen, when there is no data channel created whenCreateOffer()
method is called, but that's not my case, because I'm creating it right in the beginning. Here's list of everything I do in my code:PeerConnection
and initialize itDataChannelAdded
event and then create new data channel withAddDataChannelAsync(1, "1", true, false)
- I'm using out-of-band data channel, since my app will use only one data channelLocalSdpReadytoSend
,IceCandidateReadytoSend
,Connected
,RenegotiationNeeded
&IceStateChanged
)channel.SendMessage(byteArray)
, but it fails with mentioned exceptionAm I missing something or doing something wrong here?
Both of my PCs are in the same network and they are able to ping each other so Internet connection shouldn't be a problem. I also have another two questions that may be related to this:
IceCandidate's SdpMlineIndex
andSdpMid
properties are always 0. Is this correct behavior?