@azure/communication-react 1.3.3-alpha-202208240015.0 → 1.3.3-alpha-202208270015.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/communication-react.d.ts +18 -18
  2. package/dist/dist-cjs/communication-react/index.js +340 -204
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js +1 -1
  7. package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.js.map +1 -1
  8. package/dist/dist-esm/communication-react/src/index.d.ts +1 -1
  9. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  10. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.d.ts +3 -14
  11. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js +64 -42
  12. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  13. package/dist/dist-esm/react-components/src/components/HoldButton.js +1 -1
  14. package/dist/dist-esm/react-components/src/components/HoldButton.js.map +1 -1
  15. package/dist/dist-esm/react-components/src/components/ParticipantItem.js +1 -1
  16. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  17. package/dist/dist-esm/react-components/src/components/index.d.ts +1 -1
  18. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/utils/useLongPress.d.ts +15 -0
  20. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js +58 -0
  21. package/dist/dist-esm/react-components/src/components/utils/useLongPress.js.map +1 -0
  22. package/dist/dist-esm/react-components/src/theming/icons.d.ts +3 -1
  23. package/dist/dist-esm/react-components/src/theming/icons.js +6 -2
  24. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  25. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +8 -0
  26. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  27. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +1 -1
  28. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -1
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +3 -3
  32. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js +31 -7
  34. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/HoldPane.js.map +1 -1
  35. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +12 -1
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/Buttons.styles.js +2 -1
  38. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/Buttons.styles.js.map +1 -1
  39. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js +5 -0
  40. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/HoldPane.styles.js.map +1 -1
  41. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +4 -3
  42. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  43. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js +1 -1
  44. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/DesktopMoreButton.js.map +1 -1
  45. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js +1 -1
  46. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/components/MoreDrawer.js.map +1 -1
  47. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js +1 -0
  48. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.styles.js.map +1 -1
  49. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +20 -3
  50. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  51. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js +1 -0
  52. package/dist/dist-esm/react-composites/src/composites/common/SendDtmfDialpad.styles.js.map +1 -1
  53. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +3 -1
  54. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +2 -0
  55. package/package.json +8 -8
