Flutter 电话会议就像放大了颤振

Flutter 电话会议就像放大了颤振,flutter,conference,zoom-sdk,videocall,Flutter,Conference,Zoom Sdk,Videocall,我想在我的应用程序中的颤振任何人都有任何关于如何做到这一点,除了agora,因为我已经知道它,但它的付费会议视频通话。那么还有其他解决办法吗 zoom在颤振中还支持另一项功能?是的,您可以为此使用jitsi_meet软件包:以下是示例: import 'dart:io'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:jitsi_meet/feat

我想在我的应用程序中的颤振任何人都有任何关于如何做到这一点,除了agora,因为我已经知道它,但它的付费会议视频通话。那么还有其他解决办法吗


zoom在颤振中还支持另一项功能?

是的,您可以为此使用
jitsi_meet
软件包:以下是示例:

import 'dart:io';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:jitsi_meet/feature_flag/feature_flag.dart';
import 'package:jitsi_meet/jitsi_meet.dart';
import 'package:jitsi_meet/jitsi_meeting_listener.dart';
import 'package:jitsi_meet/room_name_constraint.dart';
import 'package:jitsi_meet/room_name_constraint_type.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  final serverText = TextEditingController();
  final roomText = TextEditingController(text: "plugintestroom");
  final subjectText = TextEditingController(text: "My Plugin Test Meeting");
  final nameText = TextEditingController(text: "Plugin Test User");
  final emailText = TextEditingController(text: "fake@email.com");
  var isAudioOnly = true;
  var isAudioMuted = true;
  var isVideoMuted = true;

  @override
  void initState() {
    super.initState();
    JitsiMeet.addListener(JitsiMeetingListener(
        onConferenceWillJoin: _onConferenceWillJoin,
        onConferenceJoined: _onConferenceJoined,
        onConferenceTerminated: _onConferenceTerminated,
        onPictureInPictureWillEnter: _onPictureInPictureWillEnter,
        onPictureInPictureTerminated: _onPictureInPictureTerminated,
        onError: _onError));
  }

  @override
  void dispose() {
    super.dispose();
    JitsiMeet.removeAllListeners();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Container(
          padding: const EdgeInsets.symmetric(
            horizontal: 16.0,
          ),
          child: SingleChildScrollView(
            child: Column(
              children: <Widget>[
                SizedBox(
                  height: 24.0,
                ),
                TextField(
                  controller: serverText,
                  decoration: InputDecoration(
                      border: OutlineInputBorder(),
                      labelText: "Server URL",
                      hintText: "Hint: Leave empty for meet.jitsi.si"),
                ),
                SizedBox(
                  height: 16.0,
                ),
                TextField(
                  controller: roomText,
                  decoration: InputDecoration(
                    border: OutlineInputBorder(),
                    labelText: "Room",
                  ),
                ),
                SizedBox(
                  height: 16.0,
                ),
                TextField(
                  controller: subjectText,
                  decoration: InputDecoration(
                    border: OutlineInputBorder(),
                    labelText: "Subject",
                  ),
                ),
                SizedBox(
                  height: 16.0,
                ),
                TextField(
                  controller: nameText,
                  decoration: InputDecoration(
                    border: OutlineInputBorder(),
                    labelText: "Display Name",
                  ),
                ),
                SizedBox(
                  height: 16.0,
                ),
                TextField(
                  controller: emailText,
                  decoration: InputDecoration(
                    border: OutlineInputBorder(),
                    labelText: "Email",
                  ),
                ),
                SizedBox(
                  height: 16.0,
                ),
                SizedBox(
                  height: 16.0,
                ),
                CheckboxListTile(
                  title: Text("Audio Only"),
                  value: isAudioOnly,
                  onChanged: _onAudioOnlyChanged,
                ),
                SizedBox(
                  height: 16.0,
                ),
                CheckboxListTile(
                  title: Text("Audio Muted"),
                  value: isAudioMuted,
                  onChanged: _onAudioMutedChanged,
                ),
                SizedBox(
                  height: 16.0,
                ),
                CheckboxListTile(
                  title: Text("Video Muted"),
                  value: isVideoMuted,
                  onChanged: _onVideoMutedChanged,
                ),
                Divider(
                  height: 48.0,
                  thickness: 2.0,
                ),
                SizedBox(
                  height: 64.0,
                  width: double.maxFinite,
                  child: RaisedButton(
                    onPressed: () {
                      _joinMeeting();
                    },
                    child: Text(
                      "Join Meeting",
                      style: TextStyle(color: Colors.white),
                    ),
                    color: Colors.blue,
                  ),
                ),
                SizedBox(
                  height: 48.0,
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }

  _onAudioOnlyChanged(bool value) {
    setState(() {
      isAudioOnly = value;
    });
  }

  _onAudioMutedChanged(bool value) {
    setState(() {
      isAudioMuted = value;
    });
  }

  _onVideoMutedChanged(bool value) {
    setState(() {
      isVideoMuted = value;
    });
  }

  _joinMeeting() async {
    String serverUrl =
        serverText.text?.trim()?.isEmpty ?? "" ? null : serverText.text;

    try {
      // 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
      FeatureFlag featureFlag = FeatureFlag();
      featureFlag.welcomePageEnabled = false;
      // Here is an example, disabling features for each platform
      if (Platform.isAndroid) {
        // Disable ConnectionService usage on Android to avoid issues (see README)
        featureFlag.callIntegrationEnabled = false;
      } else if (Platform.isIOS) {
        // Disable PIP on iOS as it looks weird
        featureFlag.pipEnabled = false;
      }

      //uncomment to modify video resolution
      //featureFlag.resolution = FeatureFlagVideoResolution.MD_RESOLUTION;

      // Define meetings options here
      var options = JitsiMeetingOptions()
        ..room = roomText.text
        ..serverURL = serverUrl
        ..subject = subjectText.text
        ..userDisplayName = nameText.text
        ..userEmail = emailText.text
        ..audioOnly = isAudioOnly
        ..audioMuted = isAudioMuted
        ..videoMuted = isVideoMuted
        ..featureFlag = featureFlag;

      debugPrint("JitsiMeetingOptions: $options");
      await JitsiMeet.joinMeeting(
        options,
        listener: JitsiMeetingListener(onConferenceWillJoin: ({message}) {
          debugPrint("${options.room} will join with message: $message");
        }, onConferenceJoined: ({message}) {
          debugPrint("${options.room} joined with message: $message");
        }, onConferenceTerminated: ({message}) {
          debugPrint("${options.room} terminated with message: $message");
        }, onPictureInPictureWillEnter: ({message}) {
          debugPrint("${options.room} entered PIP mode with message: $message");
        }, onPictureInPictureTerminated: ({message}) {
          debugPrint("${options.room} exited PIP mode with message: $message");
        }),
        // 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");
    }
  }

  static final Map<RoomNameConstraintType, RoomNameConstraint>
      customContraints = {
    RoomNameConstraintType.MAX_LENGTH: new RoomNameConstraint((value) {
      return value.trim().length <= 50;
    }, "Maximum room name length should be 30."),
    RoomNameConstraintType.FORBIDDEN_CHARS: new RoomNameConstraint((value) {
      return RegExp(r"[$€£]+", caseSensitive: false, multiLine: false)
              .hasMatch(value) ==
          false;
    }, "Currencies characters aren't allowed in room names."),
  };

  void _onConferenceWillJoin({message}) {
    debugPrint("_onConferenceWillJoin broadcasted with message: $message");
  }

  void _onConferenceJoined({message}) {
    debugPrint("_onConferenceJoined broadcasted with message: $message");
  }

  void _onConferenceTerminated({message}) {
    debugPrint("_onConferenceTerminated broadcasted with message: $message");
  }

  void _onPictureInPictureWillEnter({message}) {
    debugPrint("_onPictureInPictureWillEnter broadcasted with message: $message");
  }

  void _onPictureInPictureTerminated({message}) {
    debugPrint("_onPictureInPictureTerminated broadcasted with message: $message");
  }

  _onError(error) {
    debugPrint("_onError broadcasted: $error");
  }
}
导入'dart:io';
进口“包装:颤振/cupertino.dart”;
进口“包装:颤振/材料.省道”;
导入“package:jitsi_meet/feature_flag/feature_flag.dart”;
导入“包:jitsi_meet/jitsi_meet.dart”;
导入“package:jitsi_meet/jitsi_meeting_listener.dart”;
导入“package:jitsi_meet/room_name_constraint.dart”;
导入“package:jitsi_meet/room_name_constraint_type.dart”;
void main()=>runApp(MyApp());
类MyApp扩展了StatefulWidget{
@凌驾
_MyAppState createState()=>\u MyAppState();
}
类MyAppState扩展了状态{
final serverText=TextEditingController();
最终房间文本=文本编辑控制器(文本:“插件”);
最终主题文本=文本编辑控制器(文本:“我的插件测试会议”);
最终名称text=TextEditingController(文本:“插件测试用户”);
final emailText=TextEditingController(文本:fake@email.com");
var Isaudionly=真;
var isaudiomute=true;
var isVideoMuted=true;
@凌驾
void initState(){
super.initState();
addListener(JitsiMeetingListener(
onConferenceWillJoin:\u onConferenceWillJoin,
onConferenceJoined:\u onConferenceJoined,
onConferenceTerminated:\u onConferenceTerminated,
onPictureInPictureWillEnter:\u onPictureInPictureWillEnter,
OnPictureInpictUrinerated:_onPictureInpictUrinerated,
onError:_onError));
}
@凌驾
无效处置(){
super.dispose();
JitsiMeet.removeAllListeners();
}
@凌驾
小部件构建(构建上下文){
返回材料PP(
家:脚手架(
appBar:appBar(
标题:const Text(“插件示例应用程序”),
),
主体:容器(
填充:const EdgeInsets.symmetric(
水平线:16.0,
),
子:SingleChildScrollView(
子:列(
儿童:[
大小盒子(
身高:24.0,
),
文本字段(
控制器:serverText,
装饰:输入装饰(
边框:OutlineInputBorder(),
labelText:“服务器URL”,
hintText:“提示:将meet.jitsi.si”留空,
),
大小盒子(
身高:16.0,
),
文本字段(
控制器:roomText,
装饰:输入装饰(
边框:OutlineInputBorder(),
标签文字:“房间”,
),
),
大小盒子(
身高:16.0,
),
文本字段(
控制器:主题文本,
装饰:输入装饰(
边框:OutlineInputBorder(),
labelText:“主题”,
),
),
大小盒子(
身高:16.0,
),
文本字段(
控制器:nameText,
装饰:输入装饰(
边框:OutlineInputBorder(),
labelText:“显示名称”,
),
),
大小盒子(
身高:16.0,
),
文本字段(
控制器:emailText,
装饰:输入装饰(
边框:OutlineInputBorder(),
labelText:“电子邮件”,
),
),
大小盒子(
身高:16.0,
),
大小盒子(
身高:16.0,
),
CheckboxListTile(
标题:文本(“仅音频”),
价值观:我听说,
一旦改变:_onaudionlychanged,
),
大小盒子(
身高:16.0,
),
CheckboxListTile(
标题:文本(“音频静音”),
值:已审核,
一旦更改:_onAudioMutedChanged,
),
大小盒子(
身高:16.0,
),
CheckboxListTile(
标题:文本(“视频静音”),
值:isvideomute,
一旦更改:\u onVideoMutedChanged,
),
分隔器(
身高:48.0,
厚度:2.0,
),
大小盒子(
身高:64.0,
宽度:double.maxFinite,
孩子:升起按钮(
已按下:(){
_joinMeeting();
},
子:文本(
“参加会议”,
样式:TextStyle(颜色:Colors.white),
),
颜色:颜色,蓝色,
),
),
大小盒子(
身高:48.0,
),
],
),
),
),
),
);
}
_onAudioOnlyChanged(布尔值){
设置状态(){
Isaudionly=值;
});
}
_OnAudiomuteChanged(布尔值){
设置状态(){
IsAudiomute=值;
});
}
_onVideoMutedChanged(布尔值){
设置状态(){
isVideoMuted=值;
});
}
_joinMeeting()异步{
字符串服务器URL=
serverText.text?.trim()?.isEmpty???“”?null:serverText.text;
试一试{
//在此启用或禁用任何功能标志
//如果功能标志为否