Skip to content

fix(llc): announce muted tracks to the SFU as muted - #1534

Open
Brazol wants to merge 1 commit into
v2from
fix/announce-track-muted-state
Open

Brazol wants to merge 1 commit into
v2from
fix/announce-track-muted-state

Conversation

@Brazol

@Brazol Brazol commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

🎯 Goal

Flutter never sent TrackInfo.muted to the SFU. RtcTracksInfoMapper.toDTO() left the field out, so every track in SetPublisher, the join request's announcedTracks and UpdatePublish went out as unmuted.

Muting disables a track but leaves it attached to its sender, so a muted microphone or camera keeps being announced. When another track is published while muted, for example turning the camera on with the mic muted, the SetPublisher that follows announces the mic as unmuted. The mute-state update sent at mute time isn't sent again after that.

Android, iOS and JS all send the flag:

  • Android: Publisher.kt, muted = !track.enabled()
  • iOS: Local{Audio,Video,ScreenShare}MediaAdapter.swift, trackInfo.muted = !track.isEnabled
  • JS: Publisher.ts, muted: !isTrackLive

GetStream/stream-video-android#1896 shows the SFU acts on this field. Hosts that wrongly announced muted=true there were treated as audio-only.

🛠 Implementation details

🧪 Testing

  • New rtc_tracks_info_mapper_test.dart checks a muted and an unmuted track. The muted case fails without the fix.
  • The full stream_video suite passes.
  • Not reproduced on devices yet. Suggested check: join from two devices, mute the mic on the Flutter one, turn its camera on, and check that the other device still shows the mic as muted.

🤖 Generated with Claude Code

RtcTracksInfoMapper.toDTO() built sfu TrackInfo without the muted flag,
so every track in SetPublisher, the join request and UpdatePublish went
out as unmuted, including a disabled track still attached to its sender.
Android, iOS and JS all send it. RtcTrackInfo.muted has been computed
correctly from the sender track's enabled flag since #1173.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Brazol
Brazol requested a review from a team as a code owner October 29, 2026 17:13
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f5ccfcca-8f5a-4d75-9af6-a4b079fb523f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the v2 label Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

SDK Size

title v2 branch diff status
android_stream_video 15.08 MB 15.08 MB 0 KB 🟢
android_stream_video_flutter 17.48 MB 17.48 MB 0 KB 🟢
pub_stream_video 1.0 MB 1.0 MB 0 KB 🟢
pub_stream_video_filters 0.02 MB 0.02 MB 0 KB 🟢
pub_stream_video_flutter 1.0 MB 1.0 MB 0 KB 🟢
pub_stream_video_noise_cancellation 0.05 MB 0.05 MB 0 KB 🟢
pub_stream_video_push_notification 0.36 MB 0.36 MB 0 KB 🟢
pub_stream_video_screen_sharing 0.01 MB 0.01 MB 0 KB 🟢

Measured on 6f40d3e.

@github-actions

Copy link
Copy Markdown

Size Breakdown

What each SDK adds to an empty release app, per Dart package and native library. Dart sizes are uncompressed symbol sizes. Open the sdk-size-analysis artifacts of this run in the DevTools App Size tool to drill down further.

This run does not measure ios.

Measured on 6f40d3e.

android · stream_video: 15.05 MB (+0.1 KB)
Component Size Δ vs v2
native:libjingle_peerconnection_so.so 11.96 MB 0
package:stream_video 1.07 MB +0.1 KB
classes.dex 261.9 KB 0
dart:@unknown 256.6 KB -0.0 KB
dart:_http 153.9 KB 0
package:protobuf 146.1 KB 0
dart:mixin_deduplication 137.0 KB 0
native:libdartjni.so 121.7 KB 0
dart:io 99.3 KB 0
dart:async 75.6 KB 0
package:stream_core 68.6 KB 0
package:stream_webrtc_flutter 56.3 KB 0
package:rxdart 54.3 KB 0
package:dio 51.8 KB 0
dart:core 51.5 KB 0
other (71) 536.8 KB 0
android · stream_video_flutter: 17.36 MB (+0.1 KB)
Component Size Δ vs v2
native:libjingle_peerconnection_so.so 11.96 MB 0
package:stream_video 1.13 MB +0.1 KB
package:flutter 698.9 KB -0.0 KB
classes.dex 454.8 KB 0
dart:@unknown 431.3 KB -0.0 KB
dart:mixin_deduplication 356.0 KB +0.0 KB
package:stream_video_flutter 205.5 KB 0
dart:_http 154.3 KB 0
package:protobuf 145.6 KB 0
dart:io 136.4 KB 0
package:stream_core_flutter 124.2 KB 0
native:libdartjni.so 121.7 KB 0
assets 118.5 KB 0
package:hive_ce 99.2 KB 0
dart:@shared 83.4 KB +0.0 KB
other (98) 1.22 MB 0

@Brazol Brazol added the ready label Oct 30, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant