How to enter in jitsi meet room in Picture in Picture mode?

2.3k Views Asked by At
joinClassWithToken({
  @required final String room, //Room ID
  @required final String serevrUrl, //Server Id
  @required final String subject,
  @required final String token, //Subject of Class
  @required final String type,
  final String displayName, //Display Name of user
  final String userEmail, //Email of user
  final bool audioOnly, //Audio Only Flag
  final bool audioMuted, //Audio Mute Flag
  final bool videoMuted, //Video Mute flag
}) async {
  try {
    Map<FeatureFlagEnum, bool> featureFlags = {
      FeatureFlagEnum.INVITE_ENABLED: false,
      FeatureFlagEnum.IOS_RECORDING_ENABLED: false,
      FeatureFlagEnum.LIVE_STREAMING_ENABLED: false,
      FeatureFlagEnum.RECORDING_ENABLED: false,
      FeatureFlagEnum.MEETING_PASSWORD_ENABLED: false,
      FeatureFlagEnum.ADD_PEOPLE_ENABLED: false,
      FeatureFlagEnum.CALL_INTEGRATION_ENABLED: true,
      FeatureFlagEnum.PIP_ENABLED: true
    };
    var options = JitsiMeetingOptions()
      ..room = room // Required, spaces will be trimmed
      ..serverURL = serevrUrl
      ..subject = subject
      ..userDisplayName = displayName
      ..token = token
      ..audioOnly = audioOnly
      ..audioMuted = audioMuted
      ..videoMuted = videoMuted
      ..featureFlags.addAll(featureFlags);
    print(options.toString());
    JitsiMeet.addListener(JitsiMeetingListener(
      onConferenceJoined: ({message}) => print('Jitsi Call Joined : $message'),
      onError: _errorMessage,
    ));
    await JitsiMeet.joinMeeting(options);
  } catch (error) {
    return Exception(error);
  }
}

I am developing a flutter application where I need the jitsi meet screen to start in Picturee in Picture Mode by default. I am currently using the jitsi_meet pub.dev package for using jitsi meet. Is there any way to do it?

1

There are 1 best solutions below

0
On

There seems to be an issue on how featureFlag is set on JitsiMeetingOptions. Instead of creating a Map<FeatureFlagEnum, bool> featureFlags, I suggest initializing a FeatureFlag object to modify the config.

 FeatureFlag featureFlag = FeatureFlag();

Then update featureFlag.pipEnabled

featureFlag.pipEnabled = true;

and set the featureFlag

var options = JitsiMeetingOptions()
  ..featureFlag = featureFlag;