Add coordinator v2 adapters bridging to stream-android-core#1737
Draft
aleksandar-apostolov wants to merge 2 commits into
Draft
Add coordinator v2 adapters bridging to stream-android-core#1737aleksandar-apostolov wants to merge 2 commits into
aleksandar-apostolov wants to merge 2 commits into
Conversation
- VideoEventSerialization wraps MoshiVideoParser as StreamEventSerialization<VideoEvent> - IntegrationStreamTokenProvider adapts video TokenProvider to core StreamTokenProvider - GuestStreamTokenProvider mints a guest JWT via createGuest and adopts server identity - ConnectionStateMapper publishes StreamConnectionState -> ConnectionState extension (placeholder mapping — a later plan reshapes ConnectionState to mirror core 1:1)
- VideoEventSerializationTest round-trips four VideoEvent subclasses through MoshiVideoParser plus a malformed-input negative case - IntegrationStreamTokenProviderTest asserts delegation and userId being ignored - GuestStreamTokenProviderTest verifies createGuest single-call and user adoption - ClientStateConnectionMappingTest is table-driven over StreamConnectionState variants; each expected value carries a TODO(02-03) handoff marker
Contributor
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
Contributor
SDK Size Comparison 📏
|
|
This was referenced Jul 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Goal
Closes AND-1281
First step of the coordinator socket migration to
stream-android-core'sStreamClient. This PR only adds the bridging code — the actual swap happens in follow-up PRs. Nothing changes at runtime after this merges; the adapters aren't wired in yet.Merge order: this PR → wire StreamClient into StreamVideoClient (#1738) → rewrite ConnectionState (#1739).
Implementation
Four new internal adapter classes under
stream-video-android-core/socket/coordinator/v2/:VideoEventSerialization.ktMoshiVideoParserto plug video events into core's event pipelineIntegrationStreamTokenProvider.ktTokenProviderso core can consume itGuestStreamTokenProvider.ktcreateGuestREST endpoint on first token loadConnectionStateMapper.ktStreamConnectionState → ConnectionStatemapping lands in a follow-up PRAll four classes are
internal. No public API changes.Also includes four unit tests for the adapters. They fail until the wiring PR lands — that's intentional, they pin the expected behavior contracts.
Guest auth simplification: the existing
WritableUserRepositoryinterface is defined inline inGuestStreamTokenProviderfor now. A follow-up PR swaps it for the concreteUserRepositoryonce that becomes available ondevelop-v2.Testing
stream-video-android-core:testDebugUnitTestpasses.apiCheckshows zero public API diff — the new classes are allinternal.spotlessCheckgreen.