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

Implemented fast reconnection #235

Merged
merged 7 commits into from
Nov 23, 2023
Merged

Implemented fast reconnection #235

merged 7 commits into from
Nov 23, 2023

Conversation

martinmitrevski
Copy link
Collaborator

🎯 Goal

Implement fast reconnect on iOS. Fast reconnect means you try to re-join without leaving the call. Other users will notice a brief freeze of you.

Check the spec on notion for more details.

🛠 Implementation

Mostly updated the WebRTC client.

🎨 Showcase

Add relevant screenshots and/or videos/gifs to easily see what this PR changes, if applicable.

Before After
img img

🧪 Manual Testing Notes

It's a bit tricky to test, and the success of fast reconnect depends on many factors.

However, what's important is - even if fast reconnect fails, there's a full reconnect as a fallback.

Testing steps:

  • join a call on WiFi
  • quickly switch to 5g / other Wifi
  • you should reconnect to the call without leaving the call

☑️ Contributor Checklist

  • I have signed the Stream CLA (required)
  • This change follows zero ⚠️ policy (required)
  • This change should receive manual QA
  • Changelog is updated with client-facing changes
  • New code is covered by unit tests
  • Comparison screenshots added for visual changes
  • Affected documentation updated (Docusaurus, tutorial, CMS)

🎁 Meme

ALT_TEXT

@martinmitrevski martinmitrevski requested a review from a team as a code owner November 21, 2023 14:16
Copy link

1 Warning
⚠️ Please be sure to complete the Contributor Checklist in the Pull Request description

Generated by 🚫 Danger

Copy link
Collaborator

@ipavlidakis ipavlidakis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There a few more points from the Spec that Android is handling and seems that we don't.

  1. They seem to be handling differently the WS disconnection and the Internet connection dropping (reference)
  2. When trying to fully reconnect they are trying for up to 30 seconds and then they fail. Shall we also do that (probably as part of another PR)?

I tried connecting to another wifi (the guest network of my main one) but didn't manage to get the onto the fast reconnect path

Sources/StreamVideo/WebRTC/WebRTCClient.swift Outdated Show resolved Hide resolved
Sources/StreamVideo/WebRTC/WebRTCClient.swift Outdated Show resolved Hide resolved
Sources/StreamVideo/WebRTC/WebRTCClient.swift Show resolved Hide resolved
Sources/StreamVideo/WebRTC/WebRTCClient.swift Show resolved Hide resolved
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

67.3% 67.3% Coverage
0.0% 0.0% Duplication

@martinmitrevski martinmitrevski merged commit b03daf9 into main Nov 23, 2023
13 checks passed
@martinmitrevski martinmitrevski deleted the fast-reconnection branch November 23, 2023 11:58
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

Successfully merging this pull request may close these issues.

3 participants