joinInGroupCall method

  1. @override
Future<TUIResult> joinInGroupCall(
  1. TUIRoomId roomId,
  2. String groupId,
  3. TUICallMediaType mediaType
)
override

Implementation

@override
Future<TUIResult> joinInGroupCall(TUIRoomId roomId, String groupId, TUICallMediaType mediaType) async {
  try {
    if (!kIsWeb && (Platform.isIOS || Platform.isAndroid)) {
      await methodChannel.invokeMethod(
          "joinInGroupCall",
          {'roomId': roomId.toJson(), 'groupId': groupId, 'mediaType': mediaType.index});
    } else {
      return TUIResult(code: "-1", message: 'This platform is not supported');
    }
  } on PlatformException catch (error) {
    return TUIResult(code: error.code, message: error.message);
  } on Exception catch (error) {
    return TUIResult(code: "-1", message: error.toString());
  }
  return TUIResult(code: "", message: "joinInGroupCall success");
}