UNPKG

@azure/communication-react

Version:

React library for building modern communication user experiences utilizing Azure Communication Services

87 lines 3.7 kB
import { CallClientState, CallState, DeviceManagerState, RemoteParticipantState, StatefulCallClient } from "../../../calling-stateful-client/src"; import { CallState as CallStatus, EnvironmentInfo, LocalVideoStream, ParticipantRole } from '@azure/communication-calling'; import { CommunicationIdentifier, CommunicationUserIdentifier, MicrosoftTeamsUserIdentifier, PhoneNumberIdentifier, UnknownIdentifier } from '@azure/communication-common'; /** * Type for connmection state * * @internal */ export type ParticipantConnectionState = 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected' | 'Reconnecting'; /** * Check if the call state represents being in the call * * @internal */ export declare const _isInCall: (callStatus?: CallStatus) => boolean; /** * Check if the call state represents being in the lobby or waiting to be admitted. * * @internal */ export declare const _isInLobbyOrConnecting: (callStatus: CallStatus | undefined) => boolean; /** * Check if the device manager local video is on when not part of a call * i.e. do unparented views exist. * * @internal */ export declare const _isPreviewOn: (deviceManager: DeviceManagerState) => boolean; /** * Dispose of all preview views * We assume all unparented views are local preview views. * * @private */ export declare const disposeAllLocalPreviewViews: (callClient: StatefulCallClient) => Promise<void>; /** * Update the users displayNames based on the type of user they are * * @internal */ export declare const _updateUserDisplayNames: (participants: RemoteParticipantState[]) => RemoteParticipantState[]; /** * Get the display name of a participant for given userId * * @internal * */ export declare const getRemoteParticipantDisplayName: (participantUserId: string, remoteParticipants: { [keys: string]: RemoteParticipantState; } | undefined) => string | undefined; /** * Check whether the call is in a supported browser * * @internal */ export declare const _getEnvironmentInfo: (callClient: StatefulCallClient) => Promise<EnvironmentInfo>; /** * @private * A type guard to ensure all participants are acceptable type for Teams call */ export declare const isTeamsCallParticipants: (participants: CommunicationIdentifier[]) => participants is (PhoneNumberIdentifier | MicrosoftTeamsUserIdentifier | UnknownIdentifier)[]; /** * @private * A type guard to ensure all participants are acceptable type for ACS call */ export declare const isACSCallParticipants: (participants: CommunicationIdentifier[]) => participants is (CommunicationUserIdentifier | PhoneNumberIdentifier | UnknownIdentifier)[]; /** * @private * Checks whether the user is a 'Ringing' PSTN user or in a 'Connecting' state. */ export declare const _convertParticipantState: (participant: RemoteParticipantState) => ParticipantConnectionState; /** * @private * Changes the display name of the participant based on the local and remote user's role. */ export declare const maskDisplayNameWithRole: (displayName: string | undefined, localUserRole?: ParticipantRole, participantRole?: ParticipantRole, isHideAttendeeNamesEnabled?: boolean) => string | undefined; /** * Helper to create a local video stream from the selected camera. * @private */ export declare const createLocalVideoStream: (callClient: StatefulCallClient) => Promise<LocalVideoStream | undefined>; /** * Get call state if existing, if not and the call not exists in ended record return undefined, if it never exists, throw an error. * @private */ export declare const getCallStateIfExist: (state: CallClientState, callId: string) => CallState | undefined; //# sourceMappingURL=callUtils.d.ts.map