UNPKG

communication-react-19

Version:

React library for building modern communication user experiences utilizing Azure Communication Services (React 19 compatible fork)

21 lines 1.08 kB
// Copyright (c) Microsoft Corporation. // Licensed under the MIT License. import { createDefaultCallingHandlers } from "../../../../../calling-component-bindings/src"; import { createDefaultTeamsCallingHandlers } from "../../../../../calling-component-bindings/src"; import { _isACSCall, _isACSCallAgent, _isTeamsCall, _isTeamsCallAgent } from "../../../../../calling-stateful-client/src"; /** * @private * * This is used to create correct handler for generic agent type */ export function createHandlers(callClient, callAgent, deviceManager, call, options) { // Call can be either undefined or ACS Call if (_isACSCallAgent(callAgent) && (!call || (call && _isACSCall(call)))) { return createDefaultCallingHandlers(callClient, callAgent, deviceManager, call, options); } if (_isTeamsCallAgent(callAgent) && (!call || (call && _isTeamsCall(call)))) { return createDefaultTeamsCallingHandlers(callClient, callAgent, deviceManager, call, options); } throw new Error('Unhandled agent type'); } //# sourceMappingURL=createHandlers.js.map