sometimes first relayed track from SFU1 not received on SFU2
I found the root cause:
SFU1 call createRelayTrack after OnOpen event for dataChannel created between SFU1 and SFU2
it leads to sending message via dataChannel to SFU2 with ion_relay_request for this track
sometimes SFU2 receives message ion_relay_request from dataChannel before OnOpen fired on SFU2 and NewRelayPeer called
it leads to calling receive with no onTrack handlers set
As I understand OnOpen for dataChannel on SFU1 side and OnOpen on SFU2 not synchronized.
Your environment.
What did you do?
Trying to relay tracks between 2 ion-sfu
What did you expect?
Tracks relayed
What happened?
I do:
sometimes first relayed track from SFU1 not received on SFU2
I found the root cause: SFU1 call createRelayTrack after OnOpen event for dataChannel created between SFU1 and SFU2
it leads to sending message via dataChannel to SFU2 with ion_relay_request for this track
sometimes SFU2 receives message ion_relay_request from dataChannel before OnOpen fired on SFU2 and NewRelayPeer called it leads to calling receive with no onTrack handlers set
As I understand OnOpen for dataChannel on SFU1 side and OnOpen on SFU2 not synchronized.