Skip to content

[VID-657] Add inbound state notification#1174

Merged
brunoribc merged 3 commits intomainfrom
inbound-video-pause
Jul 7, 2025
Merged

[VID-657] Add inbound state notification#1174
brunoribc merged 3 commits intomainfrom
inbound-video-pause

Conversation

@brunoribc
Copy link
Copy Markdown
Contributor

@brunoribc brunoribc commented Jun 30, 2025

SfuEvent_InboundStateNotification:
This event informs the client that the SFU has paused or resumed one or more video streams it is subscribed to. This is typically a result of the SFU's bandwidth management reacting to network conditions. The client should use this event to update its UI, for example, by showing or hiding the video element for the remote video of the affected participant.

The notification contains an array of InboundVideoState updates with : UserId, UserSessionId, TrackType and Paused property.

When the event is sent:
Paused: When the server transitions a stream from active to paused. The notification will contain an InboundVideoState element with Paused:true.
Resumed: When the server transitions a stream from paused back to active. The notification will contain an InboundVideoState with Paused = false.
The event is not sent for redundant state changes (e.g., paused -> paused).

State Reset on publisher muting (trackUnpublished):
A crucial behavior to understand is how the state is reset. When a remote participant unpublishes a track (e.g., turns off their camera), the SFU allocator considers this track inactive.
No InboundStateNotification is sent to the subscriber when a track becomes inactive. The subscriber will already know this via a trackUnpublished event.
However, internally, the SFU will reset the paused state for that track.

JoinRequest_ClientCapabilities:
Introducing a new enum list field in join request, to notify SFU of client supported features/capabilities.

@brunoribc brunoribc changed the title [PEB-0] Add inbound state notification [VID-657] Add inbound state notification Jul 3, 2025
@brunoribc brunoribc merged commit 2696819 into main Jul 7, 2025
2 checks passed
@brunoribc brunoribc deleted the inbound-video-pause branch July 7, 2025 11:13
@github-actions github-actions Bot mentioned this pull request Jul 7, 2025
oliverlaz added a commit to GetStream/stream-video-js that referenced this pull request Jul 18, 2025
Adds SDK support for notifying about forced remote (subscribed) video mute in poor network conditions.

### 📝 Implementation notes
When our SFU bandwidth estimator detects low bandwidth, it may decide to
mute certain (or all) incoming video tracks.
On the recipient side, this will appear as a frozen frame. To avoid this
bad UX, now we'll show the VideoPlaceholder component every time we get
information that a certain track is paused.

Demo:
https://getstream.slack.com/archives/C080UH1HMUK/p1751297669629389?thread_ts=1751013657.438619&cid=C080UH1HMUK

🔗 Ref: GetStream/protocol#1174
🎫 Ticket: https://linear.app/stream/issue/REACT-485/inbound-video-pause
📑 Docs: GetStream/docs-content#426
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