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

Reconnect v2 #1219

Draft
wants to merge 64 commits into
base: develop
Choose a base branch
from
Draft

Reconnect v2 #1219

wants to merge 64 commits into from

Conversation

aleksandar-apostolov
Copy link
Collaborator

🎯 Goal

Implement a reconnect v2 handling on Android.

🛠 Implementation details

New coordinator and sfu socket implementation.
Refactoring on the RTCSession and Call to better manage the connection state.

# Conflicts:
#	stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/StreamVideoImpl.kt
#	stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/socket/PersistentSocket.kt
# Conflicts:
#	stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/socket/CoordinatorSocket.kt
# Conflicts:
#	stream-video-android-core/api/stream-video-android-core.api
#	stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/socket/PersistentSocket.kt
#	stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/socket/SfuSocket.kt
# Conflicts:
#	stream-video-android-core/api/stream-video-android-core.api
#	stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/internal/network/NetworkStateProvider.kt
#	stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/utils/AndroidUtils.kt
# Conflicts:
#	stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/socket/PersistentSocket.kt
# Conflicts:
#	stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/StreamVideoImpl.kt
#	stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/utils/DebugInfo.kt
# Conflicts:
#	stream-video-android-ui-core/src/main/kotlin/io/getstream/video/android/ui/common/StreamCallActivity.kt
# Conflicts:
#	gradle/libs.versions.toml
#	stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/ClientState.kt
#	stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/notifications/internal/service/CallService.kt
Copy link
Contributor

@martinmitrevski martinmitrevski left a comment

Choose a reason for hiding this comment

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

Added some comments, we also need to add tests.

* If the connection is not alive anymore, an action to reconnect is postponed.
* In another case the healthCheck is postponed.
*/
private fun postponeHealthMonitor() {
Copy link
Contributor

Choose a reason for hiding this comment

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

what triggers the execution of the action, after it being postponed?

fun nextInterval(consecutiveFailures: Int): Long
}

object ExponencialRetryInterval : RetryInterval {
Copy link
Contributor

Choose a reason for hiding this comment

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

*Exponential

internal open class CustomObjectDtoAdapter<Value : Any>(private val kClass: KClass<Value>) {

private companion object {
private const val EXTRA_DATA = "extraData"
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this be "custom"?

}
}
}
// callListeners { listener -> listener.onDisconnected(cause = state.cause) }
Copy link
Contributor

Choose a reason for hiding this comment

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

can we remove this?

@@ -71,7 +71,7 @@ func (x VideoLayerSetting_Priority) Number() protoreflect.EnumNumber {

// Deprecated: Use VideoLayerSetting_Priority.Descriptor instead.
func (VideoLayerSetting_Priority) EnumDescriptor() ([]byte, []int) {
return file_video_sfu_event_events_proto_rawDescGZIP(), []int{26, 0}
return file_video_sfu_event_events_proto_rawDescGZIP(), []int{29, 0}
Copy link
Contributor

Choose a reason for hiding this comment

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

why do you keep this in the repo?

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.

2 participants