Add hint_high_scale_livestream_publisher to the coordinator JoinCallRequest#1654
Conversation
Add optional hintHighScaleLivestreamPublisher param to the join flow, allowing callers to hint that the participant is publishing to a large audience. Threaded through Call.join() → Call.joinRequest() → StreamVideoClient.joinCall() → JoinCallRequest. Mirrors GetStream/stream-video-js#2199.
PR checklist ✅All required conditions are satisfied:
🎉 Great job! This PR is ready for review. |
WalkthroughAdded optional Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.kt (1)
829-900:⚠️ Potential issue | 🟠 MajorCarry the hint into rejoin and migration requests.
Line 829 and Line 900 call
joinRequestwithout the original hint, so a high-scale publisher rejoins/migrates withhintHighScaleLivestreamPublisher = null. Persist the join-time value and pass it on later join requests.Proposed fix
private var sfuSocketReconnectionTime: Long? = null + private var highScaleLivestreamPublisherHint: Boolean? = nullsuspend fun join( create: Boolean = false, createOptions: CreateCallOptions? = null, ring: Boolean = false, notify: Boolean = false, hintHighScaleLivestreamPublisher: Boolean? = null, ): Result<RtcSession> { + highScaleLivestreamPublisherHint = hintHighScaleLivestreamPublisher logger.d {- val joinResponse = joinRequest(location = it) + val joinResponse = joinRequest( + location = it, + hintHighScaleLivestreamPublisher = highScaleLivestreamPublisherHint, + )- val joinResponse = joinRequest(location = it, migratingFrom = session.value?.sfuName) + val joinResponse = joinRequest( + location = it, + migratingFrom = session.value?.sfuName, + hintHighScaleLivestreamPublisher = highScaleLivestreamPublisherHint, + )Also applies to: 1543-1568
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.kt` around lines 829 - 900, The rejoin and migrate flows call joinRequest without propagating the original hintHighScaleLivestreamPublisher, causing later joinRequest calls (in functions using joinRequest such as the rejoin schedule block and migrate schedule block) to send null; persist the original hint when the initial join succeeds (store it on the Call instance, e.g., a property like persistedHint or initialHint) and update the two call sites (the rejoin block that builds reconnectDetails and the migrate block that calls joinRequest) to pass that persisted hint into joinRequest's hintHighScaleLivestreamPublisher parameter so subsequent joinRequest calls include the original high-scale publisher hint.
🧹 Nitpick comments (1)
stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.kt (1)
510-516: Document the new public join hint.Line 515 adds an advanced public API flag with nullable semantics; please add KDoc explaining when to set it and what
nullmeans.Suggested KDoc
+ /** + * Joins this call and establishes an RTC session. + * + * `@param` hintHighScaleLivestreamPublisher Set to `true` when this participant is expected + * to publish to a large audience so backend routing can optimize for high-scale livestreams. + * Leave `null` to use the backend default behavior. + */ suspend fun join(As per coding guidelines, Use KDoc (
/** ... */) for public APIs and complex subsystems; link to Stream docs when relevant.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.kt` around lines 510 - 516, Add KDoc for the public suspend fun join(...) parameter hintHighScaleLivestreamPublisher (and update the function KDoc) describing what the flag does, when callers should pass true/false, and that null means “use server/default behavior” or “unspecified” (exact wording per product behavior); place the KDoc above the join function using /** ... */ and include a brief sentence linking to the Stream docs or relevant feature doc for more details; reference the parameter name hintHighScaleLivestreamPublisher and the function name join in the comment so readers can find it easily.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In
`@stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.kt`:
- Around line 829-900: The rejoin and migrate flows call joinRequest without
propagating the original hintHighScaleLivestreamPublisher, causing later
joinRequest calls (in functions using joinRequest such as the rejoin schedule
block and migrate schedule block) to send null; persist the original hint when
the initial join succeeds (store it on the Call instance, e.g., a property like
persistedHint or initialHint) and update the two call sites (the rejoin block
that builds reconnectDetails and the migrate block that calls joinRequest) to
pass that persisted hint into joinRequest's hintHighScaleLivestreamPublisher
parameter so subsequent joinRequest calls include the original high-scale
publisher hint.
---
Nitpick comments:
In
`@stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.kt`:
- Around line 510-516: Add KDoc for the public suspend fun join(...) parameter
hintHighScaleLivestreamPublisher (and update the function KDoc) describing what
the flag does, when callers should pass true/false, and that null means “use
server/default behavior” or “unspecified” (exact wording per product behavior);
place the KDoc above the join function using /** ... */ and include a brief
sentence linking to the Stream docs or relevant feature doc for more details;
reference the parameter name hintHighScaleLivestreamPublisher and the function
name join in the comment so readers can find it easily.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 11295819-6c01-4ce6-b885-669a2561a6eb
⛔ Files ignored due to path filters (1)
stream-video-android-core/src/main/kotlin/io/getstream/android/video/generated/models/JoinCallRequest.ktis excluded by!**/generated/**
📒 Files selected for processing (2)
stream-video-android-core/src/main/kotlin/io/getstream/video/android/core/Call.ktstream-video-android-core/src/main/kotlin/io/getstream/video/android/core/StreamVideoClient.kt
hint_high_scale_livestream_publisher to JoinCallRequest
SDK Size Comparison 📏
|
hint_high_scale_livestream_publisher to JoinCallRequesthint_high_scale_livestream_publisher to the coordinator JoinCallRequest
|
|
🚀 Available in v1.22.0 |


Goal
Allow callers to hint that the participant is publishing to a large audience when joining a call.
Mirrors GetStream/stream-video-js#2199.
Implementation
Added optional
hintHighScaleLivestreamPublisher: Boolean?parameter threaded through:Call.join()→Call._join()→Call.joinRequest()→StreamVideoClient.joinCall()→JoinCallRequestField is nullable with
nulldefault — fully backward compatible.Testing
RequiresApiimport issue inMediaManager.kt(unrelated to this change)Summary by CodeRabbit
hintHighScaleLivestreamPublisherparameter to call joining methods, enabling developers to indicate high-scale livestream publishing scenarios when joining calls. This parameter is now threaded through the entire join flow and forwarded to the API request for enhanced call configuration.