initEnxRtc method

Future<void> initEnxRtc()

Implementation

Future<void> initEnxRtc() async {
  _addEnxEventHandlers();
  Map<String, dynamic> map = {
    'minWidth': 320,
    'minHeight': 180,
    'maxWidth': 1280,
    'maxHeight': 720
  };
  print("testing ${EnxSetting.instance.isAudioMute} ${EnxSetting.instance.isVideoMute} ${EnxSetting.instance.isAudioOnlyCalls}");

  Map<String, dynamic> localInfo = {
    'audio': true,
    'video': true,
    'data': true,
    'framerate': 30,
    'audioMuted': EnxSetting.instance.isAudioMute,
    'videoMuted': EnxSetting.instance.isVideoMute,
    'videoSize': map,
    'audio_only': EnxSetting.instance.isAudioOnlyCalls,
    'isVideoResolution': true
  };

  Map<String, dynamic> playerConfig = {
    'bandwidth': true,
    'screenshot': true,
    'avatar': true,
    'avatarHeight' : 200,
    'avatarWidth' : 200,
    'iconHeight': 25,
    'iconWidth': 25,
    // "iconColor": '#ffffff'
  };
  Map<String, dynamic> roomInfo = {
    'allow_reconnect': true,
    'number_of_attempts': 3,
    'timeout_interval': 45,
    'playerConfiguration': playerConfig,
    'forceTurn': false,
    'chat_only': false
  };

  // bool isPermissionGranted =
  // await handlePermissionsForCall(context);
  //if (isPermissionGranted) {
  print("localInfo $localInfo  roomInfo $roomInfo");
  await EnxRtc.joinRoom(token, localInfo, roomInfo, List.empty());
  // }
}