3

The config.js file was already loaded and at second time its again loading and giving the error which triggers the onConferenceTerminated event and ends the meeting.The following code of join meeting :-

    
    
    try {
      var stopwatch = Stopwatch();
      // Enable or disable any feature flag here
      // If feature flag are not provided, default values will be used
      // Full list of feature flags (and defaults) available in the README
      Map<FeatureFlagEnum, bool> featureFlags =
      {
        FeatureFlagEnum.WELCOME_PAGE_ENABLED : false,
        FeatureFlagEnum.ADD_PEOPLE_ENABLED : true,
        FeatureFlagEnum.CALENDAR_ENABLED :false,
        FeatureFlagEnum.INVITE_ENABLED : false,
        FeatureFlagEnum.MEETING_PASSWORD_ENABLED: false,
        FeatureFlagEnum.TOOLBOX_ALWAYS_VISIBLE : false,
        FeatureFlagEnum.PIP_ENABLED : true, 
      };

      // Here is an example, disabling features for each platform
      if (Platform.isAndroid)
      {
        // Disable ConnectionService usage on Android to avoid issues (see README)
        featureFlags[FeatureFlagEnum.CALL_INTEGRATION_ENABLED] = false;
      }
      else if (Platform.isIOS)
      {
        // Disable PIP on iOS as it looks weird
        featureFlags[FeatureFlagEnum.PIP_ENABLED] = false;
      }

      // Define meetings options here
      var options = JitsiMeetingOptions()
        ..room = widget.room
        ..subject = subjectText
        ..userDisplayName = nameText
        ..iosAppBarRGBAColor = "#0080FF80"
        ..audioOnly = false
        ..audioMuted = false
        ..videoMuted = false
        ..featureFlags.addAll(featureFlags);

      debugPrint("JitsiMeetingOptions: $options");
      await JitsiMeet.joinMeeting(options,
          listener: JitsiMeetingListener(onConferenceWillJoin: ({message}) {

            debugPrint("${options.room} will join with message: $message");
          }, onConferenceJoined: ({message}) {
            stopwatch.start();
            debugPrint("${options.room} joined with message: $message");
          }, onConferenceTerminated: ({message})async{
            stopwatch.stop();
            debugPrint("${options.room} terminated with message: $message,time = ${stopwatch.elapsed.abs().inSeconds}");
          }),
          // by default, plugin default constraints are used
          //roomNameConstraints: new Map(), // to disable all constraints
          //roomNameConstraints: customContraints, // to use your own constraint(s)
      );
    } catch (error) {
      debugPrint("error: $error");
    }
  }

The error is "ExternalAPI Sending event: CONFERENCE_TERMINATED with data: { NativeMap: {"error":"Error: Config no longer needed!","url":"https://meet.jit.si/"} }".

0 Answers0