[VID-657] Add inbound state notification#1174
Merged
Conversation
thesyncim
approved these changes
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
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.
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.