Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IonConnector: wait for SFU joined #206

Open
avxit opened this issue May 31, 2021 · 3 comments
Open

IonConnector: wait for SFU joined #206

avxit opened this issue May 31, 2021 · 3 comments

Comments

@avxit
Copy link
Contributor

avxit commented May 31, 2021

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
Copy link
Contributor Author

avxit commented Jun 11, 2021

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.

@saintplaybitorical
Copy link

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

@adwpc
Copy link
Contributor

adwpc commented Oct 28, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants