Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolve
join
promise after API channel ready (2) (#192)
* Revert "Resolve `join` promise after API channel ready (#185)" (#190) This reverts commit 4d1d436. * Resolve `join` promise after API channel ready Previously, the (implicit) promise returned by `join` would resolve after establishing the transports, but before the API data channel was attached. This meant there was a small window of time where the API data channel was not ready, and trying to use the subscriber API during that time would fail silently. This change returns a promise that does not resolve until after the API channel is established. * Set Ion connector's `sfu` before join It's possible for some of the callbacks to fire while awaiting `sfu.join`, and those callbacks may need to access the connector's `sfu` property. So we should set it before we start the join. Co-authored-by: adwpc <[email protected]>
- Loading branch information