jitsi / jitsi-meet-flutter-sdk

Jitsi Meet plugin for Flutter
Apache License 2.0
31 stars 25 forks source link

Disable Security Option during call not working #58

Closed MarufHassanPietech closed 1 week ago

MarufHassanPietech commented 2 weeks ago

I am trying to disable the Security Option. This is my code, but after disabling it, its still not getting disabled for user. Screenshot_1714123530

Code ->

Future<void> joinVideoCall({
    required Enum_ChatType type,
    bool isAppointment = false,
  }) async {
    final JitsiMeet jitsiMeet = JitsiMeet();
    JitsiMeetEventListener listener;
    Map<String, bool> featureFlags;
    final appointmentProviders = ref.read(appointmentProvider);
    final userChatProvider = ref.read(userChatNotifierProvider);
    final groupChatProvider = ref.read(groupChatNotifierProvider);
    featureFlags = {
      "prejoinpage.enabled": false,
      "ios.screensharing.enabled": true,
      'FeatureFlag.areSecurityOptionsEnabled': false,
      'FeatureFlag.isRaiseHandEnabled': false,
      'FeatureFlag.isPipEnabled': true,
      'FeatureFlag.isWelcomePageEnabled': false,
      'FeatureFlag.isChatEnabled': true,
      'FeatureFlag.isMeetingNameEnabled': true,
      'FeatureFlag.isCalendarEnabled': false,
      'FeatureFlag.isCallIntegrationEnabled': false,
      'FeatureFlag.isAddPeopleEnabled': true,
      'FeatureFlag.isCloseCaptionsEnabled': false,
      'FeatureFlag.isLiveStreamingEnabled': false,
      'FeatureFlag.isInviteEnabled': true,
      'FeatureFlag.isIosRecordingEnabled': false,
      'FeatureFlag.isRecordingEnabled': false,
      'FeatureFlag.isVideoShareButtonEnabled': false,
      'FeatureFlag.isIosScreensharingEnabled': true,
      'FeatureFlag.isTileViewEnabled': true,
      'FeatureFlag.isToolboxAlwaysVisible': false,
    };
    listener = JitsiMeetEventListener(
      conferenceJoined: (url) {
        debugPrint("conferenceJoined: url: $url");
      },
      participantJoined: (email, name, role, participantId) {
        debugPrint(
          "participantJoined: email: $email, name: $name, role: $role, "
          "participantId: $participantId",
        );
      },
      chatMessageReceived: (senderId, message, isPrivate, timestamp) {
        debugPrint(
          "chatMessageReceived: senderId: $senderId, message: $message, "
          "isPrivate: $isPrivate",
        );
      },
      readyToClose: () {
        // FlutterCallkitIncoming.endAllCalls();
        debugPrint("readyToClose");
      },
    );

    // please only pass baseUrl in serverUrl field otherwise app is facing issue on terminate the call.
    final options = type == Enum_ChatType.ONE_ON_ONE
        ? isAppointment == true
            ? JitsiMeetConferenceOptions(
                serverURL: appointmentProviders.baseUrl,
                room: appointmentProviders.roomId ?? "",
                token: appointmentProviders.authToken,
                featureFlags: featureFlags,
                configOverrides: {
                  "localSubject": appointmentProviders.videoCallDisplayName,
                },
              )
            : JitsiMeetConferenceOptions(
                serverURL: userChatProvider.baseUrl,
                room: userChatProvider.roomId ?? "",
                token: userChatProvider.authToken,
                featureFlags: featureFlags,
                configOverrides: {
                  "localSubject": userChatProvider.videoCallDisplayName,
                },
              )
        : JitsiMeetConferenceOptions(
            serverURL: groupChatProvider.baseUrl,
            room: groupChatProvider.roomId ?? "",
            token: groupChatProvider.authToken,
            featureFlags: featureFlags,
            configOverrides: {
              "subject": groupChatProvider.videoCallDisplayName,
            },
          );
    log("VIDEO CALL __:` ${options.serverURL} || ${options.room} || ${options.token} || ${options.configOverrides} || ${options.featureFlags}");

    await jitsiMeet.join(
      options,
      listener,
    );
  }
}
saghul commented 2 weeks ago

What SDK version are you using?

MarufHassanPietech commented 2 weeks ago

@saghul 0.4.2

saghul commented 2 weeks ago

@Calinteodor PTAL when you get a chance.

Calinteodor commented 2 weeks ago

If you want to disable it everywhere this flag needs to be set to false for every user. This only hides the option locally.

MarufHassanPietech commented 1 week ago

@Calinteodor I have provided the entire code we are using for Jitsi. We have already kept it false.

'FeatureFlag.areSecurityOptionsEnabled': false,

Can you please point out where we need to make the change to turn it off for every user?

Calinteodor commented 1 week ago

Only if you ship the app(app store) all of your users would be using your code which turns the flag to false and your users won't have that feature available. If not, the feature will be disabled only locally.

I also tested the flag on the sample app https://github.com/jitsi/jitsi-meet-sdk-samples/tree/master/flutter and it works as expected.

MarufHassanPietech commented 1 week ago

I found the solution. I was disabling

'FeatureFlag.areSecurityOptionsEnabled': false,

I should have disabled

"security-options.enabled": false,