ion-sdk-js icon indicating copy to clipboard operation
ion-sdk-js copied to clipboard

`IonConnector`: wait for SFU joined

Open avxit opened this issue 4 years ago • 3 comments

Why we don't wait for sfu.join finish then call this.onjoin? I'm checking if sfu is defined after onjoin, but since sfu.join is async there is no way to know if sfu.join success or not.

https://github.com/pion/ion-sdk-js/blob/1e7603187c89afd15a83c6b8287b03149de42b06/src/ion.ts#L92-L106

avxit avatar May 31 '21 14:05 avxit

Hello @adwpc, what do you think about it? I can help with a PR if it makes sense to you and everyone. Currently I'm patching the library to use in my project.

avxit avatar Jun 11 '21 10:06 avxit

I think it makes sense. Without fully joining the SFU, calls to .publish(stream) are going to throw.

saintplaybitorical avatar Jun 16 '21 15:06 saintplaybitorical

@avxit Sorry for late. looks good! thanks! happy to merge this.

adwpc avatar Oct 28 '21 08:10 adwpc