stream-video-flutter icon indicating copy to clipboard operation
stream-video-flutter copied to clipboard

Call participant view still on call after leaving

Open rlee1990 opened this issue 1 year ago • 11 comments

When someone leaves a call their block is still showing for others to see but is frozen. It should remove that person from the call altogether.

I am using the StreamCallContainer like so:

StreamCallContainer(
        call: widget.call,
        callConnectOptions: widget.options,
        callContentBuilder: (context, call, callState) {
          return StreamCallContent(
            call: call,
            callState: callState,
            callAppBarBuilder: (context, call, callState) {
              return AppBar();
            },
            callControlsBuilder: (context, call, callState) {
              final localParticipant = callState.localParticipant!;
              return StreamCallControls(
                options: [
                  ToggleMicrophoneOption(
                    call: call,
                    localParticipant: localParticipant,
                  ),
                  ToggleCameraOption(
                    call: call,
                    localParticipant: localParticipant,
                  ),
                  FlipCameraOption(
                    call: call,
                    localParticipant: localParticipant,
                  ),
                  LeaveCallOption(
                    call: call,
                    onLeaveCallTap: () => onleaveRoom(call),
                  ),
                ],
              );
            },
          );
        },
      )

Flutter (Channel stable, 3.22.2, on macOS 14.5 23F79 darwin-arm64, locale en-US)

rlee1990 avatar Jul 09 '24 15:07 rlee1990

Hey @rlee1990, this should likely have been resolved by recent versions.

How long does a participant linger in the call after quitting in your experience?

d3xvn avatar Jul 10 '24 15:07 d3xvn

@deven98 so lets use this example. If user A starts the call and user B and user C join the call. If user B leaves the call user A and C still see the square and the last image of user B on their screens. I also have an issue with not being able to tell if someone is just a viewer of a live stream or if they are a host/co-host.

rlee1990 avatar Jul 10 '24 15:07 rlee1990

Also @deven98 I am using version 0.4.2 stream_video_flutter

rlee1990 avatar Jul 10 '24 17:07 rlee1990

@deven98 any update on this?

rlee1990 avatar Jul 11 '24 18:07 rlee1990

Can you share your code for how you are leaving a room from your snippet?

d3xvn avatar Jul 12 '24 10:07 d3xvn

@deven98 this is the function:

    hideBottomBar.value = false;
    // if (widget.isHost) {
    //   timer2?.cancel();
    //   await widget.call.end();
    // } else {
    timer2?.cancel();
    call.leave();
    // }
    AutoRouter.of(context).maybePop();
  }

Here is where it is called:

StreamCallContainer(
        call: widget.call,
        callConnectOptions: widget.options,
        callContentBuilder: (context, call, callState) {
          return StreamCallContent(
            call: call,
            callState: callState,
            callAppBarBuilder: (context, call, callState) {
              return AppBar();
            },
            callControlsBuilder: (context, call, callState) {
              final localParticipant = callState.localParticipant!;
              return StreamCallControls(
                options: [
                  ToggleMicrophoneOption(
                    call: call,
                    localParticipant: localParticipant,
                  ),
                  ToggleCameraOption(
                    call: call,
                    localParticipant: localParticipant,
                  ),
                  FlipCameraOption(
                    call: call,
                    localParticipant: localParticipant,
                  ),
                  LeaveCallOption(
                    call: call,
                    onLeaveCallTap: () => onleaveRoom(call),
                  ),
                ],
              );
            },
          );
        },
      )

rlee1990 avatar Jul 12 '24 13:07 rlee1990

@deven98 I did some testing and saw that the person drops from the view after about a minute. Is there a way to get that down? Also, what is the best way for a live stream with a co-host to be shown while not showing a feed for a guest?

rlee1990 avatar Jul 14 '24 21:07 rlee1990

@deven98 any update on this?

rlee1990 avatar Jul 18 '24 13:07 rlee1990

I have the same issue in v0.4.4 of stream_video_flutter. Any progress?

ascendooleg avatar Aug 05 '24 09:08 ascendooleg

Hi @rlee1990 and @ascendooleg, could you check the logs for any errors? This shouldn't be happening, so I suspect that for some reason, the leave call request is failing. Please ensure you have log priority set to verbose before checking. Thank you.

StreamVideo(
    options: const StreamVideoOptions(
      logPriority: Priority.verbose,
    ),
);

Brazol avatar Aug 08 '24 13:08 Brazol

(W/SV:RtcManager): [unpublishTrack] removeTrack failed: Unable to RTCPeerConnection::removeTrack: Error: sender not found!

⚠️ (W/SV:SdpEditor): [edit] rejected (mismatched platform): ios (W/SV:SdpEditor): [edit] rejected (mismatched sdpType): remoteOffer

(V/SV:SfuClient): [updateSubscriptions] response: error: { flutter: code: ERROR_CODE_REQUEST_VALIDATION_FAILED flutter: message: video and screenshare subscriptions must have non-zero dimensions flutter: } flutter: flutter: 2024-08-08 18:18:14.596365 🔍 (V/SV:CallSession-1): [updateSubscriptions] result: Result.Failure{error: VideoError{message: ERROR_CODE_REQUEST_VALIDATION_FAILED - video and screenshare subscriptions must have non-zero dimensions, stackTrace: null}}

(V/SV:CallSession-1): [_onSubsciberDisconnectedOrFailed] result: Result.Success{data: error: { flutter: code: ERROR_CODE_PARTICIPANT_NOT_FOUND flutter: message: participant not found: call_cid:"default:18284f12-4f26-462b-97ef-13c2eee52cbf", user_id: "607112940", session_id: "79f2e5b1-a0ef-4a93-b4e3-58de5701c3a1" flutter: }

ascendooleg avatar Aug 08 '24 15:08 ascendooleg

Hey folks,

Can you confirm if this is still an issue for you?

Thanks.

d3xvn avatar Oct 23 '24 12:10 d3xvn

It works for me now.

rlee1990 avatar Oct 23 '24 13:10 rlee1990