Skip to content

Show the ended screen in LivestreamPlayer when a livestream ends - #1925

Merged
aleksandar-apostolov merged 3 commits into
developfrom
fix/livestream-player-ended-state
Nov 27, 2026
Merged

aleksandar-apostolov merged 3 commits into
developfrom
fix/livestream-player-ended-state

Conversation

@aleksandar-apostolov

Copy link
Copy Markdown
Collaborator

Goal

Fixes AND-2061 — viewers stayed on the live state with "The host's video is not available" when the call ended, instead of seeing the ended screen.

Implementation

  • An ended call leaves at once, so endedAt and the Disconnected connection reach LivestreamPlayer together. The state was only re-derived while connected.
  • The state now comes from nextLivestreamState (internal). A viewer who has joined moves to ENDED when the call has ended, even if the connection is already gone. Other transitions are unchanged.

Testing

  • LivestreamStateTest: ending and disconnecting together, a disconnect without an end, an ended call never joined, and the connected, joining and failed mappings.
  • Ran ./gradlew :stream-video-android-ui-compose:testDebugUnitTest --tests '*LivestreamStateTest' :stream-video-android-ui-compose:apiCheck. Both passed.
  • Seen on a device before the fix (HLS viewer, host ended the call). Not yet re-run on a device with the fix.

An ended call leaves right away, so endedAt and the disconnect reach
LivestreamPlayer together. The state was only re-derived while
connected, so viewers stayed on the live state with the host video
unavailable instead of seeing the ended screen.
@aleksandar-apostolov
aleksandar-apostolov requested a review from a team as a code owner November 26, 2026 13:14
@aleksandar-apostolov aleksandar-apostolov added the pr:bug Fixes a bug label Nov 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

PR checklist ✅

All required conditions are satisfied:

  • Title length is OK (or ignored by label).
  • At least one pr: label exists.
  • Sections ### Goal, ### Implementation, and ### Testing are filled, or the PR is bot-authored.
  • An issue is linked (Linear ticket or GitHub issue), or the PR is bot-authored.

🎉 Great job! This PR is ready for review.

@github-actions

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-video-android-core 12.38 MB 12.38 MB 0.00 MB 🟢
stream-video-android-ui-xml 5.65 MB 5.65 MB 0.00 MB 🟢
stream-video-android-ui-compose 6.19 MB 6.19 MB 0.00 MB 🟢

@aleksandar-apostolov
aleksandar-apostolov added this pull request to the merge queue Nov 27, 2026
Merged via the queue into develop with commit 30a882e Nov 27, 2026
24 checks passed
@aleksandar-apostolov
aleksandar-apostolov deleted the fix/livestream-player-ended-state branch November 27, 2026 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:bug Fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants