UNPKG

@azure/communication-react

Version:

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

59 lines 2.55 kB
import { Call, CallAgent, StartCallOptions } from '@azure/communication-calling'; import { CommunicationIdentifier } from '@azure/communication-common'; import { StatefulCallClient, StatefulDeviceManager } from "../../../calling-stateful-client/src"; import { CommonCallingHandlers } from './createCommonHandlers'; import { VideoBackgroundEffectsDependency } from './createCommonHandlers'; import { DeepNoiseSuppressionEffectDependency } from './createCommonHandlers'; /** * Object containing all the handlers required for calling components. * * Calling related components from this package are able to pick out relevant handlers from this object. * See {@link useHandlers} and {@link usePropsFor}. * * @public */ export interface CallingHandlers extends CommonCallingHandlers { onStartCall: (participants: CommunicationIdentifier[], options?: StartCallOptions) => Call | undefined; } /** * Configuration options to include video effect background dependency. * @public */ export type CallingHandlersOptions = { onResolveVideoBackgroundEffectsDependency?: () => Promise<VideoBackgroundEffectsDependency>; /** * Dependency resolver for deep noise suppression effect. * @beta */ onResolveDeepNoiseSuppressionDependency?: () => Promise<DeepNoiseSuppressionEffectDependency>; }; /** * Type of {@link createDefaultCallingHandlers}. * * @public */ export type CreateDefaultCallingHandlers = (callClient: StatefulCallClient, callAgent: CallAgent | undefined, deviceManager: StatefulDeviceManager | undefined, call: Call | undefined, options?: CallingHandlersOptions) => CallingHandlers; /** * Create the default implementation of {@link CallingHandlers} for teams call. * * Useful when implementing a custom component that utilizes the providers * exported from this library. * * @public */ export declare const createDefaultCallingHandlers: CreateDefaultCallingHandlers; /** * Handlers only for calling components * @internal */ export interface _ComponentCallingHandlers { /** VideoGallery callback prop to start local spotlight */ onStartLocalSpotlight: () => Promise<void>; /** VideoGallery callback prop to stop local spotlight */ onStopLocalSpotlight: () => Promise<void>; /** VideoGallery callback prop to start remote spotlight */ onStartRemoteSpotlight: (userIds: string[]) => Promise<void>; /** VideoGallery callback prop to stop remote spotlight */ onStopRemoteSpotlight: (userIds: string[]) => Promise<void>; } //# sourceMappingURL=createHandlers.d.ts.map