in packages/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.ts [756:800]
private _joinCall(audioOptions: AudioOptions, videoOptions: VideoOptions): CallTypeOf<AgentType> {
const isTeamsMeeting = this.locator ? 'meetingLink' in this.locator : false;
const isTeamsMeetingId = this.locator ? 'meetingId' in this.locator : false;
const isRoomsCall = this.locator ? 'roomId' in this.locator : false;
if (_isTeamsCallAgent(this.callAgent)) {
if (isTeamsMeeting) {
return this.callAgent.join(this.locator as TeamsMeetingLinkLocator, {
audioOptions,
videoOptions
}) as CallTypeOf<AgentType>;
}
if (isTeamsMeetingId) {
return this.callAgent.join(this.locator as TeamsMeetingIdLocator, {
audioOptions,
videoOptions
}) as CallTypeOf<AgentType>;
}
throw new Error('Locator not supported by TeamsCallAgent');
}
if (isTeamsMeeting) {
return this.callAgent.join(this.locator as TeamsMeetingLinkLocator, {
audioOptions,
videoOptions
}) as CallTypeOf<AgentType>;
}
if (isTeamsMeetingId) {
return this.callAgent.join(this.locator as TeamsMeetingIdLocator, {
audioOptions,
videoOptions
}) as CallTypeOf<AgentType>;
}
if (isRoomsCall) {
return this.callAgent.join(this.locator as RoomCallLocator, {
audioOptions,
videoOptions
}) as CallTypeOf<AgentType>;
}
return this.callAgent.join(this.locator as GroupCallLocator, {
audioOptions,
videoOptions
}) as CallTypeOf<AgentType>;
}