initEnxRtc method

Future<void> initEnxRtc()

Implementation

Future<void> initEnxRtc() async {

  _addEnxEventHandlers();
  Map<String, dynamic> map = {
    'minWidth': 320,
    'minHeight': 180,
    'maxWidth': 1280,
    'maxHeight': 720
  };

  Map<String, dynamic> localInfo = {
    'audio': true,
    'video': true,
    'data': true,
    'framerate': 30,
    'audioMuted': isSelected.first,
    'videoMuted': isSelected[1],
    'videoSize': map,
    'audio_only':EnxSetting.instance.isConfirmation?isSelected[2]:EnxSetting.instance.isAudioOnlyCalls,
    'isVideoResolution': true
  };

  Map<String, dynamic> playerConfig = {
    'bandwidth': true,
    'screenshot': true,
    'avatar': true,
    'pinned': true,
    '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("token5 $token");
  await EnxRtc.joinRoom(token, localInfo, roomInfo, List.empty());
  // }
}