Closed qmohammed93 closed 5 years ago
I haven't tested datachannels in that configuration yet, so can't confirm it's an issue. I'm away for the IETF this week, so it may be a while before I can investigate.
That said, it looks like an ICE failure, so you may want to check the Admin API for the reason why it fails.
Mh, just replicated your issue, and it is indeed as you said: in my case the first user that joined had his publisher ICE state change for some reason, which makes no sense since it was not THAT PeerConnection that was being updated or established. As a result, the other two participants got no video from that user. I'll have a look to see what's going wrong, and to see if it's a client thing or a server thing.
Ok, found out the issue: it was a missing unlock when updating a subscription, in particular when trying to add a second datachannel (that we prevent when we already have one). The relevant fix is here: https://github.com/meetecho/janus-gateway/pull/1459/commits/a0240a17afa7a1a6377a48ad6630b5d2b54f6ed7
I am testing mvideoroomtest in PR #1459 (Unified Plan branch), using Firefox browser.
I set data: true where the comments recommended it for data channel use. I have set up ondataopen and ondata callbacks (for both the Janus.init and subscribeTo()). I've set data: true in three locations, two within the media object in publishOwnFeed() and remoteFeed.createAnswer() and a final one in the publish variable within the sfutest.createOffer (I also tried removing it from this to see if it would change anything, no difference) .
Everything works completely fine after adding two people to the room. Data channels can be sent and received by both peers.
However once a third person joins the room, then one user will become disconnected and I receive the following messages in the JS console:
The janus.log looks like this at that time:
Note: All peers are in the same office, on the same network, controlled by me.
Most often it seems it's the second user that joined which ends up with the ICE disconnected messages. This user's video is frozen on the other peers, and he cannot send data channel messages - however, he can receive data channel messages from the other peers.