GetStream / stream-video-flutter

Flutter Video SDK - Build your own video app experience using Dart, Flutter and the Stream Video Messaging API.
https://getstream.io/video/docs/flutter/
Other
46 stars 21 forks source link

Call participant view still on call after leaving #710

Open rlee1990 opened 2 months ago

rlee1990 commented 2 months ago

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)

deven98 commented 2 months ago

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?

rlee1990 commented 2 months ago

@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 commented 2 months ago

Also @deven98 I am using version 0.4.2 stream_video_flutter

rlee1990 commented 2 months ago

@deven98 any update on this?

deven98 commented 2 months ago

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

rlee1990 commented 2 months ago

@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 commented 2 months ago

@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 commented 1 month ago

@deven98 any update on this?

ascendooleg commented 1 month ago

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

Brazol commented 1 month ago

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,
    ),
);
ascendooleg commented 1 month ago

(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: }