3

config.js 文件已经加载,第二次再次加载并给出触发 onConferenceTerminated 事件并结束会议的错误。加入会议的以下代码:-

    
    
    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");
    }
  }

错误是“ExternalAPI Sending event: CONFERENCE_TERMINATED with data: { NativeMap: {"error":"Error: Config no longer needed!","url":"https://meet.jit.si/"} }"。

4

0 回答 0