Skip to content

Commit 746759b

Browse files
committed
docs: document soft-mute camera strategy and RecvOnly server issue
1 parent acca107 commit 746759b

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

lib/features/call/bloc/call_bloc.dart

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,18 @@ class CallBloc extends Bloc<CallEvent, CallState> with WidgetsBindingObserver im
13921392
/// by adding the tracks to the peer connection.
13931393
/// after succes [_createPeerConnection].onRenegotiationNeeded will fired accordingly to webrtc state
13941394
/// than [__onCallSignalingEventAccepted] will be called as acknowledge of [UpdateRequest] with new remote jsep.
1395+
///
1396+
/// **Mute Implementation Note:**
1397+
/// Currently, this method implements a **"Soft Mute"** strategy by toggling
1398+
/// [MediaStreamTrack.enabled] instead of a **"Hard Mute"** (changing
1399+
/// [RTCRtpTransceiver] direction to [TransceiverDirection.RecvOnly]).
1400+
///
1401+
/// **Reason:** It was observed that switching to `RecvOnly` causes the server
1402+
/// to stop sending the *incoming* video stream to the client.
1403+
/// This behavior suggests that the server infrastructure might interpret the cessation
1404+
/// of outgoing RTP packets as a connection timeout or does not correctly handle
1405+
/// the session modification in the current configuration. "Soft Mute" avoids this
1406+
/// by keeping the channel active (sending black/empty frames).
13951407
Future<void> _onCallControlEventCameraEnabled(_CallControlEventCameraEnabled event, Emitter<CallState> emit) async {
13961408
final activeCall = state.retrieveActiveCall(event.callId);
13971409
if (activeCall == null) return;

0 commit comments

Comments
 (0)