Closed manishiitg closed 3 years ago
await clientRef.current.join(meshidRef.current);
this should happen inside your signal.onopen callback
yes. i am already doing it inside the onopen callback. i wrote it outside by mistake
signalRef.current = new IonSFUJSONRPCSignal(host);
clientRef.current = new Client(signalRef.current, webrtcConfig);
signalRef.current.onopen = async () => {
setNotification("signal opened...")
clientRef.current.join(meshidRef.current);
clearTimeout(joinTimeout.current)
this is the actual code as of now i have removed await from my code
Do you set the client.ontrack callback ahead of time? The behavior of await client.join did change recently (it now awaits for the api datachannel to arrive).
no my ontrack is after await join not before. i will check by putting it before it and see
@manishiitg did this solve your issue?
@billylindeman didn't check it yet. will do soon
for now just not using await.
Your environment.
What did you do?
This is how my code looks like the outline at least P.S using react
Now the main bug comes here
if i add an await here then if there is another peer on the call, i don't recieve his onTrack event. only if new peers join i recieve the onTrack not for people already on the call.
What did you expect?
i expect await should only wait for me to join on the call. if i use await it should mean i won't get ontrack of users already on the call
What happened?