@@ -0,0 +1,58 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { useRef, useState } from 'react';
4
+ /**
5
+ * @private
6
+ */
7
+ export default function useLongPress(onClick, onLongPress) {
8
+ const timerRef = useRef();
9
+ const [isLongPress, setIsLongPress] = useState(false);
10
+ const [action, setAction] = useState(false);
11
+ function startPressTimer() {
12
+ setIsLongPress(false);
13
+ timerRef.current = setTimeout(() => {
14
+ setIsLongPress(true);
15
+ }, 500);
16
+ }
17
+ function handleOnClick() {
18
+ onClick();
19
+ if (isLongPress) {
20
+ onLongPress();
21
+ return;
22
+ }
23
+ }
24
+ function handleOnKeyDown() {
25
+ if (action) {
26
+ setAction(false);
27
+ startPressTimer();
28
+ }
29
+ }
30
+ function handleOnKeyUp() {
31
+ setAction(true);
32
+ timerRef.current && clearTimeout(timerRef.current);
33
+ }
34
+ function handleOnMouseDown() {
35
+ startPressTimer();
36
+ }
37
+ function handleOnMouseUp() {
38
+ timerRef.current && clearTimeout(timerRef.current);
39
+ }
40
+ function handleOnTouchStart() {
41
+ startPressTimer();
42
+ }
43
+ function handleOnTouchEnd() {
44
+ timerRef.current && clearTimeout(timerRef.current);
45
+ }
46
+ return {
47
+ handlers: {
48
+ onClick: handleOnClick,
49
+ onMouseDown: handleOnMouseDown,
50
+ onMouseUp: handleOnMouseUp,
51
+ onTouchStart: handleOnTouchStart,
52
+ onTouchEnd: handleOnTouchEnd,
53
+ onKeyDown: handleOnKeyDown,
54
+ onKeyUp: handleOnKeyUp
55
+ }
56
+ };
57
+ }
58
+ //# sourceMappingURL=useLongPress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useLongPress.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/utils/useLongPress.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzC;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,OAAmB,EACnB,WAAuB;IAYvB,MAAM,QAAQ,GAAG,MAAM,EAAiC,CAAC;IACzD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,SAAS,eAAe;QACtB,cAAc,CAAC,KAAK,CAAC,CAAC;QACtB,QAAQ,CAAC,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;YACjC,cAAc,CAAC,IAAI,CAAC,CAAC;QACvB,CAAC,EAAE,GAAG,CAAC,CAAC;IACV,CAAC;IAED,SAAS,aAAa;QACpB,OAAO,EAAE,CAAC;QACV,IAAI,WAAW,EAAE;YACf,WAAW,EAAE,CAAC;YACd,OAAO;SACR;IACH,CAAC;IAED,SAAS,eAAe;QACtB,IAAI,MAAM,EAAE;YACV,SAAS,CAAC,KAAK,CAAC,CAAC;YACjB,eAAe,EAAE,CAAC;SACnB;IACH,CAAC;IAED,SAAS,aAAa;QACpB,SAAS,CAAC,IAAI,CAAC,CAAC;QAChB,QAAQ,CAAC,OAAO,IAAI,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC;IAED,SAAS,iBAAiB;QACxB,eAAe,EAAE,CAAC;IACpB,CAAC;IAED,SAAS,eAAe;QACtB,QAAQ,CAAC,OAAO,IAAI,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC;IAED,SAAS,kBAAkB;QACzB,eAAe,EAAE,CAAC;IACpB,CAAC;IAED,SAAS,gBAAgB;QACvB,QAAQ,CAAC,OAAO,IAAI,YAAY,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACrD,CAAC;IAED,OAAO;QACL,QAAQ,EAAE;YACR,OAAO,EAAE,aAAa;YACtB,WAAW,EAAE,iBAAiB;YAC9B,SAAS,EAAE,eAAe;YAC1B,YAAY,EAAE,kBAAkB;YAChC,UAAU,EAAE,gBAAgB;YAC5B,SAAS,EAAE,eAAe;YAC1B,OAAO,EAAE,aAAa;SACvB;KACF,CAAC;AACJ,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { useRef, useState } from 'react';\n\n/**\n * @private\n */\nexport default function useLongPress(\n onClick: () => void,\n onLongPress: () => void\n): {\n handlers: {\n onClick: () => void;\n onMouseDown: () => void;\n onMouseUp: () => void;\n onTouchStart: () => void;\n onTouchEnd: () => void;\n onKeyDown: () => void;\n onKeyUp: () => void;\n };\n} {\n const timerRef = useRef<ReturnType<typeof setTimeout>>();\n const [isLongPress, setIsLongPress] = useState(false);\n const [action, setAction] = useState(false);\n\n function startPressTimer(): void {\n setIsLongPress(false);\n timerRef.current = setTimeout(() => {\n setIsLongPress(true);\n }, 500);\n }\n\n function handleOnClick(): void {\n onClick();\n if (isLongPress) {\n onLongPress();\n return;\n }\n }\n\n function handleOnKeyDown(): void {\n if (action) {\n setAction(false);\n startPressTimer();\n }\n }\n\n function handleOnKeyUp(): void {\n setAction(true);\n timerRef.current && clearTimeout(timerRef.current);\n }\n\n function handleOnMouseDown(): void {\n startPressTimer();\n }\n\n function handleOnMouseUp(): void {\n timerRef.current && clearTimeout(timerRef.current);\n }\n\n function handleOnTouchStart(): void {\n startPressTimer();\n }\n\n function handleOnTouchEnd(): void {\n timerRef.current && clearTimeout(timerRef.current);\n }\n\n return {\n handlers: {\n onClick: handleOnClick,\n onMouseDown: handleOnMouseDown,\n onMouseUp: handleOnMouseUp,\n onTouchStart: handleOnTouchStart,\n onTouchEnd: handleOnTouchEnd,\n onKeyDown: handleOnKeyDown,\n onKeyUp: handleOnKeyUp\n }\n };\n}\n"]}
@@ -23,6 +23,7 @@ export declare const DEFAULT_COMPONENT_ICONS: {
23
23
  ControlButtonMicOn: JSX.Element;
24
24
  ControlButtonOptions: JSX.Element;
25
25
  ControlButtonParticipants: JSX.Element;
26
+ ControlButtonParticipantsContextualMenuItem: JSX.Element;
26
27
  ControlButtonScreenShareStart: JSX.Element;
27
28
  ControlButtonScreenShareStop: JSX.Element;
28
29
  CancelFileUpload: JSX.Element;
@@ -59,7 +60,8 @@ export declare const DEFAULT_COMPONENT_ICONS: {
59
60
  ParticipantItemOptions: JSX.Element;
60
61
  ParticipantItemOptionsHovered: JSX.Element;
61
62
  ParticipantItemScreenShareStart: JSX.Element;
62
- HoldCall: JSX.Element;
63
+ HoldCallContextualMenuItem: JSX.Element;
64
+ HoldCallButton: JSX.Element;
63
65
  ResumeCall: JSX.Element;
64
66
  SendBoxSend: JSX.Element;
65
67
  SendBoxSendHovered: JSX.Element;
@@ -7,7 +7,7 @@ import { Backspace20Regular } from '@fluentui/react-icons';
7
7
  /* @conditional-compile-remove(file-sharing) */
8
8
  import { ArrowDownload16Regular } from '@fluentui/react-icons';
9
9
  /* @conditional-compile-remove(PSTN-calls) */
10
- import { Pause20Regular, Play20Regular } from '@fluentui/react-icons';
10
+ import { CallPause20Regular, CallPause20Filled, Play20Regular, People20Regular } from '@fluentui/react-icons';
11
11
  import React from 'react';
12
12
  const WifiWarning16Filled = () => (
13
13
  // All ErrorBar icons are 16px x 16px (when 1rem = 16 px).
@@ -35,6 +35,8 @@ export const DEFAULT_COMPONENT_ICONS = {
35
35
  ControlButtonMicOn: React.createElement(MicOn20Filled, null),
36
36
  ControlButtonOptions: React.createElement(Settings20Filled, null),
37
37
  ControlButtonParticipants: React.createElement(People20Filled, null),
38
+ /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */
39
+ ControlButtonParticipantsContextualMenuItem: React.createElement(People20Regular, null),
38
40
  ControlButtonScreenShareStart: React.createElement(ShareScreenStart20Filled, null),
39
41
  ControlButtonScreenShareStop: React.createElement(ShareScreenStop20Filled, null),
40
42
  /* @conditional-compile-remove(file-sharing) */
@@ -74,7 +76,9 @@ export const DEFAULT_COMPONENT_ICONS = {
74
76
  ParticipantItemOptionsHovered: React.createElement(MoreHorizontal20Filled, null),
75
77
  ParticipantItemScreenShareStart: React.createElement(ShareScreenStart20Filled, null),
76
78
  /* @conditional-compile-remove(PSTN-calls) */
77
- HoldCall: React.createElement(Pause20Regular, null),
79
+ HoldCallContextualMenuItem: React.createElement(CallPause20Regular, null),
80
+ /* @conditional-compile-remove(PSTN-calls) */
81
+ HoldCallButton: React.createElement(CallPause20Filled, null),
78
82
  /* @conditional-compile-remove(PSTN-calls) */
79
83
  ResumeCall: React.createElement(Play20Regular, null),
80
84
  SendBoxSend: React.createElement(Send20Regular, null),
@@ -1 +1 @@
1
- {"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../../../../react-components/src/theming/icons.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,cAAc,EACd,aAAa,EACb,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oBAAC,uBAAuB,OAAG;IAC1C,WAAW,EAAE,oBAAC,gBAAgB,OAAG;IACjC,cAAc,EAAE,oBAAC,eAAe,OAAG;IACnC,aAAa,EAAE,oBAAC,cAAc,OAAG;IACjC,UAAU,EAAE,oBAAC,cAAc,OAAG;IAC9B,cAAc,EAAE,oBAAC,iBAAiB,OAAG;IACrC,qBAAqB,EAAE,oBAAC,eAAe,OAAG;IAC1C,sBAAsB,EAAE,oBAAC,uBAAuB,OAAG;IACnD,6BAA6B,EAAE,oBAAC,sBAAsB,OAAG;IACzD,+BAA+B,EAAE,oBAAC,wBAAwB,OAAG;IAC7D,6CAA6C;IAC7C,QAAQ,EAAE,oBAAC,cAAc,OAAG;IAC5B,6CAA6C;IAC7C,UAAU,EAAE,oBAAC,aAAa,OAAG;IAC7B,WAAW,EAAE,oBAAC,aAAa,OAAG;IAC9B,kBAAkB,EAAE,oBAAC,YAAY,OAAG;IACpC,eAAe,EAAE,oBAAC,cAAc,OAAG;IACnC,0CAA0C,CAAC,6CAA6C;IACxF,SAAS,EAAE,oBAAC,kBAAkB,OAAG;CAClC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles } from '@fluentui/react';\nimport {\n ArrowClockwise16Regular,\n CallEnd20Filled,\n Checkmark20Regular,\n CheckmarkCircle16Regular,\n Circle16Regular,\n Delete20Regular,\n Dismiss20Regular,\n Dismiss16Regular,\n Edit20Regular,\n ErrorCircle16Regular,\n EyeShow16Regular,\n MicOff16Filled,\n MicOff16Regular,\n MicOff20Filled,\n MicOn16Filled,\n MicOn20Filled,\n MicOn20Regular,\n MoreHorizontal20Filled,\n MoreHorizontal20Regular,\n People20Filled,\n Settings20Filled,\n Send20Filled,\n Send20Regular,\n ShareScreenStart20Filled,\n ShareScreenStop20Filled,\n Speaker220Regular,\n Video16Filled,\n Video20Filled,\n Video20Regular,\n VideoOff20Filled,\n ChevronLeft20Regular,\n ChevronRight20Regular,\n WifiWarning20Filled,\n SpeakerMute16Filled,\n MicProhibited16Filled,\n VideoProhibited16Filled\n} from '@fluentui/react-icons';\n\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nimport { Backspace20Regular } from '@fluentui/react-icons';\n\n/* @conditional-compile-remove(file-sharing) */\nimport { ArrowDownload16Regular } from '@fluentui/react-icons';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { Pause20Regular, Play20Regular } from '@fluentui/react-icons';\n\nimport React from 'react';\n\n/**\n * Icons used by the React components exported from this library.\n *\n * @remark See {@link CompositeIcons} for icons used by composites only.\n *\n * @public\n */\nexport type ComponentIcons = Record<keyof typeof DEFAULT_COMPONENT_ICONS, JSX.Element>;\n\nconst WifiWarning16Filled = (): JSX.Element => (\n // All ErrorBar icons are 16px x 16px (when 1rem = 16 px).\n // There is no 16px version of this icon in the fluent icon package, so scale the larger\n // one down to required size.\n <div className={mergeStyles({ transform: 'scale(0.8)' })}>\n <WifiWarning20Filled />\n </div>\n);\n\nconst MoreHorizontal18Regular = (): JSX.Element => (\n // MoreHorizontal icons are 16px x 16px or 20px x 20px so scaling to get desired size\n <div className={mergeStyles({ transform: 'scale(0.9)' })}>\n <MoreHorizontal20Regular />\n </div>\n);\n\n/**\n * The default set of icons that are available to use in the UI components.\n *\n * @remark Icons used only in the composites are available in {@link DEFAULT_COMPOSITE_ICONS}.\n *\n * @public\n */\nexport const DEFAULT_COMPONENT_ICONS = {\n ChatMessageOptions: <MoreHorizontal18Regular />,\n ControlButtonCameraOff: <VideoOff20Filled />,\n ControlButtonCameraOn: <Video20Filled />,\n ControlButtonEndCall: <CallEnd20Filled />,\n ControlButtonMicOff: <MicOff20Filled />,\n ControlButtonMicOn: <MicOn20Filled />,\n ControlButtonOptions: <Settings20Filled />,\n ControlButtonParticipants: <People20Filled />,\n ControlButtonScreenShareStart: <ShareScreenStart20Filled />,\n ControlButtonScreenShareStop: <ShareScreenStop20Filled />,\n /* @conditional-compile-remove(file-sharing) */\n CancelFileUpload: <Dismiss16Regular />,\n /* @conditional-compile-remove(file-sharing) */\n DownloadFile: <ArrowDownload16Regular />,\n EditBoxCancel: <Dismiss20Regular />,\n EditBoxSubmit: <Checkmark20Regular />,\n ErrorBarCallCameraAccessDenied: <VideoProhibited16Filled />,\n ErrorBarCallCameraAlreadyInUse: <VideoProhibited16Filled />,\n ErrorBarCallLocalVideoFreeze: <WifiWarning16Filled />,\n ErrorBarCallMacOsCameraAccessDenied: <VideoProhibited16Filled />,\n ErrorBarCallMacOsMicrophoneAccessDenied: <MicProhibited16Filled />,\n ErrorBarCallMicrophoneAccessDenied: <MicProhibited16Filled />,\n ErrorBarCallMicrophoneMutedBySystem: <MicOff16Filled />,\n ErrorBarCallMicrophoneUnmutedBySystem: <MicOn16Filled />,\n ErrorBarCallNetworkQualityLow: <WifiWarning16Filled />,\n ErrorBarCallNoMicrophoneFound: <MicProhibited16Filled />,\n ErrorBarCallNoSpeakerFound: <SpeakerMute16Filled />,\n ErrorBarClear: <Dismiss16Regular />,\n ErrorBarCallVideoRecoveredBySystem: <Video16Filled />,\n ErrorBarCallVideoStoppedBySystem: <VideoProhibited16Filled />,\n HorizontalGalleryLeftButton: <ChevronLeft20Regular />,\n HorizontalGalleryRightButton: <ChevronRight20Regular />,\n MessageDelivered: <CheckmarkCircle16Regular />,\n MessageEdit: <Edit20Regular />,\n MessageFailed: <ErrorCircle16Regular />,\n MessageRemove: <Delete20Regular />,\n MessageResend: <ArrowClockwise16Regular />,\n MessageSeen: <EyeShow16Regular />,\n MessageSending: <Circle16Regular />,\n OptionsCamera: <Video20Regular />,\n OptionsMic: <MicOn20Regular />,\n OptionsSpeaker: <Speaker220Regular />,\n ParticipantItemMicOff: <MicOff16Regular />,\n ParticipantItemOptions: <MoreHorizontal20Regular />,\n ParticipantItemOptionsHovered: <MoreHorizontal20Filled />,\n ParticipantItemScreenShareStart: <ShareScreenStart20Filled />,\n /* @conditional-compile-remove(PSTN-calls) */\n HoldCall: <Pause20Regular />,\n /* @conditional-compile-remove(PSTN-calls) */\n ResumeCall: <Play20Regular />,\n SendBoxSend: <Send20Regular />,\n SendBoxSendHovered: <Send20Filled />,\n VideoTileMicOff: <MicOff16Filled />,\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n BackSpace: <Backspace20Regular />\n};\n"]}
1
+ {"version":3,"file":"icons.js","sourceRoot":"","sources":["../../../../../../react-components/src/theming/icons.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EACL,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,cAAc,EACd,aAAa,EACb,aAAa,EACb,cAAc,EACd,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,aAAa,EACb,wBAAwB,EACxB,uBAAuB,EACvB,iBAAiB,EACjB,aAAa,EACb,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACrB,uBAAuB,EACxB,MAAM,uBAAuB,CAAC;AAE/B,0CAA0C,CAAC,6CAA6C;AACxF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,+CAA+C;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,6CAA6C;AAC7C,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE9G,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,MAAM,mBAAmB,GAAG,GAAgB,EAAE,CAAC;AAC7C,0DA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B,WAAW,EAAE,oBAAC,aAAa,OAAG;IAC9B,kBAAkB,EAAE,oBAAC,YAAY,OAAG;IACpC,eAAe,EAAE,oBAAC,cAAc,OAAG;IACnC,0CAA0C,CAAC,6CAA6C;IACxF,SAAS,EAAE,oBAAC,kBAAkB,OAAG;CAClC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles } from '@fluentui/react';\nimport {\n ArrowClockwise16Regular,\n CallEnd20Filled,\n Checkmark20Regular,\n CheckmarkCircle16Regular,\n Circle16Regular,\n Delete20Regular,\n Dismiss20Regular,\n Dismiss16Regular,\n Edit20Regular,\n ErrorCircle16Regular,\n EyeShow16Regular,\n MicOff16Filled,\n MicOff16Regular,\n MicOff20Filled,\n MicOn16Filled,\n MicOn20Filled,\n MicOn20Regular,\n MoreHorizontal20Filled,\n MoreHorizontal20Regular,\n People20Filled,\n Settings20Filled,\n Send20Filled,\n Send20Regular,\n ShareScreenStart20Filled,\n ShareScreenStop20Filled,\n Speaker220Regular,\n Video16Filled,\n Video20Filled,\n Video20Regular,\n VideoOff20Filled,\n ChevronLeft20Regular,\n ChevronRight20Regular,\n WifiWarning20Filled,\n SpeakerMute16Filled,\n MicProhibited16Filled,\n VideoProhibited16Filled\n} from '@fluentui/react-icons';\n\n/* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\nimport { Backspace20Regular } from '@fluentui/react-icons';\n\n/* @conditional-compile-remove(file-sharing) */\nimport { ArrowDownload16Regular } from '@fluentui/react-icons';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CallPause20Regular, CallPause20Filled, Play20Regular, People20Regular } from '@fluentui/react-icons';\n\nimport React from 'react';\n\n/**\n * Icons used by the React components exported from this library.\n *\n * @remark See {@link CompositeIcons} for icons used by composites only.\n *\n * @public\n */\nexport type ComponentIcons = Record<keyof typeof DEFAULT_COMPONENT_ICONS, JSX.Element>;\n\nconst WifiWarning16Filled = (): JSX.Element => (\n // All ErrorBar icons are 16px x 16px (when 1rem = 16 px).\n // There is no 16px version of this icon in the fluent icon package, so scale the larger\n // one down to required size.\n <div className={mergeStyles({ transform: 'scale(0.8)' })}>\n <WifiWarning20Filled />\n </div>\n);\n\nconst MoreHorizontal18Regular = (): JSX.Element => (\n // MoreHorizontal icons are 16px x 16px or 20px x 20px so scaling to get desired size\n <div className={mergeStyles({ transform: 'scale(0.9)' })}>\n <MoreHorizontal20Regular />\n </div>\n);\n\n/**\n * The default set of icons that are available to use in the UI components.\n *\n * @remark Icons used only in the composites are available in {@link DEFAULT_COMPOSITE_ICONS}.\n *\n * @public\n */\nexport const DEFAULT_COMPONENT_ICONS = {\n ChatMessageOptions: <MoreHorizontal18Regular />,\n ControlButtonCameraOff: <VideoOff20Filled />,\n ControlButtonCameraOn: <Video20Filled />,\n ControlButtonEndCall: <CallEnd20Filled />,\n ControlButtonMicOff: <MicOff20Filled />,\n ControlButtonMicOn: <MicOn20Filled />,\n ControlButtonOptions: <Settings20Filled />,\n ControlButtonParticipants: <People20Filled />,\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n ControlButtonParticipantsContextualMenuItem: <People20Regular />,\n ControlButtonScreenShareStart: <ShareScreenStart20Filled />,\n ControlButtonScreenShareStop: <ShareScreenStop20Filled />,\n /* @conditional-compile-remove(file-sharing) */\n CancelFileUpload: <Dismiss16Regular />,\n /* @conditional-compile-remove(file-sharing) */\n DownloadFile: <ArrowDownload16Regular />,\n EditBoxCancel: <Dismiss20Regular />,\n EditBoxSubmit: <Checkmark20Regular />,\n ErrorBarCallCameraAccessDenied: <VideoProhibited16Filled />,\n ErrorBarCallCameraAlreadyInUse: <VideoProhibited16Filled />,\n ErrorBarCallLocalVideoFreeze: <WifiWarning16Filled />,\n ErrorBarCallMacOsCameraAccessDenied: <VideoProhibited16Filled />,\n ErrorBarCallMacOsMicrophoneAccessDenied: <MicProhibited16Filled />,\n ErrorBarCallMicrophoneAccessDenied: <MicProhibited16Filled />,\n ErrorBarCallMicrophoneMutedBySystem: <MicOff16Filled />,\n ErrorBarCallMicrophoneUnmutedBySystem: <MicOn16Filled />,\n ErrorBarCallNetworkQualityLow: <WifiWarning16Filled />,\n ErrorBarCallNoMicrophoneFound: <MicProhibited16Filled />,\n ErrorBarCallNoSpeakerFound: <SpeakerMute16Filled />,\n ErrorBarClear: <Dismiss16Regular />,\n ErrorBarCallVideoRecoveredBySystem: <Video16Filled />,\n ErrorBarCallVideoStoppedBySystem: <VideoProhibited16Filled />,\n HorizontalGalleryLeftButton: <ChevronLeft20Regular />,\n HorizontalGalleryRightButton: <ChevronRight20Regular />,\n MessageDelivered: <CheckmarkCircle16Regular />,\n MessageEdit: <Edit20Regular />,\n MessageFailed: <ErrorCircle16Regular />,\n MessageRemove: <Delete20Regular />,\n MessageResend: <ArrowClockwise16Regular />,\n MessageSeen: <EyeShow16Regular />,\n MessageSending: <Circle16Regular />,\n OptionsCamera: <Video20Regular />,\n OptionsMic: <MicOn20Regular />,\n OptionsSpeaker: <Speaker220Regular />,\n ParticipantItemMicOff: <MicOff16Regular />,\n ParticipantItemOptions: <MoreHorizontal20Regular />,\n ParticipantItemOptionsHovered: <MoreHorizontal20Filled />,\n ParticipantItemScreenShareStart: <ShareScreenStart20Filled />,\n /* @conditional-compile-remove(PSTN-calls) */\n HoldCallContextualMenuItem: <CallPause20Regular />,\n /* @conditional-compile-remove(PSTN-calls) */\n HoldCallButton: <CallPause20Filled />,\n /* @conditional-compile-remove(PSTN-calls) */\n ResumeCall: <Play20Regular />,\n SendBoxSend: <Send20Regular />,\n SendBoxSendHovered: <Send20Filled />,\n VideoTileMicOff: <MicOff16Filled />,\n /* @conditional-compile-remove(dialpad) */ /* @conditional-compile-remove(PSTN-calls) */\n BackSpace: <Backspace20Regular />\n};\n"]}
@@ -238,10 +238,18 @@ export interface CallCompositeStrings {
238
238
  * Label for the resume call button on the hold pane
239
239
  */
240
240
  resumeCallButtonLabel: string;
241
+ /**
242
+ * Label for the resume call button on the hold pane when call is resuming
243
+ */
244
+ resumingCallButtonLabel: string;
241
245
  /**
242
246
  * Aria label for the resume call button on the hold pane
243
247
  */
244
248
  resumeCallButtonAriaLabel: string;
249
+ /**
250
+ * Aria label for the resume call button on the hold pane when call is resuming
251
+ */
252
+ resumingCallButtonAriaLabel: string;
245
253
  /**
246
254
  * Label for the hold pane
247
255
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Strings.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/Strings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Strings used by the {@link CallComposite} directly.\n *\n * This strings are in addition to those used by the components from the component library.\n *\n * @public\n */\nexport interface CallCompositeStrings {\n /**\n * Title of configuration page.\n */\n configurationPageTitle: string;\n /**\n * Optional 1-2 lines on the call details used on the configuration page.\n */\n configurationPageCallDetails?: string;\n /**\n * Text in button to start call in configuration page.\n */\n startCallButtonLabel: string;\n /**\n * Text in button to rejoin an ended call.\n */\n rejoinCallButtonLabel: string;\n /**\n * Placeholder text for local device settings dropdowns.\n */\n defaultPlaceHolder: string;\n /**\n * Label for camera dropdown.\n */\n cameraLabel: string;\n /**\n * Label for sound dropdown.\n */\n soundLabel: string;\n /**\n * Error shown when camera access is blocked by the browser.\n */\n cameraPermissionDenied: string;\n /**\n * Error shown when the camera is turned off.\n */\n cameraTurnedOff: string;\n /**\n * Error shown when microphone access is blocked by the browser.\n */\n microphonePermissionDenied: string;\n /**\n * Title text of the page shown to the user when joining a Teams meeting fails because meeting owner denied access.\n */\n failedToJoinTeamsMeetingReasonAccessDeniedTitle: string;\n /**\n * More details text of the page shown to the user when joining a Teams meeting fails because meeting owner denied access.\n */\n failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails?: string;\n /**\n * Title text of the page shown to the user when joining a call fails due to a network problem.\n */\n failedToJoinCallDueToNoNetworkTitle: string;\n /**\n * More details text of the page shown to the user when joining a call fails due to a network problem.\n */\n failedToJoinCallDueToNoNetworkMoreDetails?: string;\n /**\n * Title text of the page shown to the user when they leave a call in the call composite.\n */\n leftCallTitle: string;\n /**\n * More details text of the page shown to the user when they leave a call in the call composite.\n */\n leftCallMoreDetails?: string;\n /**\n * Title text of the page shown to the user when they are removed from a call in the call composite.\n */\n removedFromCallTitle: string;\n /**\n * More details text of the page shown to the user when they are removed from a call in the call composite.\n */\n removedFromCallMoreDetails?: string;\n /**\n * Text shown to the user on the lobby screen when connecting to a call.\n */\n lobbyScreenConnectingToCallTitle: string;\n /**\n * Optional addition details shown to the user on the lobby screen when connection to a call.\n */\n lobbyScreenConnectingToCallMoreDetails?: string;\n /**\n * Text shown to the user on the lobby screen when waiting to be admitted to a call.\n */\n lobbyScreenWaitingToBeAdmittedTitle: string;\n /**\n * Optional additional details shown to the user on the lobby screen when waiting to be admitted to a call.\n */\n lobbyScreenWaitingToBeAdmittedMoreDetails?: string;\n /**\n * Message shown to the user when they are speaking while muted.\n */\n mutedMessage: string;\n /**\n * Text for link to MS privacy policy in Compliance Banner.\n */\n privacyPolicy: string;\n /**\n * Text for link to learn more about a specific subject.\n */\n learnMore: string;\n /**\n * Message to let user know the meeting is only being recorded (no transcription) in ComplianceBanner.\n */\n complianceBannerNowOnlyRecording: string;\n /**\n * Message to let user know the meeting is only being transcripted (no recording) in ComplianceBanner.\n */\n complianceBannerNowOnlyTranscription: string;\n /**\n * Message to let user know recording and transcription of the meeting are saved in ComplianceBanner.\n */\n complianceBannerRecordingAndTranscriptionSaved: string;\n /**\n * Message to let user know recording and transcription of the meeting have started in ComplianceBanner.\n */\n complianceBannerRecordingAndTranscriptionStarted: string;\n /**\n * Message to let user know recording and transcription of the meeting have stopped in ComplianceBanner.\n */\n complianceBannerRecordingAndTranscriptionStopped: string;\n /**\n * Message to let user know recording of the meeting is being saved in ComplianceBanner.\n */\n complianceBannerRecordingSaving: string;\n /**\n * Message to let user know recording of the meeting has started in ComplianceBanner.\n */\n complianceBannerRecordingStarted: string;\n /**\n * Message to let user know recording of the meeting has stopped in ComplianceBanner.\n */\n complianceBannerRecordingStopped: string;\n /**\n * Message to let user know they are giving consent to meeting being transcripted in ComplianceBanner.\n */\n complianceBannerTranscriptionConsent: string;\n /**\n * Message to let user know transcription of the meeting is being saved in ComplianceBanner.\n */\n complianceBannerTranscriptionSaving: string;\n /**\n * Message to let user know transcription of the meeting has started in ComplianceBanner.\n */\n complianceBannerTranscriptionStarted: string;\n /**\n * Message to let user know the transcription of the meeting has stopped in ComplianceBanner.\n */\n complianceBannerTranscriptionStopped: string;\n /**\n * Text for close button.\n */\n close: string;\n /**\n * Title text of the page shown to the user when there is intermittent network failure during a call.\n */\n networkReconnectTitle: string;\n /**\n * More details text of the page shown to the user when there is intermittent network failure during a call.\n */\n networkReconnectMoreDetails: string;\n /**\n * Tooltip text used to inform a user that toggling microphone in lobby is not supported.\n */\n microphoneToggleInLobbyNotAllowed: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Side pane People section Title.\n */\n peoplePaneTitle: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Aria label string for return to call back button\n */\n returnToCallButtonAriaLabel?: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Aria Description string for return to call button\n */\n returnToCallButtonAriaDescription?: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * control bar People button label\n */\n peopleButtonLabel: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * control bar Chat button label.\n */\n chatButtonLabel: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for SidePaneHeader dismiss button\n */\n dismissSidePaneButtonLabel?: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Side pane People section subheader.\n */\n peoplePaneSubTitle: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for button to copy invite link\n */\n copyInviteLinkButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to open dialpad\n */\n openDialpadButtonLabel: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for menu item to remove participant\n */\n removeMenuLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for add people dropdown\n */\n peoplePaneAddPeopleButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to start a call\n */\n dialpadStartCallButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Title for dialpad Modal\n */\n dialpadModalTitle: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Label for dialpad Modal\n */\n dialpadModalAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Label for dialpad Modal close button\n */\n dialpadCloseModalButtonAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * label for more button in the Calling composite\n */\n moreButtonCallingLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for the resume call button on the hold pane\n */\n resumeCallButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Aria label for the resume call button on the hold pane\n */\n resumeCallButtonAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for the hold pane\n */\n holdScreenLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Placeholder text for dtmf dialpad\n */\n dtmfDialpadPlaceHolderText: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for the button to open dtmf dialpad\n */\n openDtmfDialpadLabel: string;\n}\n"]}
1
+ {"version":3,"file":"Strings.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/Strings.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\n/**\n * Strings used by the {@link CallComposite} directly.\n *\n * This strings are in addition to those used by the components from the component library.\n *\n * @public\n */\nexport interface CallCompositeStrings {\n /**\n * Title of configuration page.\n */\n configurationPageTitle: string;\n /**\n * Optional 1-2 lines on the call details used on the configuration page.\n */\n configurationPageCallDetails?: string;\n /**\n * Text in button to start call in configuration page.\n */\n startCallButtonLabel: string;\n /**\n * Text in button to rejoin an ended call.\n */\n rejoinCallButtonLabel: string;\n /**\n * Placeholder text for local device settings dropdowns.\n */\n defaultPlaceHolder: string;\n /**\n * Label for camera dropdown.\n */\n cameraLabel: string;\n /**\n * Label for sound dropdown.\n */\n soundLabel: string;\n /**\n * Error shown when camera access is blocked by the browser.\n */\n cameraPermissionDenied: string;\n /**\n * Error shown when the camera is turned off.\n */\n cameraTurnedOff: string;\n /**\n * Error shown when microphone access is blocked by the browser.\n */\n microphonePermissionDenied: string;\n /**\n * Title text of the page shown to the user when joining a Teams meeting fails because meeting owner denied access.\n */\n failedToJoinTeamsMeetingReasonAccessDeniedTitle: string;\n /**\n * More details text of the page shown to the user when joining a Teams meeting fails because meeting owner denied access.\n */\n failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails?: string;\n /**\n * Title text of the page shown to the user when joining a call fails due to a network problem.\n */\n failedToJoinCallDueToNoNetworkTitle: string;\n /**\n * More details text of the page shown to the user when joining a call fails due to a network problem.\n */\n failedToJoinCallDueToNoNetworkMoreDetails?: string;\n /**\n * Title text of the page shown to the user when they leave a call in the call composite.\n */\n leftCallTitle: string;\n /**\n * More details text of the page shown to the user when they leave a call in the call composite.\n */\n leftCallMoreDetails?: string;\n /**\n * Title text of the page shown to the user when they are removed from a call in the call composite.\n */\n removedFromCallTitle: string;\n /**\n * More details text of the page shown to the user when they are removed from a call in the call composite.\n */\n removedFromCallMoreDetails?: string;\n /**\n * Text shown to the user on the lobby screen when connecting to a call.\n */\n lobbyScreenConnectingToCallTitle: string;\n /**\n * Optional addition details shown to the user on the lobby screen when connection to a call.\n */\n lobbyScreenConnectingToCallMoreDetails?: string;\n /**\n * Text shown to the user on the lobby screen when waiting to be admitted to a call.\n */\n lobbyScreenWaitingToBeAdmittedTitle: string;\n /**\n * Optional additional details shown to the user on the lobby screen when waiting to be admitted to a call.\n */\n lobbyScreenWaitingToBeAdmittedMoreDetails?: string;\n /**\n * Message shown to the user when they are speaking while muted.\n */\n mutedMessage: string;\n /**\n * Text for link to MS privacy policy in Compliance Banner.\n */\n privacyPolicy: string;\n /**\n * Text for link to learn more about a specific subject.\n */\n learnMore: string;\n /**\n * Message to let user know the meeting is only being recorded (no transcription) in ComplianceBanner.\n */\n complianceBannerNowOnlyRecording: string;\n /**\n * Message to let user know the meeting is only being transcripted (no recording) in ComplianceBanner.\n */\n complianceBannerNowOnlyTranscription: string;\n /**\n * Message to let user know recording and transcription of the meeting are saved in ComplianceBanner.\n */\n complianceBannerRecordingAndTranscriptionSaved: string;\n /**\n * Message to let user know recording and transcription of the meeting have started in ComplianceBanner.\n */\n complianceBannerRecordingAndTranscriptionStarted: string;\n /**\n * Message to let user know recording and transcription of the meeting have stopped in ComplianceBanner.\n */\n complianceBannerRecordingAndTranscriptionStopped: string;\n /**\n * Message to let user know recording of the meeting is being saved in ComplianceBanner.\n */\n complianceBannerRecordingSaving: string;\n /**\n * Message to let user know recording of the meeting has started in ComplianceBanner.\n */\n complianceBannerRecordingStarted: string;\n /**\n * Message to let user know recording of the meeting has stopped in ComplianceBanner.\n */\n complianceBannerRecordingStopped: string;\n /**\n * Message to let user know they are giving consent to meeting being transcripted in ComplianceBanner.\n */\n complianceBannerTranscriptionConsent: string;\n /**\n * Message to let user know transcription of the meeting is being saved in ComplianceBanner.\n */\n complianceBannerTranscriptionSaving: string;\n /**\n * Message to let user know transcription of the meeting has started in ComplianceBanner.\n */\n complianceBannerTranscriptionStarted: string;\n /**\n * Message to let user know the transcription of the meeting has stopped in ComplianceBanner.\n */\n complianceBannerTranscriptionStopped: string;\n /**\n * Text for close button.\n */\n close: string;\n /**\n * Title text of the page shown to the user when there is intermittent network failure during a call.\n */\n networkReconnectTitle: string;\n /**\n * More details text of the page shown to the user when there is intermittent network failure during a call.\n */\n networkReconnectMoreDetails: string;\n /**\n * Tooltip text used to inform a user that toggling microphone in lobby is not supported.\n */\n microphoneToggleInLobbyNotAllowed: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Side pane People section Title.\n */\n peoplePaneTitle: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Aria label string for return to call back button\n */\n returnToCallButtonAriaLabel?: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Aria Description string for return to call button\n */\n returnToCallButtonAriaDescription?: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * control bar People button label\n */\n peopleButtonLabel: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * control bar Chat button label.\n */\n chatButtonLabel: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for SidePaneHeader dismiss button\n */\n dismissSidePaneButtonLabel?: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Side pane People section subheader.\n */\n peoplePaneSubTitle: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for button to copy invite link\n */\n copyInviteLinkButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to open dialpad\n */\n openDialpadButtonLabel: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for menu item to remove participant\n */\n removeMenuLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for add people dropdown\n */\n peoplePaneAddPeopleButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for button to start a call\n */\n dialpadStartCallButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Title for dialpad Modal\n */\n dialpadModalTitle: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Label for dialpad Modal\n */\n dialpadModalAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Aria Label for dialpad Modal close button\n */\n dialpadCloseModalButtonAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * label for more button in the Calling composite\n */\n moreButtonCallingLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for the resume call button on the hold pane\n */\n resumeCallButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for the resume call button on the hold pane when call is resuming\n */\n resumingCallButtonLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Aria label for the resume call button on the hold pane\n */\n resumeCallButtonAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Aria label for the resume call button on the hold pane when call is resuming\n */\n resumingCallButtonAriaLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n /**\n * Label for the hold pane\n */\n holdScreenLabel: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Placeholder text for dtmf dialpad\n */\n dtmfDialpadPlaceHolderText: string;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Label for the button to open dtmf dialpad\n */\n openDtmfDialpadLabel: string;\n}\n"]}
@@ -246,7 +246,7 @@ export class AzureCommunicationCallAdapter {
246
246
  });
247
247
  }
248
248
  _joinCall(audioOptions, videoOptions) {
249
- const isTeamsMeeting = 'teamsLink' in this.locator;
249
+ const isTeamsMeeting = 'meetingLink' in this.locator;
250
250
  /* @conditional-compile-remove(rooms) */
251
251
  const isRoomsCall = 'roomId' in this.locator;
252
252
  if (isTeamsMeeting) {
@@ -1 +1 @@
1
- {"version":3,"file":"AzureCommunicationCallAdapter.js","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;QACX,OAAO;QACP,MAAM;KACP,CACF,CAAC;IAEF,4DAA4D;IAC5D,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,GAAG,EAAE;YACV,CAAC,GAAS,EAAE;gBACV,IAAI,UAAU,CAAC,OAAO,EAAE;oBACtB,IAAI,gBAAgB,CAAC,OAAO,EAAE;wBAC5B,MAAM,gBAAgB,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;qBACpD;oBACD,UAAU,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;oBAC7B,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC;iBAChC;YACH,CAAC,CAAA,CAAC,EAAE,CAAC;QACP,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,6CAA6C,GAAG,CAC3D,UAA8B,EAC9B,SAAoB,EACpB,OAA2B,EACL,EAAE;IACxB,MAAM,aAAa,GAAG,CAAC,MAAM,UAAU,CAAC,gBAAgB,EAAE,CAA0B,CAAC;IACrF,OAAO,IAAI,6BAA6B,CAAC,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;AAC1F,CAAC,CAAA,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,CAAQ,EAAkB,EAAE;IAC/C,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,SAAS,IAAI,CAAC,CAAC,YAAY,CAAC,KAAK,SAAS,CAAC;AACpE,CAAC,CAAC;AAEF,mDAAmD;AACnD,6CAA6C;AAC7C,MAAM,cAAc,GAAG,CAAC,WAA+B,EAA0C,EAAE;IACjG,OAAO,gBAAgB,IAAI,WAAW,CAAC;AACzC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n CallingHandlers,\n createDefaultCallingHandlers,\n _isInCall,\n _isInLobbyOrConnecting\n} from '@internal/calling-component-bindings';\nimport {\n CallClientState,\n CallError,\n CallState,\n createStatefulCallClient,\n StatefulCallClient,\n StatefulDeviceManager\n} from '@internal/calling-stateful-client';\nimport {\n AudioOptions,\n CallAgent,\n Call,\n GroupCallLocator,\n TeamsMeetingLinkLocator,\n LocalVideoStream as SDKLocalVideoStream,\n AudioDeviceInfo,\n VideoDeviceInfo,\n RemoteParticipant,\n PermissionConstraints,\n PropertyChangedEvent,\n StartCallOptions,\n VideoOptions\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(rooms) */\nimport { RoomCallLocator } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions, DtmfTone } from '@azure/communication-calling';\nimport { EventEmitter } from 'events';\nimport {\n CallAdapter,\n CallEndedListener,\n CallIdChangedListener,\n CallAdapterState,\n DisplayNameChangedListener,\n IsMutedChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsSpeakingChangedListener,\n ParticipantsJoinedListener,\n ParticipantsLeftListener,\n DiagnosticChangedEventListner,\n CallAdapterCallEndedEvent\n} from './CallAdapter';\nimport { getCallCompositePage, IsCallEndedPage, isCameraOn } from '../utils';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\nimport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CommunicationTokenCredential,\n CommunicationUserIdentifier,\n isCommunicationUserIdentifier,\n isPhoneNumberIdentifier,\n UnknownIdentifier,\n PhoneNumberIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CommunicationIdentifier } from '@azure/communication-common';\nimport { ParticipantSubscriber } from './ParticipantSubcriber';\nimport { AdapterError } from '../../common/adapters';\nimport { DiagnosticsForwarder } from './DiagnosticsForwarder';\nimport { useEffect, useRef, useState } from 'react';\n\n/** Context of call, which is a centralized context for all state updates */\nclass CallContext {\n private emitter: EventEmitter = new EventEmitter();\n private state: CallAdapterState;\n private callId: string | undefined;\n\n constructor(clientState: CallClientState, isTeamsCall: boolean) {\n this.state = {\n isLocalPreviewMicrophoneEnabled: false,\n userId: clientState.userId,\n displayName: clientState.callAgent?.displayName,\n devices: clientState.deviceManager,\n call: undefined,\n page: 'configuration',\n latestErrors: clientState.latestErrors,\n isTeamsCall,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId: clientState.alternateCallerId\n };\n }\n\n public onStateChange(handler: (_uiState: CallAdapterState) => void): void {\n this.emitter.on('stateChanged', handler);\n }\n\n public offStateChange(handler: (_uiState: CallAdapterState) => void): void {\n this.emitter.off('stateChanged', handler);\n }\n\n public setState(state: CallAdapterState): void {\n this.state = state;\n this.emitter.emit('stateChanged', this.state);\n }\n\n public getState(): CallAdapterState {\n return this.state;\n }\n\n public setIsLocalMicrophoneEnabled(isLocalPreviewMicrophoneEnabled: boolean): void {\n this.setState({ ...this.state, isLocalPreviewMicrophoneEnabled });\n }\n\n // This is the key to find current call object in client state\n public setCurrentCallId(callId: string | undefined): void {\n this.callId = callId;\n }\n\n public onCallEnded(handler: (callEndedData: CallAdapterCallEndedEvent) => void): void {\n this.emitter.on('callEnded', handler);\n }\n\n public offCallEnded(handler: (callEndedData: CallAdapterCallEndedEvent) => void): void {\n this.emitter.off('callEnded', handler);\n }\n\n public updateClientState(clientState: CallClientState): void {\n const call = this.callId ? clientState.calls[this.callId] : undefined;\n const latestEndedCall = findLatestEndedCall(clientState.callsEnded);\n\n // As the state is transitioning to a new state, trigger appropriate callback events.\n const oldPage = this.state.page;\n const newPage = getCallCompositePage(call, latestEndedCall);\n if (!IsCallEndedPage(oldPage) && IsCallEndedPage(newPage)) {\n this.emitter.emit('callEnded', {\n callId: this.callId,\n callEndedCode: latestEndedCall?.callEndReason?.code,\n callEndedSubCode: latestEndedCall?.callEndReason?.subCode\n });\n }\n\n if (this.state.page) {\n this.setState({\n ...this.state,\n userId: clientState.userId,\n displayName: clientState.callAgent?.displayName,\n call,\n page: newPage,\n endedCall: latestEndedCall,\n devices: clientState.deviceManager,\n latestErrors: clientState.latestErrors\n });\n }\n }\n}\n\nconst findLatestEndedCall = (calls: { [key: string]: CallState }): CallState | undefined => {\n const callStates = Object.values(calls);\n if (callStates.length === 0) {\n return undefined;\n }\n let latestCall = callStates[0];\n for (const call of callStates.slice(1)) {\n if ((call.endTime?.getTime() ?? 0) > (latestCall.endTime?.getTime() ?? 0)) {\n latestCall = call;\n }\n }\n return latestCall;\n};\n\n/**\n * @private\n */\nexport class AzureCommunicationCallAdapter implements CallAdapter {\n private callClient: StatefulCallClient;\n private callAgent: CallAgent;\n private deviceManager: StatefulDeviceManager;\n private localStream: SDKLocalVideoStream | undefined;\n private locator: CallAdapterLocator;\n // Never use directly, even internally. Use `call` property instead.\n private _call?: Call;\n private context: CallContext;\n private diagnosticsForwarder?: DiagnosticsForwarder;\n private handlers: CallingHandlers;\n private participantSubscribers = new Map<string, ParticipantSubscriber>();\n private emitter: EventEmitter = new EventEmitter();\n private onClientStateChange: (clientState: CallClientState) => void;\n\n private get call(): Call | undefined {\n return this._call;\n }\n\n private set call(newCall: Call | undefined) {\n this.resetDiagnosticsForwarder(newCall);\n this._call = newCall;\n }\n\n constructor(\n callClient: StatefulCallClient,\n locator: CallAdapterLocator,\n callAgent: CallAgent,\n deviceManager: StatefulDeviceManager\n ) {\n this.bindPublicMethods();\n this.callClient = callClient;\n this.callAgent = callAgent;\n this.locator = locator;\n this.deviceManager = deviceManager;\n const isTeamsMeeting = 'meetingLink' in this.locator;\n this.context = new CallContext(callClient.getState(), isTeamsMeeting);\n\n this.context.onCallEnded((endCallData) => this.emitter.emit('callEnded', endCallData));\n\n const onStateChange = (clientState: CallClientState): void => {\n // unsubscribe when the instance gets disposed\n if (!this) {\n callClient.offStateChange(onStateChange);\n return;\n }\n\n // `updateClientState` searches for the current call from all the calls in the state using a cached `call.id`\n // from the call object. `call.id` can change during a call. We must update the cached `call.id` before\n // calling `updateClientState` so that we find the correct state object for the call even when `call.id`\n // has changed.\n // https://github.com/Azure/communication-ui-library/pull/1820\n if (this.call?.id) {\n this.context.setCurrentCallId(this.call.id);\n }\n this.context.updateClientState(clientState);\n };\n\n this.handlers = createDefaultCallingHandlers(callClient, callAgent, deviceManager, undefined);\n\n this.onClientStateChange = onStateChange;\n\n this.subscribeDeviceManagerEvents();\n\n this.callClient.onStateChange(onStateChange);\n }\n\n // TODO: update this to include the 'selectedCameraChanged' when calling adds it to the device manager\n private subscribeDeviceManagerEvents(): void {\n this.deviceManager.on('selectedMicrophoneChanged', () => {\n this.emitter.emit('selectedMicrophoneChanged');\n });\n this.deviceManager.on('selectedSpeakerChanged', () => {\n this.emitter.emit('selectedSpeakerChanged');\n });\n }\n\n private bindPublicMethods(): void {\n this.onStateChange.bind(this);\n this.offStateChange.bind(this);\n this.getState.bind(this);\n this.dispose.bind(this);\n this.joinCall.bind(this);\n this.leaveCall.bind(this);\n this.setCamera.bind(this);\n this.setMicrophone.bind(this);\n this.setSpeaker.bind(this);\n this.askDevicePermission.bind(this);\n this.queryCameras.bind(this);\n this.queryMicrophones.bind(this);\n this.querySpeakers.bind(this);\n this.startCamera.bind(this);\n this.stopCamera.bind(this);\n this.mute.bind(this);\n this.unmute.bind(this);\n this.startCall.bind(this);\n this.startScreenShare.bind(this);\n this.stopScreenShare.bind(this);\n this.removeParticipant.bind(this);\n this.createStreamView.bind(this);\n this.disposeStreamView.bind(this);\n this.on.bind(this);\n this.off.bind(this);\n this.processNewCall.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.addParticipant.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.holdCall.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.resumeCall.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.sendDtmfTone.bind(this);\n }\n\n public dispose(): void {\n this.resetDiagnosticsForwarder();\n this.callClient.offStateChange(this.onClientStateChange);\n this.callAgent.dispose();\n }\n\n public async queryCameras(): Promise<VideoDeviceInfo[]> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return this.deviceManager.getCameras();\n });\n }\n\n public async queryMicrophones(): Promise<AudioDeviceInfo[]> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return this.deviceManager.getMicrophones();\n });\n }\n\n public async querySpeakers(): Promise<AudioDeviceInfo[]> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return this.deviceManager.isSpeakerSelectionAvailable ? this.deviceManager.getSpeakers() : [];\n });\n }\n\n public async askDevicePermission(constrain: PermissionConstraints): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.deviceManager.askDevicePermission(constrain);\n });\n }\n\n public joinCall(microphoneOn?: boolean): Call | undefined {\n if (_isInCall(this.getState().call?.state ?? 'None')) {\n throw new Error('You are already in the call!');\n }\n\n /* @conditional-compile-remove(teams-adhoc-call) */\n /* @conditional-compile-remove(PSTN-calls) */\n if (isOutboundCall(this.locator)) {\n const phoneNumber = this.getState().alternateCallerId;\n return this.startCall(this.locator.participantIDs, {\n alternateCallerId: phoneNumber ? { phoneNumber: phoneNumber } : undefined\n });\n }\n\n return this.teeErrorToEventEmitter(() => {\n const audioOptions: AudioOptions = { muted: !(microphoneOn ?? this.getState().isLocalPreviewMicrophoneEnabled) };\n // TODO: find a way to expose stream to here\n const videoOptions = { localVideoStreams: this.localStream ? [this.localStream] : undefined };\n\n const call = this._joinCall(audioOptions, videoOptions);\n\n this.processNewCall(call);\n return call;\n });\n }\n\n private _joinCall(audioOptions: AudioOptions, videoOptions: VideoOptions): Call {\n const isTeamsMeeting = 'teamsLink' in this.locator;\n /* @conditional-compile-remove(rooms) */\n const isRoomsCall = 'roomId' in this.locator;\n\n if (isTeamsMeeting) {\n return this.callAgent.join(this.locator as TeamsMeetingLinkLocator, {\n audioOptions,\n videoOptions\n });\n }\n /* @conditional-compile-remove(rooms) */\n if (isRoomsCall) {\n return this.callAgent.join(this.locator as RoomCallLocator, {\n audioOptions,\n videoOptions\n });\n }\n return this.callAgent.join(this.locator as GroupCallLocator, {\n audioOptions,\n videoOptions\n });\n }\n\n public async createStreamView(\n remoteUserId?: string,\n options?: VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> {\n if (remoteUserId === undefined) {\n return await this.handlers.onCreateLocalStreamView(options);\n } else {\n return await this.handlers.onCreateRemoteStreamView(remoteUserId, options);\n }\n }\n\n public async disposeStreamView(remoteUserId?: string): Promise<void> {\n if (remoteUserId === undefined) {\n await this.handlers.onDisposeLocalStreamView();\n } else {\n await this.handlers.onDisposeRemoteStreamView(remoteUserId);\n }\n }\n\n public async leaveCall(): Promise<void> {\n await this.handlers.onHangUp();\n this.unsubscribeCallEvents();\n this.call = undefined;\n this.handlers = createDefaultCallingHandlers(this.callClient, this.callAgent, this.deviceManager, undefined);\n this.context.setCurrentCallId(undefined);\n // Resync state after callId is set\n this.context.updateClientState(this.callClient.getState());\n this.stopCamera();\n this.mute();\n }\n\n public async setCamera(device: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onSelectCamera(device, options);\n });\n }\n\n public async setMicrophone(device: AudioDeviceInfo): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onSelectMicrophone(device);\n });\n }\n\n public async setSpeaker(device: AudioDeviceInfo): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onSelectSpeaker(device);\n });\n }\n\n public async startCamera(options?: VideoStreamOptions): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (!isCameraOn(this.getState())) {\n await this.handlers.onToggleCamera(options);\n }\n });\n }\n\n public async stopCamera(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (isCameraOn(this.getState())) {\n await this.handlers.onToggleCamera();\n }\n });\n }\n\n public async mute(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n this.context.setIsLocalMicrophoneEnabled(false);\n if (_isInCall(this.call?.state) && !this.call?.isMuted) {\n await this.handlers.onToggleMicrophone();\n }\n });\n }\n\n public async unmute(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n this.context.setIsLocalMicrophoneEnabled(true);\n if (_isInCall(this.call?.state) && this.call?.isMuted) {\n await this.handlers.onToggleMicrophone();\n }\n });\n }\n\n public async startScreenShare(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (!this.call?.isScreenSharingOn) {\n await this.handlers.onToggleScreenShare();\n }\n });\n }\n\n public async stopScreenShare(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (this.call?.isScreenSharingOn) {\n await this.handlers.onToggleScreenShare();\n }\n });\n }\n\n public startCall(participants: string[], options?: StartCallOptions): Call | undefined {\n if (_isInCall(this.getState().call?.state ?? 'None')) {\n throw new Error('You are already in the call.');\n }\n\n const idsToAdd = participants.map((participant) => {\n // FIXME: `onStartCall` does not allow a Teams user.\n // Need some way to return an error if a Teams user is provided.\n const backendId = fromFlatCommunicationIdentifier(participant);\n if (isPhoneNumberIdentifier(backendId)) {\n if (options?.alternateCallerId === undefined) {\n throw new Error('unable to start call, PSTN user present with no alternateCallerId.');\n }\n return backendId as PhoneNumberIdentifier;\n } else if (isCommunicationUserIdentifier(backendId)) {\n return backendId as CommunicationUserIdentifier;\n }\n return backendId as UnknownIdentifier;\n });\n\n const call = this.handlers.onStartCall(idsToAdd, options);\n if (!call) {\n throw new Error('Unable to start call.');\n }\n this.processNewCall(call);\n\n return this.call;\n }\n\n private processNewCall(call: Call): void {\n this.call = call;\n this.context.setCurrentCallId(call.id);\n\n // Resync state after callId is set\n this.context.updateClientState(this.callClient.getState());\n this.handlers = createDefaultCallingHandlers(this.callClient, this.callAgent, this.deviceManager, this.call);\n this.subscribeCallEvents();\n }\n\n public async removeParticipant(userId: string): Promise<void> {\n this.handlers.onRemoveParticipant(userId);\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async addParticipant(participant: CommunicationIdentifier, options?: AddPhoneNumberOptions): Promise<void> {\n this.handlers.onAddParticipant(participant, options);\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async holdCall(): Promise<void> {\n if (this.call?.state !== 'LocalHold') {\n this.handlers.onToggleHold();\n }\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async resumeCall(): Promise<void> {\n if (this.call?.state === 'LocalHold') {\n this.handlers.onToggleHold();\n }\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async sendDtmfTone(dtmfTone: DtmfTone): Promise<void> {\n this.handlers.onSendDtmfTone(dtmfTone);\n }\n\n public getState(): CallAdapterState {\n return this.context.getState();\n }\n\n public onStateChange(handler: (state: CallAdapterState) => void): void {\n this.context.onStateChange(handler);\n }\n\n public offStateChange(handler: (state: CallAdapterState) => void): void {\n this.context.offStateChange(handler);\n }\n\n on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n on(event: 'callEnded', listener: CallEndedListener): void;\n on(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n on(event: 'error', errorHandler: (e: AdapterError) => void): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public on(event: string, listener: (e: any) => void): void {\n this.emitter.on(event, listener);\n }\n\n private subscribeCallEvents(): void {\n this.call?.on('remoteParticipantsUpdated', this.onRemoteParticipantsUpdated.bind(this));\n this.call?.on('isMutedChanged', this.isMyMutedChanged.bind(this));\n this.call?.on('isScreenSharingOnChanged', this.isScreenSharingOnChanged.bind(this));\n this.call?.on('idChanged', this.callIdChanged.bind(this));\n }\n\n private unsubscribeCallEvents(): void {\n for (const subscriber of this.participantSubscribers.values()) {\n subscriber.unsubscribeAll();\n }\n this.participantSubscribers.clear();\n this.call?.off('remoteParticipantsUpdated', this.onRemoteParticipantsUpdated.bind(this));\n this.call?.off('isMutedChanged', this.isMyMutedChanged.bind(this));\n this.call?.off('isScreenSharingOnChanged', this.isScreenSharingOnChanged.bind(this));\n this.call?.off('idChanged', this.callIdChanged.bind(this));\n }\n\n private isMyMutedChanged = (): void => {\n this.emitter.emit('isMutedChanged', {\n participantId: this.getState().userId,\n isMuted: this.call?.isMuted\n });\n };\n\n private onRemoteParticipantsUpdated({\n added,\n removed\n }: {\n added: RemoteParticipant[];\n removed: RemoteParticipant[];\n }): void {\n if (added && added.length > 0) {\n this.emitter.emit('participantsJoined', added);\n }\n if (removed && removed.length > 0) {\n this.emitter.emit('participantsLeft', removed);\n }\n\n added.forEach((participant) => {\n this.participantSubscribers.set(\n toFlatCommunicationIdentifier(participant.identifier),\n new ParticipantSubscriber(participant, this.emitter)\n );\n });\n\n removed.forEach((participant) => {\n const subscriber = this.participantSubscribers.get(toFlatCommunicationIdentifier(participant.identifier));\n subscriber && subscriber.unsubscribeAll();\n this.participantSubscribers.delete(toFlatCommunicationIdentifier(participant.identifier));\n });\n }\n\n private isScreenSharingOnChanged(): void {\n this.emitter.emit('isLocalScreenSharingActiveChanged', { isScreenSharingOn: this.call?.isScreenSharingOn });\n }\n\n private callIdChanged(): void {\n this.call?.id && this.emitter.emit('callIdChanged', { callId: this.call.id });\n }\n\n private resetDiagnosticsForwarder(newCall?: Call): void {\n if (this.diagnosticsForwarder) {\n this.diagnosticsForwarder.unsubscribe();\n }\n if (newCall) {\n this.diagnosticsForwarder = new DiagnosticsForwarder(this.emitter, newCall);\n }\n }\n\n off(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n off(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n off(event: 'callEnded', listener: CallEndedListener): void;\n off(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n off(event: 'error', errorHandler: (e: AdapterError) => void): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public off(event: string, listener: (e: any) => void): void {\n this.emitter.off(event, listener);\n }\n\n private async asyncTeeErrorToEventEmitter<T>(f: () => Promise<T>): Promise<T> {\n try {\n return await f();\n } catch (error) {\n if (isCallError(error as Error)) {\n this.emitter.emit('error', error as AdapterError);\n }\n throw error;\n }\n }\n\n private teeErrorToEventEmitter<T>(f: () => T): T {\n try {\n return f();\n } catch (error) {\n if (isCallError(error as Error)) {\n this.emitter.emit('error', error as AdapterError);\n }\n throw error;\n }\n }\n}\n\n/* @conditional-compile-remove(teams-adhoc-call) */\n/* @conditional-compile-remove(PSTN-calls) */\n/**\n * Locator used by {@link createAzureCommunicationCallAdapter} to call one or more participants\n *\n * @remarks\n * This is currently in beta and only supports calling one Teams User.\n *\n * @example\n * ```\n * ['8:orgid:ab220efe-5725-4742-9792-9fba7c9ac458']\n * ```\n *\n * @beta\n */\nexport type CallParticipantsLocator = {\n participantIDs: string[];\n};\n\n/**\n * Locator used by {@link createAzureCommunicationCallAdapter} to locate the call to join\n *\n * @public\n */\nexport type CallAdapterLocator =\n | TeamsMeetingLinkLocator\n | GroupCallLocator\n | /* @conditional-compile-remove(rooms) */ RoomCallLocator\n | /* @conditional-compile-remove(teams-adhoc-call) */ /* @conditional-compile-remove(PSTN-calls) */ CallParticipantsLocator;\n\n/**\n * Arguments for creating the Azure Communication Services implementation of {@link CallAdapter}.\n *\n * Note: `displayName` can be a maximum of 256 characters.\n *\n * @public\n */\nexport type AzureCommunicationCallAdapterArgs = {\n userId: CommunicationUserIdentifier;\n displayName: string;\n credential: CommunicationTokenCredential;\n locator: CallAdapterLocator;\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId?: string;\n};\n\n/**\n * Create a {@link CallAdapter} backed by Azure Communication Services.\n *\n * This is the default implementation of {@link CallAdapter} provided by this library.\n *\n * Note: `displayName` can be a maximum of 256 characters.\n *\n * @public\n */\nexport const createAzureCommunicationCallAdapter = async ({\n userId,\n displayName,\n credential,\n locator,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId\n}: AzureCommunicationCallAdapterArgs): Promise<CallAdapter> => {\n const callClient = createStatefulCallClient({\n userId,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId\n });\n const callAgent = await callClient.createCallAgent(credential, {\n displayName\n });\n const adapter = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, locator);\n return adapter;\n};\n\n/**\n * A custom React hook to simplify the creation of {@link CallAdapter}.\n *\n * Similar to {@link createAzureCommunicationCallAdapter}, but takes care of asynchronous\n * creation of the adapter internally.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n *\n * Note that you must memoize the arguments to avoid recreating adapter on each render.\n * See storybook for typical usage examples.\n *\n * @public\n */\nexport const useAzureCommunicationCallAdapter = (\n /**\n * Arguments to be passed to {@link createAzureCommunicationCallAdapter}.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n */\n args: Partial<AzureCommunicationCallAdapterArgs>,\n /**\n * Optional callback to modify the adapter once it is created.\n *\n * If set, must return the modified adapter.\n */\n afterCreate?: (adapter: CallAdapter) => Promise<CallAdapter>,\n /**\n * Optional callback called before the adapter is disposed.\n *\n * This is useful for clean up tasks, e.g., leaving any ongoing calls.\n */\n beforeDispose?: (adapter: CallAdapter) => Promise<void>\n): CallAdapter | undefined => {\n const { credential, displayName, locator, userId, /*@conditional-compile-remove(PSTN-calls) */ alternateCallerId } =\n args;\n\n // State update needed to rerender the parent component when a new adapter is created.\n const [adapter, setAdapter] = useState<CallAdapter | undefined>(undefined);\n // Ref needed for cleanup to access the old adapter created asynchronously.\n const adapterRef = useRef<CallAdapter | undefined>(undefined);\n\n const afterCreateRef = useRef<((adapter: CallAdapter) => Promise<CallAdapter>) | undefined>(undefined);\n const beforeDisposeRef = useRef<((adapter: CallAdapter) => Promise<void>) | undefined>(undefined);\n // These refs are updated on *each* render, so that the latest values\n // are used in the `useEffect` closures below.\n // Using a Ref ensures that new values for the callbacks do not trigger the\n // useEffect blocks, and a new adapter creation / distruction is not triggered.\n afterCreateRef.current = afterCreate;\n beforeDisposeRef.current = beforeDispose;\n\n useEffect(\n () => {\n if (!credential || !displayName || !locator || !userId) {\n return;\n }\n (async () => {\n if (adapterRef.current) {\n // Dispose the old adapter when a new one is created.\n //\n // This clean up function uses `adapterRef` because `adapter` can not be added to the dependency array of\n // this `useEffect` -- we do not want to trigger a new adapter creation because of the first adapter\n // creation.\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n\n let newAdapter = await createAzureCommunicationCallAdapter({\n credential,\n displayName,\n locator,\n userId,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId\n });\n if (afterCreateRef.current) {\n newAdapter = await afterCreateRef.current(newAdapter);\n }\n adapterRef.current = newAdapter;\n setAdapter(newAdapter);\n })();\n },\n // Explicitly list all arguments so that caller doesn't have to memoize the `args` object.\n [\n adapterRef,\n afterCreateRef,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,\n beforeDisposeRef,\n credential,\n displayName,\n locator,\n userId\n ]\n );\n\n // Dispose any existing adapter when the component unmounts.\n useEffect(() => {\n return () => {\n (async () => {\n if (adapterRef.current) {\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n })();\n };\n }, []);\n\n return adapter;\n};\n\n/**\n * Create a {@link CallAdapter} using the provided {@link StatefulCallClient}.\n *\n * Useful if you want to keep a reference to {@link StatefulCallClient}.\n * Consider using {@link createAzureCommunicationCallAdapter} for a simpler API.\n *\n * @public\n */\nexport const createAzureCommunicationCallAdapterFromClient = async (\n callClient: StatefulCallClient,\n callAgent: CallAgent,\n locator: CallAdapterLocator\n): Promise<CallAdapter> => {\n const deviceManager = (await callClient.getDeviceManager()) as StatefulDeviceManager;\n return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager);\n};\n\nconst isCallError = (e: Error): e is CallError => {\n return e['target'] !== undefined && e['innerError'] !== undefined;\n};\n\n/* @conditional-compile-remove(teams-adhoc-call) */\n/* @conditional-compile-remove(PSTN-calls) */\nconst isOutboundCall = (callLocator: CallAdapterLocator): callLocator is CallParticipantsLocator => {\n return 'participantIDs' in callLocator;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../calling-stateful-client/src\"\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"AzureCommunicationCallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,EAEL,4BAA4B,EAC5B,SAAS,EAEV,sDAA6C;AAC9C,OAAO,EAIL,wBAAwB,EAGzB,mDAA0C;AAoB3C,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAetC,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE7E,OAAO,EAAE,+BAA+B,EAAE,6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YACH,CAAC,CAAA,CAAC,EAAE,CAAC;QACP,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,6CAA6C,GAAG,CAC3D,UAA8B,EAC9B,SAAoB,EACpB,OAA2B,EACL,EAAE;IACxB,MAAM,aAAa,GAAG,CAAC,MAAM,UAAU,CAAC,gBAAgB,EAAE,CAA0B,CAAC;IACrF,OAAO,IAAI,6BAA6B,CAAC,UAAU,EAAE,OAAO,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;AAC1F,CAAC,CAAA,CAAC;AAEF,MAAM,WAAW,GAAG,CAAC,CAAQ,EAAkB,EAAE;IAC/C,OAAO,CAAC,CAAC,QAAQ,CAAC,KAAK,SAAS,IAAI,CAAC,CAAC,YAAY,CAAC,KAAK,SAAS,CAAC;AACpE,CAAC,CAAC;AAEF,mDAAmD;AACnD,6CAA6C;AAC7C,MAAM,cAAc,GAAG,CAAC,WAA+B,EAA0C,EAAE;IACjG,OAAO,gBAAgB,IAAI,WAAW,CAAC;AACzC,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n CallingHandlers,\n createDefaultCallingHandlers,\n _isInCall,\n _isInLobbyOrConnecting\n} from '@internal/calling-component-bindings';\nimport {\n CallClientState,\n CallError,\n CallState,\n createStatefulCallClient,\n StatefulCallClient,\n StatefulDeviceManager\n} from '@internal/calling-stateful-client';\nimport {\n AudioOptions,\n CallAgent,\n Call,\n GroupCallLocator,\n TeamsMeetingLinkLocator,\n LocalVideoStream as SDKLocalVideoStream,\n AudioDeviceInfo,\n VideoDeviceInfo,\n RemoteParticipant,\n PermissionConstraints,\n PropertyChangedEvent,\n StartCallOptions,\n VideoOptions\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(rooms) */\nimport { RoomCallLocator } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions, DtmfTone } from '@azure/communication-calling';\nimport { EventEmitter } from 'events';\nimport {\n CallAdapter,\n CallEndedListener,\n CallIdChangedListener,\n CallAdapterState,\n DisplayNameChangedListener,\n IsMutedChangedListener,\n IsLocalScreenSharingActiveChangedListener,\n IsSpeakingChangedListener,\n ParticipantsJoinedListener,\n ParticipantsLeftListener,\n DiagnosticChangedEventListner,\n CallAdapterCallEndedEvent\n} from './CallAdapter';\nimport { getCallCompositePage, IsCallEndedPage, isCameraOn } from '../utils';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\nimport { fromFlatCommunicationIdentifier, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CommunicationTokenCredential,\n CommunicationUserIdentifier,\n isCommunicationUserIdentifier,\n isPhoneNumberIdentifier,\n UnknownIdentifier,\n PhoneNumberIdentifier\n} from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CommunicationIdentifier } from '@azure/communication-common';\nimport { ParticipantSubscriber } from './ParticipantSubcriber';\nimport { AdapterError } from '../../common/adapters';\nimport { DiagnosticsForwarder } from './DiagnosticsForwarder';\nimport { useEffect, useRef, useState } from 'react';\n\n/** Context of call, which is a centralized context for all state updates */\nclass CallContext {\n private emitter: EventEmitter = new EventEmitter();\n private state: CallAdapterState;\n private callId: string | undefined;\n\n constructor(clientState: CallClientState, isTeamsCall: boolean) {\n this.state = {\n isLocalPreviewMicrophoneEnabled: false,\n userId: clientState.userId,\n displayName: clientState.callAgent?.displayName,\n devices: clientState.deviceManager,\n call: undefined,\n page: 'configuration',\n latestErrors: clientState.latestErrors,\n isTeamsCall,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId: clientState.alternateCallerId\n };\n }\n\n public onStateChange(handler: (_uiState: CallAdapterState) => void): void {\n this.emitter.on('stateChanged', handler);\n }\n\n public offStateChange(handler: (_uiState: CallAdapterState) => void): void {\n this.emitter.off('stateChanged', handler);\n }\n\n public setState(state: CallAdapterState): void {\n this.state = state;\n this.emitter.emit('stateChanged', this.state);\n }\n\n public getState(): CallAdapterState {\n return this.state;\n }\n\n public setIsLocalMicrophoneEnabled(isLocalPreviewMicrophoneEnabled: boolean): void {\n this.setState({ ...this.state, isLocalPreviewMicrophoneEnabled });\n }\n\n // This is the key to find current call object in client state\n public setCurrentCallId(callId: string | undefined): void {\n this.callId = callId;\n }\n\n public onCallEnded(handler: (callEndedData: CallAdapterCallEndedEvent) => void): void {\n this.emitter.on('callEnded', handler);\n }\n\n public offCallEnded(handler: (callEndedData: CallAdapterCallEndedEvent) => void): void {\n this.emitter.off('callEnded', handler);\n }\n\n public updateClientState(clientState: CallClientState): void {\n const call = this.callId ? clientState.calls[this.callId] : undefined;\n const latestEndedCall = findLatestEndedCall(clientState.callsEnded);\n\n // As the state is transitioning to a new state, trigger appropriate callback events.\n const oldPage = this.state.page;\n const newPage = getCallCompositePage(call, latestEndedCall);\n if (!IsCallEndedPage(oldPage) && IsCallEndedPage(newPage)) {\n this.emitter.emit('callEnded', {\n callId: this.callId,\n callEndedCode: latestEndedCall?.callEndReason?.code,\n callEndedSubCode: latestEndedCall?.callEndReason?.subCode\n });\n }\n\n if (this.state.page) {\n this.setState({\n ...this.state,\n userId: clientState.userId,\n displayName: clientState.callAgent?.displayName,\n call,\n page: newPage,\n endedCall: latestEndedCall,\n devices: clientState.deviceManager,\n latestErrors: clientState.latestErrors\n });\n }\n }\n}\n\nconst findLatestEndedCall = (calls: { [key: string]: CallState }): CallState | undefined => {\n const callStates = Object.values(calls);\n if (callStates.length === 0) {\n return undefined;\n }\n let latestCall = callStates[0];\n for (const call of callStates.slice(1)) {\n if ((call.endTime?.getTime() ?? 0) > (latestCall.endTime?.getTime() ?? 0)) {\n latestCall = call;\n }\n }\n return latestCall;\n};\n\n/**\n * @private\n */\nexport class AzureCommunicationCallAdapter implements CallAdapter {\n private callClient: StatefulCallClient;\n private callAgent: CallAgent;\n private deviceManager: StatefulDeviceManager;\n private localStream: SDKLocalVideoStream | undefined;\n private locator: CallAdapterLocator;\n // Never use directly, even internally. Use `call` property instead.\n private _call?: Call;\n private context: CallContext;\n private diagnosticsForwarder?: DiagnosticsForwarder;\n private handlers: CallingHandlers;\n private participantSubscribers = new Map<string, ParticipantSubscriber>();\n private emitter: EventEmitter = new EventEmitter();\n private onClientStateChange: (clientState: CallClientState) => void;\n\n private get call(): Call | undefined {\n return this._call;\n }\n\n private set call(newCall: Call | undefined) {\n this.resetDiagnosticsForwarder(newCall);\n this._call = newCall;\n }\n\n constructor(\n callClient: StatefulCallClient,\n locator: CallAdapterLocator,\n callAgent: CallAgent,\n deviceManager: StatefulDeviceManager\n ) {\n this.bindPublicMethods();\n this.callClient = callClient;\n this.callAgent = callAgent;\n this.locator = locator;\n this.deviceManager = deviceManager;\n const isTeamsMeeting = 'meetingLink' in this.locator;\n this.context = new CallContext(callClient.getState(), isTeamsMeeting);\n\n this.context.onCallEnded((endCallData) => this.emitter.emit('callEnded', endCallData));\n\n const onStateChange = (clientState: CallClientState): void => {\n // unsubscribe when the instance gets disposed\n if (!this) {\n callClient.offStateChange(onStateChange);\n return;\n }\n\n // `updateClientState` searches for the current call from all the calls in the state using a cached `call.id`\n // from the call object. `call.id` can change during a call. We must update the cached `call.id` before\n // calling `updateClientState` so that we find the correct state object for the call even when `call.id`\n // has changed.\n // https://github.com/Azure/communication-ui-library/pull/1820\n if (this.call?.id) {\n this.context.setCurrentCallId(this.call.id);\n }\n this.context.updateClientState(clientState);\n };\n\n this.handlers = createDefaultCallingHandlers(callClient, callAgent, deviceManager, undefined);\n\n this.onClientStateChange = onStateChange;\n\n this.subscribeDeviceManagerEvents();\n\n this.callClient.onStateChange(onStateChange);\n }\n\n // TODO: update this to include the 'selectedCameraChanged' when calling adds it to the device manager\n private subscribeDeviceManagerEvents(): void {\n this.deviceManager.on('selectedMicrophoneChanged', () => {\n this.emitter.emit('selectedMicrophoneChanged');\n });\n this.deviceManager.on('selectedSpeakerChanged', () => {\n this.emitter.emit('selectedSpeakerChanged');\n });\n }\n\n private bindPublicMethods(): void {\n this.onStateChange.bind(this);\n this.offStateChange.bind(this);\n this.getState.bind(this);\n this.dispose.bind(this);\n this.joinCall.bind(this);\n this.leaveCall.bind(this);\n this.setCamera.bind(this);\n this.setMicrophone.bind(this);\n this.setSpeaker.bind(this);\n this.askDevicePermission.bind(this);\n this.queryCameras.bind(this);\n this.queryMicrophones.bind(this);\n this.querySpeakers.bind(this);\n this.startCamera.bind(this);\n this.stopCamera.bind(this);\n this.mute.bind(this);\n this.unmute.bind(this);\n this.startCall.bind(this);\n this.startScreenShare.bind(this);\n this.stopScreenShare.bind(this);\n this.removeParticipant.bind(this);\n this.createStreamView.bind(this);\n this.disposeStreamView.bind(this);\n this.on.bind(this);\n this.off.bind(this);\n this.processNewCall.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.addParticipant.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.holdCall.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.resumeCall.bind(this);\n /* @conditional-compile-remove(PSTN-calls) */\n this.sendDtmfTone.bind(this);\n }\n\n public dispose(): void {\n this.resetDiagnosticsForwarder();\n this.callClient.offStateChange(this.onClientStateChange);\n this.callAgent.dispose();\n }\n\n public async queryCameras(): Promise<VideoDeviceInfo[]> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return this.deviceManager.getCameras();\n });\n }\n\n public async queryMicrophones(): Promise<AudioDeviceInfo[]> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return this.deviceManager.getMicrophones();\n });\n }\n\n public async querySpeakers(): Promise<AudioDeviceInfo[]> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n return this.deviceManager.isSpeakerSelectionAvailable ? this.deviceManager.getSpeakers() : [];\n });\n }\n\n public async askDevicePermission(constrain: PermissionConstraints): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.deviceManager.askDevicePermission(constrain);\n });\n }\n\n public joinCall(microphoneOn?: boolean): Call | undefined {\n if (_isInCall(this.getState().call?.state ?? 'None')) {\n throw new Error('You are already in the call!');\n }\n\n /* @conditional-compile-remove(teams-adhoc-call) */\n /* @conditional-compile-remove(PSTN-calls) */\n if (isOutboundCall(this.locator)) {\n const phoneNumber = this.getState().alternateCallerId;\n return this.startCall(this.locator.participantIDs, {\n alternateCallerId: phoneNumber ? { phoneNumber: phoneNumber } : undefined\n });\n }\n\n return this.teeErrorToEventEmitter(() => {\n const audioOptions: AudioOptions = { muted: !(microphoneOn ?? this.getState().isLocalPreviewMicrophoneEnabled) };\n // TODO: find a way to expose stream to here\n const videoOptions = { localVideoStreams: this.localStream ? [this.localStream] : undefined };\n\n const call = this._joinCall(audioOptions, videoOptions);\n\n this.processNewCall(call);\n return call;\n });\n }\n\n private _joinCall(audioOptions: AudioOptions, videoOptions: VideoOptions): Call {\n const isTeamsMeeting = 'meetingLink' in this.locator;\n /* @conditional-compile-remove(rooms) */\n const isRoomsCall = 'roomId' in this.locator;\n\n if (isTeamsMeeting) {\n return this.callAgent.join(this.locator as TeamsMeetingLinkLocator, {\n audioOptions,\n videoOptions\n });\n }\n /* @conditional-compile-remove(rooms) */\n if (isRoomsCall) {\n return this.callAgent.join(this.locator as RoomCallLocator, {\n audioOptions,\n videoOptions\n });\n }\n return this.callAgent.join(this.locator as GroupCallLocator, {\n audioOptions,\n videoOptions\n });\n }\n\n public async createStreamView(\n remoteUserId?: string,\n options?: VideoStreamOptions\n ): Promise<void | CreateVideoStreamViewResult> {\n if (remoteUserId === undefined) {\n return await this.handlers.onCreateLocalStreamView(options);\n } else {\n return await this.handlers.onCreateRemoteStreamView(remoteUserId, options);\n }\n }\n\n public async disposeStreamView(remoteUserId?: string): Promise<void> {\n if (remoteUserId === undefined) {\n await this.handlers.onDisposeLocalStreamView();\n } else {\n await this.handlers.onDisposeRemoteStreamView(remoteUserId);\n }\n }\n\n public async leaveCall(): Promise<void> {\n await this.handlers.onHangUp();\n this.unsubscribeCallEvents();\n this.call = undefined;\n this.handlers = createDefaultCallingHandlers(this.callClient, this.callAgent, this.deviceManager, undefined);\n this.context.setCurrentCallId(undefined);\n // Resync state after callId is set\n this.context.updateClientState(this.callClient.getState());\n this.stopCamera();\n this.mute();\n }\n\n public async setCamera(device: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onSelectCamera(device, options);\n });\n }\n\n public async setMicrophone(device: AudioDeviceInfo): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onSelectMicrophone(device);\n });\n }\n\n public async setSpeaker(device: AudioDeviceInfo): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n await this.handlers.onSelectSpeaker(device);\n });\n }\n\n public async startCamera(options?: VideoStreamOptions): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (!isCameraOn(this.getState())) {\n await this.handlers.onToggleCamera(options);\n }\n });\n }\n\n public async stopCamera(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (isCameraOn(this.getState())) {\n await this.handlers.onToggleCamera();\n }\n });\n }\n\n public async mute(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n this.context.setIsLocalMicrophoneEnabled(false);\n if (_isInCall(this.call?.state) && !this.call?.isMuted) {\n await this.handlers.onToggleMicrophone();\n }\n });\n }\n\n public async unmute(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n this.context.setIsLocalMicrophoneEnabled(true);\n if (_isInCall(this.call?.state) && this.call?.isMuted) {\n await this.handlers.onToggleMicrophone();\n }\n });\n }\n\n public async startScreenShare(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (!this.call?.isScreenSharingOn) {\n await this.handlers.onToggleScreenShare();\n }\n });\n }\n\n public async stopScreenShare(): Promise<void> {\n return await this.asyncTeeErrorToEventEmitter(async () => {\n if (this.call?.isScreenSharingOn) {\n await this.handlers.onToggleScreenShare();\n }\n });\n }\n\n public startCall(participants: string[], options?: StartCallOptions): Call | undefined {\n if (_isInCall(this.getState().call?.state ?? 'None')) {\n throw new Error('You are already in the call.');\n }\n\n const idsToAdd = participants.map((participant) => {\n // FIXME: `onStartCall` does not allow a Teams user.\n // Need some way to return an error if a Teams user is provided.\n const backendId = fromFlatCommunicationIdentifier(participant);\n if (isPhoneNumberIdentifier(backendId)) {\n if (options?.alternateCallerId === undefined) {\n throw new Error('unable to start call, PSTN user present with no alternateCallerId.');\n }\n return backendId as PhoneNumberIdentifier;\n } else if (isCommunicationUserIdentifier(backendId)) {\n return backendId as CommunicationUserIdentifier;\n }\n return backendId as UnknownIdentifier;\n });\n\n const call = this.handlers.onStartCall(idsToAdd, options);\n if (!call) {\n throw new Error('Unable to start call.');\n }\n this.processNewCall(call);\n\n return this.call;\n }\n\n private processNewCall(call: Call): void {\n this.call = call;\n this.context.setCurrentCallId(call.id);\n\n // Resync state after callId is set\n this.context.updateClientState(this.callClient.getState());\n this.handlers = createDefaultCallingHandlers(this.callClient, this.callAgent, this.deviceManager, this.call);\n this.subscribeCallEvents();\n }\n\n public async removeParticipant(userId: string): Promise<void> {\n this.handlers.onRemoveParticipant(userId);\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async addParticipant(participant: CommunicationIdentifier, options?: AddPhoneNumberOptions): Promise<void> {\n this.handlers.onAddParticipant(participant, options);\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async holdCall(): Promise<void> {\n if (this.call?.state !== 'LocalHold') {\n this.handlers.onToggleHold();\n }\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async resumeCall(): Promise<void> {\n if (this.call?.state === 'LocalHold') {\n this.handlers.onToggleHold();\n }\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n public async sendDtmfTone(dtmfTone: DtmfTone): Promise<void> {\n this.handlers.onSendDtmfTone(dtmfTone);\n }\n\n public getState(): CallAdapterState {\n return this.context.getState();\n }\n\n public onStateChange(handler: (state: CallAdapterState) => void): void {\n this.context.onStateChange(handler);\n }\n\n public offStateChange(handler: (state: CallAdapterState) => void): void {\n this.context.offStateChange(handler);\n }\n\n on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n on(event: 'callEnded', listener: CallEndedListener): void;\n on(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n on(event: 'error', errorHandler: (e: AdapterError) => void): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public on(event: string, listener: (e: any) => void): void {\n this.emitter.on(event, listener);\n }\n\n private subscribeCallEvents(): void {\n this.call?.on('remoteParticipantsUpdated', this.onRemoteParticipantsUpdated.bind(this));\n this.call?.on('isMutedChanged', this.isMyMutedChanged.bind(this));\n this.call?.on('isScreenSharingOnChanged', this.isScreenSharingOnChanged.bind(this));\n this.call?.on('idChanged', this.callIdChanged.bind(this));\n }\n\n private unsubscribeCallEvents(): void {\n for (const subscriber of this.participantSubscribers.values()) {\n subscriber.unsubscribeAll();\n }\n this.participantSubscribers.clear();\n this.call?.off('remoteParticipantsUpdated', this.onRemoteParticipantsUpdated.bind(this));\n this.call?.off('isMutedChanged', this.isMyMutedChanged.bind(this));\n this.call?.off('isScreenSharingOnChanged', this.isScreenSharingOnChanged.bind(this));\n this.call?.off('idChanged', this.callIdChanged.bind(this));\n }\n\n private isMyMutedChanged = (): void => {\n this.emitter.emit('isMutedChanged', {\n participantId: this.getState().userId,\n isMuted: this.call?.isMuted\n });\n };\n\n private onRemoteParticipantsUpdated({\n added,\n removed\n }: {\n added: RemoteParticipant[];\n removed: RemoteParticipant[];\n }): void {\n if (added && added.length > 0) {\n this.emitter.emit('participantsJoined', added);\n }\n if (removed && removed.length > 0) {\n this.emitter.emit('participantsLeft', removed);\n }\n\n added.forEach((participant) => {\n this.participantSubscribers.set(\n toFlatCommunicationIdentifier(participant.identifier),\n new ParticipantSubscriber(participant, this.emitter)\n );\n });\n\n removed.forEach((participant) => {\n const subscriber = this.participantSubscribers.get(toFlatCommunicationIdentifier(participant.identifier));\n subscriber && subscriber.unsubscribeAll();\n this.participantSubscribers.delete(toFlatCommunicationIdentifier(participant.identifier));\n });\n }\n\n private isScreenSharingOnChanged(): void {\n this.emitter.emit('isLocalScreenSharingActiveChanged', { isScreenSharingOn: this.call?.isScreenSharingOn });\n }\n\n private callIdChanged(): void {\n this.call?.id && this.emitter.emit('callIdChanged', { callId: this.call.id });\n }\n\n private resetDiagnosticsForwarder(newCall?: Call): void {\n if (this.diagnosticsForwarder) {\n this.diagnosticsForwarder.unsubscribe();\n }\n if (newCall) {\n this.diagnosticsForwarder = new DiagnosticsForwarder(this.emitter, newCall);\n }\n }\n\n off(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n off(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n off(event: 'callEnded', listener: CallEndedListener): void;\n off(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n off(event: 'error', errorHandler: (e: AdapterError) => void): void;\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public off(event: string, listener: (e: any) => void): void {\n this.emitter.off(event, listener);\n }\n\n private async asyncTeeErrorToEventEmitter<T>(f: () => Promise<T>): Promise<T> {\n try {\n return await f();\n } catch (error) {\n if (isCallError(error as Error)) {\n this.emitter.emit('error', error as AdapterError);\n }\n throw error;\n }\n }\n\n private teeErrorToEventEmitter<T>(f: () => T): T {\n try {\n return f();\n } catch (error) {\n if (isCallError(error as Error)) {\n this.emitter.emit('error', error as AdapterError);\n }\n throw error;\n }\n }\n}\n\n/* @conditional-compile-remove(teams-adhoc-call) */\n/* @conditional-compile-remove(PSTN-calls) */\n/**\n * Locator used by {@link createAzureCommunicationCallAdapter} to call one or more participants\n *\n * @remarks\n * This is currently in beta and only supports calling one Teams User.\n *\n * @example\n * ```\n * ['8:orgid:ab220efe-5725-4742-9792-9fba7c9ac458']\n * ```\n *\n * @beta\n */\nexport type CallParticipantsLocator = {\n participantIDs: string[];\n};\n\n/**\n * Locator used by {@link createAzureCommunicationCallAdapter} to locate the call to join\n *\n * @public\n */\nexport type CallAdapterLocator =\n | TeamsMeetingLinkLocator\n | GroupCallLocator\n | /* @conditional-compile-remove(rooms) */ RoomCallLocator\n | /* @conditional-compile-remove(teams-adhoc-call) */ /* @conditional-compile-remove(PSTN-calls) */ CallParticipantsLocator;\n\n/**\n * Arguments for creating the Azure Communication Services implementation of {@link CallAdapter}.\n *\n * Note: `displayName` can be a maximum of 256 characters.\n *\n * @public\n */\nexport type AzureCommunicationCallAdapterArgs = {\n userId: CommunicationUserIdentifier;\n displayName: string;\n credential: CommunicationTokenCredential;\n locator: CallAdapterLocator;\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId?: string;\n};\n\n/**\n * Create a {@link CallAdapter} backed by Azure Communication Services.\n *\n * This is the default implementation of {@link CallAdapter} provided by this library.\n *\n * Note: `displayName` can be a maximum of 256 characters.\n *\n * @public\n */\nexport const createAzureCommunicationCallAdapter = async ({\n userId,\n displayName,\n credential,\n locator,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId\n}: AzureCommunicationCallAdapterArgs): Promise<CallAdapter> => {\n const callClient = createStatefulCallClient({\n userId,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId\n });\n const callAgent = await callClient.createCallAgent(credential, {\n displayName\n });\n const adapter = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, locator);\n return adapter;\n};\n\n/**\n * A custom React hook to simplify the creation of {@link CallAdapter}.\n *\n * Similar to {@link createAzureCommunicationCallAdapter}, but takes care of asynchronous\n * creation of the adapter internally.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n *\n * Note that you must memoize the arguments to avoid recreating adapter on each render.\n * See storybook for typical usage examples.\n *\n * @public\n */\nexport const useAzureCommunicationCallAdapter = (\n /**\n * Arguments to be passed to {@link createAzureCommunicationCallAdapter}.\n *\n * Allows arguments to be undefined so that you can respect the rule-of-hooks and pass in arguments\n * as they are created. The adapter is only created when all arguments are defined.\n */\n args: Partial<AzureCommunicationCallAdapterArgs>,\n /**\n * Optional callback to modify the adapter once it is created.\n *\n * If set, must return the modified adapter.\n */\n afterCreate?: (adapter: CallAdapter) => Promise<CallAdapter>,\n /**\n * Optional callback called before the adapter is disposed.\n *\n * This is useful for clean up tasks, e.g., leaving any ongoing calls.\n */\n beforeDispose?: (adapter: CallAdapter) => Promise<void>\n): CallAdapter | undefined => {\n const { credential, displayName, locator, userId, /*@conditional-compile-remove(PSTN-calls) */ alternateCallerId } =\n args;\n\n // State update needed to rerender the parent component when a new adapter is created.\n const [adapter, setAdapter] = useState<CallAdapter | undefined>(undefined);\n // Ref needed for cleanup to access the old adapter created asynchronously.\n const adapterRef = useRef<CallAdapter | undefined>(undefined);\n\n const afterCreateRef = useRef<((adapter: CallAdapter) => Promise<CallAdapter>) | undefined>(undefined);\n const beforeDisposeRef = useRef<((adapter: CallAdapter) => Promise<void>) | undefined>(undefined);\n // These refs are updated on *each* render, so that the latest values\n // are used in the `useEffect` closures below.\n // Using a Ref ensures that new values for the callbacks do not trigger the\n // useEffect blocks, and a new adapter creation / distruction is not triggered.\n afterCreateRef.current = afterCreate;\n beforeDisposeRef.current = beforeDispose;\n\n useEffect(\n () => {\n if (!credential || !displayName || !locator || !userId) {\n return;\n }\n (async () => {\n if (adapterRef.current) {\n // Dispose the old adapter when a new one is created.\n //\n // This clean up function uses `adapterRef` because `adapter` can not be added to the dependency array of\n // this `useEffect` -- we do not want to trigger a new adapter creation because of the first adapter\n // creation.\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n\n let newAdapter = await createAzureCommunicationCallAdapter({\n credential,\n displayName,\n locator,\n userId,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId\n });\n if (afterCreateRef.current) {\n newAdapter = await afterCreateRef.current(newAdapter);\n }\n adapterRef.current = newAdapter;\n setAdapter(newAdapter);\n })();\n },\n // Explicitly list all arguments so that caller doesn't have to memoize the `args` object.\n [\n adapterRef,\n afterCreateRef,\n /* @conditional-compile-remove(PSTN-calls) */ alternateCallerId,\n beforeDisposeRef,\n credential,\n displayName,\n locator,\n userId\n ]\n );\n\n // Dispose any existing adapter when the component unmounts.\n useEffect(() => {\n return () => {\n (async () => {\n if (adapterRef.current) {\n if (beforeDisposeRef.current) {\n await beforeDisposeRef.current(adapterRef.current);\n }\n adapterRef.current.dispose();\n adapterRef.current = undefined;\n }\n })();\n };\n }, []);\n\n return adapter;\n};\n\n/**\n * Create a {@link CallAdapter} using the provided {@link StatefulCallClient}.\n *\n * Useful if you want to keep a reference to {@link StatefulCallClient}.\n * Consider using {@link createAzureCommunicationCallAdapter} for a simpler API.\n *\n * @public\n */\nexport const createAzureCommunicationCallAdapterFromClient = async (\n callClient: StatefulCallClient,\n callAgent: CallAgent,\n locator: CallAdapterLocator\n): Promise<CallAdapter> => {\n const deviceManager = (await callClient.getDeviceManager()) as StatefulDeviceManager;\n return new AzureCommunicationCallAdapter(callClient, locator, callAgent, deviceManager);\n};\n\nconst isCallError = (e: Error): e is CallError => {\n return e['target'] !== undefined && e['innerError'] !== undefined;\n};\n\n/* @conditional-compile-remove(teams-adhoc-call) */\n/* @conditional-compile-remove(PSTN-calls) */\nconst isOutboundCall = (callLocator: CallAdapterLocator): callLocator is CallParticipantsLocator => {\n return 'participantIDs' in callLocator;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../calling-stateful-client/src\"\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
@@ -10,7 +10,7 @@ import type { AdapterState, Disposable, AdapterError, AdapterErrors } from '../.
10
10
  *
11
11
  * @public
12
12
  */
13
- export declare type CallCompositePage = 'accessDeniedTeamsMeeting' | 'call' | 'configuration' | 'joinCallFailedDueToNoNetwork' | 'leftCall' | 'lobby' | 'removedFromCall' | /* @conditional-compile-remove(PSTN-calls) */ 'hold';
13
+ export declare type CallCompositePage = 'accessDeniedTeamsMeeting' | 'call' | 'configuration' | /* @conditional-compile-remove(PSTN-calls) */ 'hold' | 'joinCallFailedDueToNoNetwork' | 'leftCall' | 'lobby' | 'removedFromCall';
14
14
  /**
15
15
  * Subset of CallCompositePages that represent an end call state.
16
16
  * @private
@@ -1 +1 @@
1
- {"version":3,"file":"CallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/CallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAuClC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwB;IACjD,0BAA0B;IAC1B,8BAA8B;IAC9B,UAAU;IACV,iBAAiB;CAClB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CallState, DeviceManagerState } from '@internal/calling-stateful-client';\nimport type {\n AudioDeviceInfo,\n VideoDeviceInfo,\n Call,\n PermissionConstraints,\n RemoteParticipant,\n StartCallOptions,\n MediaDiagnosticChangedEventArgs,\n NetworkDiagnosticChangedEventArgs,\n PropertyChangedEvent,\n CallEndReason\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions, DtmfTone } from '@azure/communication-calling';\n\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\nimport type { CommunicationIdentifierKind } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CommunicationIdentifier } from '@azure/communication-common';\nimport type { AdapterState, Disposable, AdapterError, AdapterErrors } from '../../common/adapters';\n\n/**\n * Major UI screens shown in the {@link CallComposite}.\n *\n * @public\n */\nexport type CallCompositePage =\n | 'accessDeniedTeamsMeeting'\n | 'call'\n | 'configuration'\n | 'joinCallFailedDueToNoNetwork'\n | 'leftCall'\n | 'lobby'\n | 'removedFromCall'\n | /* @conditional-compile-remove(PSTN-calls) */ 'hold';\n\n/**\n * Subset of CallCompositePages that represent an end call state.\n * @private\n */\nexport const END_CALL_PAGES: CallCompositePage[] = [\n 'accessDeniedTeamsMeeting',\n 'joinCallFailedDueToNoNetwork',\n 'leftCall',\n 'removedFromCall'\n];\n\n/**\n * {@link CallAdapter} state for pure UI purposes.\n *\n * @public\n */\nexport type CallAdapterUiState = {\n isLocalPreviewMicrophoneEnabled: boolean;\n page: CallCompositePage;\n};\n\n/**\n * {@link CallAdapter} state inferred from Azure Communication Services backend.\n *\n * @public\n */\nexport type CallAdapterClientState = {\n userId: CommunicationIdentifierKind;\n displayName?: string;\n call?: CallState;\n devices: DeviceManagerState;\n endedCall?: CallState;\n isTeamsCall: boolean;\n /**\n * Latest error encountered for each operation performed via the adapter.\n */\n latestErrors: AdapterErrors;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Azure communications Phone number to make PSTN calls with.\n */\n alternateCallerId?: string;\n};\n\n/**\n * {@link CallAdapter} state.\n *\n * @public\n */\nexport type CallAdapterState = CallAdapterUiState & CallAdapterClientState;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsJoined' event.\n *\n * @public\n */\nexport type ParticipantsJoinedListener = (event: { joined: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsLeft' event.\n *\n * @public\n */\nexport type ParticipantsLeftListener = (event: { removed: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isMuted' event.\n *\n * @public\n */\nexport type IsMutedChangedListener = (event: { identifier: CommunicationIdentifierKind; isMuted: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callIdChanged' event.\n *\n * @public\n */\nexport type CallIdChangedListener = (event: { callId: string }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isLocalScreenSharingActiveChanged' event.\n *\n * @public\n */\nexport type IsLocalScreenSharingActiveChangedListener = (event: { isScreenSharingOn: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isSpeakingChanged' event.\n *\n * @public\n */\nexport type IsSpeakingChangedListener = (event: {\n identifier: CommunicationIdentifierKind;\n isSpeaking: boolean;\n}) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'displayNameChanged' event.\n *\n * @public\n */\nexport type DisplayNameChangedListener = (event: {\n participantId: CommunicationIdentifierKind;\n displayName: string;\n}) => void;\n\n/**\n * Payload for {@link CallEndedListener} containing details on the ended call.\n *\n * @public\n */\nexport type CallAdapterCallEndedEvent = { callId?: string; callEndReason?: CallEndReason };\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callEnded' event.\n *\n * @public\n */\nexport type CallEndedListener = (event: CallAdapterCallEndedEvent) => void;\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a media diagnostic.\n *\n * @public\n */\nexport type MediaDiagnosticChangedEvent = MediaDiagnosticChangedEventArgs & {\n type: 'media';\n};\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a network diagnostic.\n *\n * @public\n */\nexport type NetworkDiagnosticChangedEvent = NetworkDiagnosticChangedEventArgs & {\n type: 'network';\n};\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'diagnosticChanged' event.\n *\n * @public\n */\nexport type DiagnosticChangedEventListner = (\n event: MediaDiagnosticChangedEvent | NetworkDiagnosticChangedEvent\n) => void;\n\n/**\n * Functionality for managing the current call.\n *\n * @public\n */\nexport interface CallAdapterCallManagement {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n /**\n * Leave the call\n *\n * @param forEveryone - Whether to remove all participants when leaving\n *\n * @public\n */\n leaveCall(forEveryone?: boolean): Promise<void>;\n /**\n * Start the camera\n * This method will start rendering a local camera view when the call is not active\n *\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n startCamera(options?: VideoStreamOptions): Promise<void>;\n /**\n * Stop the camera\n * This method will stop rendering a local camera view when the call is not active\n *\n * @public\n */\n stopCamera(): Promise<void>;\n /**\n * Mute the current user during the call or disable microphone locally\n *\n * @public\n */\n mute(): Promise<void>;\n /**\n * Unmute the current user during the call or enable microphone locally\n *\n * @public\n */\n unmute(): Promise<void>;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /**\n * Start sharing the screen during a call.\n *\n * @public\n */\n startScreenShare(): Promise<void>;\n /**\n * Stop sharing the screen\n *\n * @public\n */\n stopScreenShare(): Promise<void>;\n /**\n * Remove a participant from the call.\n *\n * @param userId - Id of the participant to be removed\n *\n * @public\n */\n removeParticipant(userId: string): Promise<void>;\n /**\n * Create the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to create the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>;\n /**\n * Dispose the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Holds the call.\n *\n * @beta\n */\n holdCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Resumes the call from a `LocalHold` state.\n *\n * @beta\n */\n resumeCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Add a participant to the call.\n *\n * @beta\n */\n addParticipant(participant: CommunicationIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * send dtmf tone to another participant in a 1:1 PSTN call\n *\n * @beta\n */\n sendDtmfTone(dtmfTone: DtmfTone): Promise<void>;\n}\n\n/**\n * Functionality for managing devices within a call.\n *\n * @public\n */\nexport interface CallAdapterDeviceManagement {\n /**\n * Ask for permissions of devices.\n *\n * @remarks\n * Browser permission window will pop up if permissions are not granted yet\n *\n * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n *\n * @public\n */\n askDevicePermission(constrain: PermissionConstraints): Promise<void>;\n /**\n * Query for available camera devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of video device information entities {@link @azure/communication-calling#VideoDeviceInfo }\n *\n * @public\n */\n queryCameras(): Promise<VideoDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n queryMicrophones(): Promise<AudioDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n querySpeakers(): Promise<AudioDeviceInfo[]>;\n /**\n * Set the camera to use in the call.\n *\n * @param sourceInfo - Camera device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryCameras }\n * @param options - Options to control how the camera stream is rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void>;\n /**\n * Set the microphone to use in the call.\n *\n * @param sourceInfo - Microphone device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryMicrophones }\n *\n * @public\n */\n setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>;\n /**\n * Set the speaker to use in the call.\n *\n * @param sourceInfo - Speaker device to choose, pick one returned by {@link CallAdapterDeviceManagement#querySpeakers }\n *\n * @public\n */\n setSpeaker(sourceInfo: AudioDeviceInfo): Promise<void>;\n}\n\n/**\n * Call composite events that can be subscribed to.\n *\n * @public\n */\nexport interface CallAdapterSubscribers {\n /**\n * Subscribe function for 'participantsJoined' event.\n */\n on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Subscribe function for 'participantsLeft' event.\n */\n on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Subscribe function for 'isMutedChanged' event.\n *\n * @remarks\n * The event will be triggered whenever current user or remote user mute state changed\n *\n */\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Subscribe function for 'callIdChanged' event.\n *\n * @remarks\n * The event will be triggered when callId of current user changed.\n *\n */\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Subscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Subscribe function for 'displayNameChanged' event.\n */\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Subscribe function for 'isSpeakingChanged' event.\n */\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Subscribe function for 'callEnded' event.\n */\n on(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Subscribe function for 'diagnosticChanged' event.\n *\n * This event fires whenever there is a change in user facing diagnostics about the ongoing call.\n */\n on(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Subscribe function for 'selectedMicrophoneChanged' event.\n *\n * This event fires whenever the user selects a new microphone device.\n */\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'selectedSpeakerChanged' event.\n *\n * This event fires whenever the user selects a new speaker device.\n */\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'error' event.\n */\n on(event: 'error', listener: (e: AdapterError) => void): void;\n\n /**\n * Unsubscribe function for 'participantsJoined' event.\n */\n off(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Unsubscribe function for 'participantsLeft' event.\n */\n off(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Unsubscribe function for 'isMutedChanged' event.\n */\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Unsubscribe function for 'callIdChanged' event.\n */\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Unsubscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Unsubscribe function for 'displayNameChanged' event.\n */\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Unsubscribe function for 'isSpeakingChanged' event.\n */\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Unsubscribe function for 'callEnded' event.\n */\n off(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Unsubscribe function for 'diagnosticChanged' event.\n */\n off(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Unsubscribe function for 'selectedMicrophoneChanged' event.\n */\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'selectedSpeakerChanged' event.\n */\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'error' event.\n */\n off(event: 'error', listener: (e: AdapterError) => void): void;\n}\n\n/**\n * {@link CallComposite} Adapter interface.\n *\n * @public\n */\nexport interface CallAdapter\n extends AdapterState<CallAdapterState>,\n Disposable,\n CallAdapterCallManagement,\n CallAdapterDeviceManagement,\n CallAdapterSubscribers {}\n\"../../../../../calling-stateful-client/src\"\"../../../../../react-components/src\""]}
1
+ {"version":3,"file":"CallAdapter.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/adapter/CallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAuClC;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwB;IACjD,0BAA0B;IAC1B,8BAA8B;IAC9B,UAAU;IACV,iBAAiB;CAClB,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CallState, DeviceManagerState } from '@internal/calling-stateful-client';\nimport type {\n AudioDeviceInfo,\n VideoDeviceInfo,\n Call,\n PermissionConstraints,\n RemoteParticipant,\n StartCallOptions,\n MediaDiagnosticChangedEventArgs,\n NetworkDiagnosticChangedEventArgs,\n PropertyChangedEvent,\n CallEndReason\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions, DtmfTone } from '@azure/communication-calling';\n\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '@internal/react-components';\nimport type { CommunicationIdentifierKind } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { CommunicationIdentifier } from '@azure/communication-common';\nimport type { AdapterState, Disposable, AdapterError, AdapterErrors } from '../../common/adapters';\n\n/**\n * Major UI screens shown in the {@link CallComposite}.\n *\n * @public\n */\nexport type CallCompositePage =\n | 'accessDeniedTeamsMeeting'\n | 'call'\n | 'configuration'\n | /* @conditional-compile-remove(PSTN-calls) */ 'hold'\n | 'joinCallFailedDueToNoNetwork'\n | 'leftCall'\n | 'lobby'\n | 'removedFromCall';\n\n/**\n * Subset of CallCompositePages that represent an end call state.\n * @private\n */\nexport const END_CALL_PAGES: CallCompositePage[] = [\n 'accessDeniedTeamsMeeting',\n 'joinCallFailedDueToNoNetwork',\n 'leftCall',\n 'removedFromCall'\n];\n\n/**\n * {@link CallAdapter} state for pure UI purposes.\n *\n * @public\n */\nexport type CallAdapterUiState = {\n isLocalPreviewMicrophoneEnabled: boolean;\n page: CallCompositePage;\n};\n\n/**\n * {@link CallAdapter} state inferred from Azure Communication Services backend.\n *\n * @public\n */\nexport type CallAdapterClientState = {\n userId: CommunicationIdentifierKind;\n displayName?: string;\n call?: CallState;\n devices: DeviceManagerState;\n endedCall?: CallState;\n isTeamsCall: boolean;\n /**\n * Latest error encountered for each operation performed via the adapter.\n */\n latestErrors: AdapterErrors;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Azure communications Phone number to make PSTN calls with.\n */\n alternateCallerId?: string;\n};\n\n/**\n * {@link CallAdapter} state.\n *\n * @public\n */\nexport type CallAdapterState = CallAdapterUiState & CallAdapterClientState;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsJoined' event.\n *\n * @public\n */\nexport type ParticipantsJoinedListener = (event: { joined: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'participantsLeft' event.\n *\n * @public\n */\nexport type ParticipantsLeftListener = (event: { removed: RemoteParticipant[] }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isMuted' event.\n *\n * @public\n */\nexport type IsMutedChangedListener = (event: { identifier: CommunicationIdentifierKind; isMuted: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callIdChanged' event.\n *\n * @public\n */\nexport type CallIdChangedListener = (event: { callId: string }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isLocalScreenSharingActiveChanged' event.\n *\n * @public\n */\nexport type IsLocalScreenSharingActiveChangedListener = (event: { isScreenSharingOn: boolean }) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'isSpeakingChanged' event.\n *\n * @public\n */\nexport type IsSpeakingChangedListener = (event: {\n identifier: CommunicationIdentifierKind;\n isSpeaking: boolean;\n}) => void;\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'displayNameChanged' event.\n *\n * @public\n */\nexport type DisplayNameChangedListener = (event: {\n participantId: CommunicationIdentifierKind;\n displayName: string;\n}) => void;\n\n/**\n * Payload for {@link CallEndedListener} containing details on the ended call.\n *\n * @public\n */\nexport type CallAdapterCallEndedEvent = { callId?: string; callEndReason?: CallEndReason };\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'callEnded' event.\n *\n * @public\n */\nexport type CallEndedListener = (event: CallAdapterCallEndedEvent) => void;\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a media diagnostic.\n *\n * @public\n */\nexport type MediaDiagnosticChangedEvent = MediaDiagnosticChangedEventArgs & {\n type: 'media';\n};\n\n/**\n * Payload for {@link DiagnosticChangedEventListner} where there is a change in a network diagnostic.\n *\n * @public\n */\nexport type NetworkDiagnosticChangedEvent = NetworkDiagnosticChangedEventArgs & {\n type: 'network';\n};\n\n/**\n * Callback for {@link CallAdapterSubscribers} 'diagnosticChanged' event.\n *\n * @public\n */\nexport type DiagnosticChangedEventListner = (\n event: MediaDiagnosticChangedEvent | NetworkDiagnosticChangedEvent\n) => void;\n\n/**\n * Functionality for managing the current call.\n *\n * @public\n */\nexport interface CallAdapterCallManagement {\n /**\n * Join the call with microphone initially on/off.\n *\n * @param microphoneOn - Whether microphone is initially enabled\n *\n * @public\n */\n joinCall(microphoneOn?: boolean): Call | undefined;\n /**\n * Leave the call\n *\n * @param forEveryone - Whether to remove all participants when leaving\n *\n * @public\n */\n leaveCall(forEveryone?: boolean): Promise<void>;\n /**\n * Start the camera\n * This method will start rendering a local camera view when the call is not active\n *\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n startCamera(options?: VideoStreamOptions): Promise<void>;\n /**\n * Stop the camera\n * This method will stop rendering a local camera view when the call is not active\n *\n * @public\n */\n stopCamera(): Promise<void>;\n /**\n * Mute the current user during the call or disable microphone locally\n *\n * @public\n */\n mute(): Promise<void>;\n /**\n * Unmute the current user during the call or enable microphone locally\n *\n * @public\n */\n unmute(): Promise<void>;\n /**\n * Start the call.\n *\n * @param participants - An array of participant ids to join\n *\n * @public\n */\n startCall(participants: string[], options?: StartCallOptions): Call | undefined;\n /**\n * Start sharing the screen during a call.\n *\n * @public\n */\n startScreenShare(): Promise<void>;\n /**\n * Stop sharing the screen\n *\n * @public\n */\n stopScreenShare(): Promise<void>;\n /**\n * Remove a participant from the call.\n *\n * @param userId - Id of the participant to be removed\n *\n * @public\n */\n removeParticipant(userId: string): Promise<void>;\n /**\n * Create the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to create the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n createStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void | CreateVideoStreamViewResult>;\n /**\n * Dispose the html view for a stream.\n *\n * @remarks\n * This method is implemented for composite\n *\n * @param remoteUserId - Id of the participant to render, leave it undefined to dispose the local camera view\n * @param options - Options to control how video streams are rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n disposeStreamView(remoteUserId?: string, options?: VideoStreamOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Holds the call.\n *\n * @beta\n */\n holdCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Resumes the call from a `LocalHold` state.\n *\n * @beta\n */\n resumeCall(): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Add a participant to the call.\n *\n * @beta\n */\n addParticipant(participant: CommunicationIdentifier, options?: AddPhoneNumberOptions): Promise<void>;\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * send dtmf tone to another participant in a 1:1 PSTN call\n *\n * @beta\n */\n sendDtmfTone(dtmfTone: DtmfTone): Promise<void>;\n}\n\n/**\n * Functionality for managing devices within a call.\n *\n * @public\n */\nexport interface CallAdapterDeviceManagement {\n /**\n * Ask for permissions of devices.\n *\n * @remarks\n * Browser permission window will pop up if permissions are not granted yet\n *\n * @param constrain - Define constraints for accessing local devices {@link @azure/communication-calling#PermissionConstraints }\n *\n * @public\n */\n askDevicePermission(constrain: PermissionConstraints): Promise<void>;\n /**\n * Query for available camera devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of video device information entities {@link @azure/communication-calling#VideoDeviceInfo }\n *\n * @public\n */\n queryCameras(): Promise<VideoDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n queryMicrophones(): Promise<AudioDeviceInfo[]>;\n /**\n * Query for available microphone devices.\n *\n * @remarks\n * This method should be called after askDevicePermission()\n *\n * @return An array of audio device information entities {@link @azure/communication-calling#AudioDeviceInfo }\n *\n * @public\n */\n querySpeakers(): Promise<AudioDeviceInfo[]>;\n /**\n * Set the camera to use in the call.\n *\n * @param sourceInfo - Camera device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryCameras }\n * @param options - Options to control how the camera stream is rendered {@link @azure/communication-calling#VideoStreamOptions }\n *\n * @public\n */\n setCamera(sourceInfo: VideoDeviceInfo, options?: VideoStreamOptions): Promise<void>;\n /**\n * Set the microphone to use in the call.\n *\n * @param sourceInfo - Microphone device to choose, pick one returned by {@link CallAdapterDeviceManagement#queryMicrophones }\n *\n * @public\n */\n setMicrophone(sourceInfo: AudioDeviceInfo): Promise<void>;\n /**\n * Set the speaker to use in the call.\n *\n * @param sourceInfo - Speaker device to choose, pick one returned by {@link CallAdapterDeviceManagement#querySpeakers }\n *\n * @public\n */\n setSpeaker(sourceInfo: AudioDeviceInfo): Promise<void>;\n}\n\n/**\n * Call composite events that can be subscribed to.\n *\n * @public\n */\nexport interface CallAdapterSubscribers {\n /**\n * Subscribe function for 'participantsJoined' event.\n */\n on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Subscribe function for 'participantsLeft' event.\n */\n on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Subscribe function for 'isMutedChanged' event.\n *\n * @remarks\n * The event will be triggered whenever current user or remote user mute state changed\n *\n */\n on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Subscribe function for 'callIdChanged' event.\n *\n * @remarks\n * The event will be triggered when callId of current user changed.\n *\n */\n on(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Subscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n on(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Subscribe function for 'displayNameChanged' event.\n */\n on(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Subscribe function for 'isSpeakingChanged' event.\n */\n on(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Subscribe function for 'callEnded' event.\n */\n on(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Subscribe function for 'diagnosticChanged' event.\n *\n * This event fires whenever there is a change in user facing diagnostics about the ongoing call.\n */\n on(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Subscribe function for 'selectedMicrophoneChanged' event.\n *\n * This event fires whenever the user selects a new microphone device.\n */\n on(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'selectedSpeakerChanged' event.\n *\n * This event fires whenever the user selects a new speaker device.\n */\n on(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Subscribe function for 'error' event.\n */\n on(event: 'error', listener: (e: AdapterError) => void): void;\n\n /**\n * Unsubscribe function for 'participantsJoined' event.\n */\n off(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;\n /**\n * Unsubscribe function for 'participantsLeft' event.\n */\n off(event: 'participantsLeft', listener: ParticipantsLeftListener): void;\n /**\n * Unsubscribe function for 'isMutedChanged' event.\n */\n off(event: 'isMutedChanged', listener: IsMutedChangedListener): void;\n /**\n * Unsubscribe function for 'callIdChanged' event.\n */\n off(event: 'callIdChanged', listener: CallIdChangedListener): void;\n /**\n * Unsubscribe function for 'isLocalScreenSharingActiveChanged' event.\n */\n off(event: 'isLocalScreenSharingActiveChanged', listener: IsLocalScreenSharingActiveChangedListener): void;\n /**\n * Unsubscribe function for 'displayNameChanged' event.\n */\n off(event: 'displayNameChanged', listener: DisplayNameChangedListener): void;\n /**\n * Unsubscribe function for 'isSpeakingChanged' event.\n */\n off(event: 'isSpeakingChanged', listener: IsSpeakingChangedListener): void;\n /**\n * Unsubscribe function for 'callEnded' event.\n */\n off(event: 'callEnded', listener: CallEndedListener): void;\n /**\n * Unsubscribe function for 'diagnosticChanged' event.\n */\n off(event: 'diagnosticChanged', listener: DiagnosticChangedEventListner): void;\n /**\n * Unsubscribe function for 'selectedMicrophoneChanged' event.\n */\n off(event: 'selectedMicrophoneChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'selectedSpeakerChanged' event.\n */\n off(event: 'selectedSpeakerChanged', listener: PropertyChangedEvent): void;\n /**\n * Unsubscribe function for 'error' event.\n */\n off(event: 'error', listener: (e: AdapterError) => void): void;\n}\n\n/**\n * {@link CallComposite} Adapter interface.\n *\n * @public\n */\nexport interface CallAdapter\n extends AdapterState<CallAdapterState>,\n Disposable,\n CallAdapterCallManagement,\n CallAdapterDeviceManagement,\n CallAdapterSubscribers {}\n\"../../../../../calling-stateful-client/src\"\"../../../../../react-components/src\""]}