private Task <BookedParticipantRoomResponse> CreateVmr(Conference conference, long roomId, string ingestUrl, VirtualCourtRoomType roomType, int existingRooms, KinlyRoomType kinlyRoomType) { var ingest = kinlyRoomType == KinlyRoomType.Panel_Member ? string.Empty : ingestUrl; var kinlyParticipantType = roomType == VirtualCourtRoomType.Witness ? "Witness" : "Civilian"; var roomPrefix = kinlyRoomType == KinlyRoomType.Panel_Member ? PanelMemberRoomPrefix : InterpreterRoomPrefix; var newRoomParams = new CreateParticipantRoomParams { Audio_recording_url = ingest, Participant_room_id = roomId.ToString(), Participant_type = kinlyParticipantType, Room_label_prefix = roomPrefix, Room_type = kinlyRoomType, Display_name = $"{roomPrefix}{existingRooms + 1}" }; return(_kinlyApiClient.CreateParticipantRoomAsync(conference.Id.ToString(), newRoomParams)); }
private async Task <ParticipantRoom> CreateAVmrAndRoom(Conference conference, int existingRooms, VirtualCourtRoomType roomType, KinlyRoomType kinlyRoomType) { _logger.LogInformation("Creating a new interpreter room for conference {Conference}", conference.Id); var roomId = await CreateInterpreterRoom(conference.Id, roomType); var ingestUrl = roomType == VirtualCourtRoomType.JudicialShared? null : $"{conference.IngestUrl}/{roomId}"; var vmr = await CreateVmr(conference, roomId, ingestUrl, roomType, existingRooms, kinlyRoomType); await UpdateRoomConnectionDetails(conference, roomId, vmr, ingestUrl); _logger.LogDebug("Updated room {Room} for conference {Conference} with joining details", roomId, conference.Id); return(await GetUpdatedRoom(conference, roomId)); }