-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat: show "Failed" text on connection failure #26
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
Conversation
- Add `iceCandidatePoolSize` to prefetch ICE candidates before `setLocalDescription`. - Instantiate `RTCPeerConnection` sooner, don't wait for `getUserMedia()` to resolve. I have checked that this does indeed make us prepare the local offer faster by ~150ms. That is 300ms in total (per side). This commit also refactors the `CallsManager` by removing the `init()` method and moving its code into the constructor. This also helps us initialize it synchronously, which thus I have replaced `useEffect` with `useMemo` and moved the manager to inside the `App` component. Related: #10.
window.calls.endCall(); | ||
} | ||
|
||
onFailed() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that hypothetically this function can get called, for example, on a second startCall
invokation, which would not be quite correct. After the connection has been first established, we should fail only if the connection itself fails terminally.
In such a case, we'd show the "failed" screen, but still keep sending the video to the remote party, without the user knowing it.
}; | ||
|
||
this.peerConnection.onconnectionstatechange = () => { | ||
if (this.peerConnection.connectionState === "failed") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, it looks like this is not the terminal state? Based on my tests, the connection can still recover, without iceRestart()
.
} | ||
|
||
onFailed() { | ||
console.log("onFailed, ending the call soon."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update comment.
09c0e24
to
d726836
Compare
this needs to be rebased now |
postponing this, closing for now to have a more clear view of what is really wanted and needing review |
TODO: