joinMeeting static method
Future<JitsiMeetingResponse>
joinMeeting(
- JitsiMeetingOptions options, {
- JitsiMeetingListener? listener,
- Map<
RoomNameConstraintType, RoomNameConstraint> ? roomNameConstraints,
Joins a meeting based on the JitsiMeetingOptions passed in. A JitsiMeetingListener can be attached to this meeting that will automatically be removed when the meeting has ended
Implementation
static Future<JitsiMeetingResponse> joinMeeting(JitsiMeetingOptions options,
{JitsiMeetingListener? listener,
Map<RoomNameConstraintType, RoomNameConstraint>?
roomNameConstraints}) async {
assert(options.room.trim().isNotEmpty, "room is empty");
// If no constraints given, take default ones
// (To avoid using constraint, just give an empty Map)
if (roomNameConstraints == null) {
roomNameConstraints = defaultRoomNameConstraints;
}
// Check each constraint, if it exist
// (To avoid using constraint, just give an empty Map)
if (roomNameConstraints.isNotEmpty) {
for (RoomNameConstraint constraint in roomNameConstraints.values) {
assert(
constraint.checkConstraint(options.room), constraint.getMessage());
}
}
// Validate serverURL is absolute if it is not null or empty
if (options.serverURL?.isNotEmpty ?? false) {
assert(Uri.parse(options.serverURL!).isAbsolute,
"URL must be of the format <scheme>://<host>[/path], like https://someHost.com");
}
return await JitsiMeetPlatform.instance
.joinMeeting(options, listener: listener);
}