@azure/communication-react 1.9.0-alpha-202310181643 → 1.9.0-alpha-202310201641

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 (40) hide show
  1. package/dist/communication-react.d.ts +261 -225
  2. package/dist/dist-cjs/communication-react/index.js +653 -390
  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/react-components/src/components/Caption.js +1 -0
  7. package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
  8. package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +1 -1
  9. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +1 -1
  10. package/dist/dist-esm/react-components/src/components/VideoGallery/LocalScreenShare.d.ts +1 -1
  11. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.d.ts +1 -1
  12. package/dist/dist-esm/react-components/src/theming/icons.d.ts +87 -87
  13. package/dist/dist-esm/react-composites/src/composites/CallComposite/MockCallAdapter.d.ts +61 -0
  14. package/dist/dist-esm/react-composites/src/composites/CallComposite/MockCallAdapter.js +255 -0
  15. package/dist/dist-esm/react-composites/src/composites/CallComposite/MockCallAdapter.js.map +1 -0
  16. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +38 -4
  17. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  18. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -1
  19. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +1 -0
  20. package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
  21. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +1 -80
  22. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
  23. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  24. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -1
  25. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
  26. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.d.ts +84 -23
  27. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +8 -5
  28. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -1
  29. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +90 -87
  30. package/dist/dist-esm/react-composites/src/composites/common/icons.js +4 -2
  31. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  32. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +0 -79
  33. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  34. package/dist/dist-esm/react-composites/src/composites/index.d.ts +1 -2
  35. package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
  36. package/dist/tsdoc-metadata.json +1 -1
  37. package/package.json +19 -19
  38. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +0 -17
  39. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +0 -35
  40. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +0 -1
@@ -2,5 +2,5 @@
2
2
  // Copyright (c) Microsoft Corporation.
3
3
  // Licensed under the MIT License.
4
4
  // GENERATED FILE. DO NOT EDIT MANUALLY.
5
- module.exports = '1.9.0-alpha-202310181643';
5
+ module.exports = '1.9.0-alpha-202310201641';
6
6
  //# sourceMappingURL=telemetryVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.9.0-alpha-202310181643';\n"]}
1
+ {"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.9.0-alpha-202310201641';\n"]}
@@ -14,6 +14,7 @@ export const _Caption = (props) => {
14
14
  size: PersonaSize.size32,
15
15
  text: displayName,
16
16
  showOverflowTooltip: false,
17
+ imageShouldStartVisible: true,
17
18
  initialsTextColor: 'white',
18
19
  styles: {
19
20
  root: {
@@ -1 +1 @@
1
- {"version":3,"file":"Caption.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/Caption.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAY,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EACL,gBAAgB,EAChB,iCAAiC,EACjC,oBAAoB,EACpB,6BAA6B,EAC7B,aAAa,EACd,MAAM,yBAAyB,CAAC;AAgBjC;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAe,EAAE;IAC5D,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAEnE,MAAM,cAAc,GAAa;QAC/B,kBAAkB,EAAE,IAAI;QACxB,IAAI,EAAE,WAAW,CAAC,MAAM;QACxB,IAAI,EAAE,WAAW;QACjB,mBAAmB,EAAE,KAAK;QAC1B,iBAAiB,EAAE,OAAO;QAC1B,MAAM,EAAE;YACN,IAAI,EAAE;gBACJ,MAAM,EAAE,SAAS;aAClB;SACF;KACF,CAAC;IAEF,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,oBAAC,OAAO,oBAAK,cAAc,EAAI,CAAC;IAEjH,OAAO,CACL,oBAAC,KAAK,IAAC,UAAU,QAAC,aAAa,EAAC,OAAO,EAAC,eAAe,EAAC,OAAO;QAC7D,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,aAAa,IAAG,QAAQ,CAAc;QAE7D,oBAAC,KAAK,IAAC,aAAa,EAAC,OAAO,EAAC,SAAS,EAAE,iCAAiC;YACvE,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,6BAA6B;gBAClD,oBAAC,IAAI,IAAC,SAAS,EAAE,oBAAoB,IAAG,WAAW,CAAQ,CAChD;YACb,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,gBAAgB,EAAE,GAAG,EAAC,MAAM,IAChD,WAAW,CACD,CACP,CACF,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IPersona, Persona, Stack, PersonaSize, Text } from '@fluentui/react';\nimport React from 'react';\nimport { _FileUploadCardsStrings } from './FileUploadCards';\nimport { OnRenderAvatarCallback } from '../types';\nimport {\n captionClassName,\n captionsContentContainerClassName,\n displayNameClassName,\n displayNameContainerClassName,\n iconClassName\n} from './styles/Captions.style';\nimport { _CaptionsInfo } from './CaptionsBanner';\n\n/**\n * @internal\n * Props for a single line of caption.\n */\nexport interface _CaptionProps extends _CaptionsInfo {\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n}\n\n/**\n * @internal\n * A component for displaying a single line of caption\n */\nexport const _Caption = (props: _CaptionProps): JSX.Element => {\n const { displayName, userId, captionText, onRenderAvatar } = props;\n\n const personaOptions: IPersona = {\n hidePersonaDetails: true,\n size: PersonaSize.size32,\n text: displayName,\n showOverflowTooltip: false,\n initialsTextColor: 'white',\n styles: {\n root: {\n margin: '0.25rem'\n }\n }\n };\n\n const userIcon = onRenderAvatar ? onRenderAvatar(userId ?? '', personaOptions) : <Persona {...personaOptions} />;\n\n return (\n <Stack horizontal verticalAlign=\"start\" horizontalAlign=\"start\">\n <Stack.Item className={iconClassName}>{userIcon}</Stack.Item>\n\n <Stack verticalAlign=\"start\" className={captionsContentContainerClassName}>\n <Stack.Item className={displayNameContainerClassName}>\n <Text className={displayNameClassName}>{displayName}</Text>\n </Stack.Item>\n <Stack.Item className={captionClassName} dir=\"auto\">\n {captionText}\n </Stack.Item>\n </Stack>\n </Stack>\n );\n};\n"]}
1
+ {"version":3,"file":"Caption.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/Caption.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAY,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EACL,gBAAgB,EAChB,iCAAiC,EACjC,oBAAoB,EACpB,6BAA6B,EAC7B,aAAa,EACd,MAAM,yBAAyB,CAAC;AAgBjC;;;GAGG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAe,EAAE;IAC5D,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAEnE,MAAM,cAAc,GAAa;QAC/B,kBAAkB,EAAE,IAAI;QACxB,IAAI,EAAE,WAAW,CAAC,MAAM;QACxB,IAAI,EAAE,WAAW;QACjB,mBAAmB,EAAE,KAAK;QAC1B,uBAAuB,EAAE,IAAI;QAC7B,iBAAiB,EAAE,OAAO;QAC1B,MAAM,EAAE;YACN,IAAI,EAAE;gBACJ,MAAM,EAAE,SAAS;aAClB;SACF;KACF,CAAC;IAEF,MAAM,QAAQ,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,MAAM,aAAN,MAAM,cAAN,MAAM,GAAI,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,oBAAC,OAAO,oBAAK,cAAc,EAAI,CAAC;IAEjH,OAAO,CACL,oBAAC,KAAK,IAAC,UAAU,QAAC,aAAa,EAAC,OAAO,EAAC,eAAe,EAAC,OAAO;QAC7D,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,aAAa,IAAG,QAAQ,CAAc;QAE7D,oBAAC,KAAK,IAAC,aAAa,EAAC,OAAO,EAAC,SAAS,EAAE,iCAAiC;YACvE,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,6BAA6B;gBAClD,oBAAC,IAAI,IAAC,SAAS,EAAE,oBAAoB,IAAG,WAAW,CAAQ,CAChD;YACb,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,gBAAgB,EAAE,GAAG,EAAC,MAAM,IAChD,WAAW,CACD,CACP,CACF,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IPersona, Persona, Stack, PersonaSize, Text } from '@fluentui/react';\nimport React from 'react';\nimport { _FileUploadCardsStrings } from './FileUploadCards';\nimport { OnRenderAvatarCallback } from '../types';\nimport {\n captionClassName,\n captionsContentContainerClassName,\n displayNameClassName,\n displayNameContainerClassName,\n iconClassName\n} from './styles/Captions.style';\nimport { _CaptionsInfo } from './CaptionsBanner';\n\n/**\n * @internal\n * Props for a single line of caption.\n */\nexport interface _CaptionProps extends _CaptionsInfo {\n /**\n * Optional callback to override render of the avatar.\n *\n * @param userId - user Id\n */\n onRenderAvatar?: OnRenderAvatarCallback;\n}\n\n/**\n * @internal\n * A component for displaying a single line of caption\n */\nexport const _Caption = (props: _CaptionProps): JSX.Element => {\n const { displayName, userId, captionText, onRenderAvatar } = props;\n\n const personaOptions: IPersona = {\n hidePersonaDetails: true,\n size: PersonaSize.size32,\n text: displayName,\n showOverflowTooltip: false,\n imageShouldStartVisible: true,\n initialsTextColor: 'white',\n styles: {\n root: {\n margin: '0.25rem'\n }\n }\n };\n\n const userIcon = onRenderAvatar ? onRenderAvatar(userId ?? '', personaOptions) : <Persona {...personaOptions} />;\n\n return (\n <Stack horizontal verticalAlign=\"start\" horizontalAlign=\"start\">\n <Stack.Item className={iconClassName}>{userIcon}</Stack.Item>\n\n <Stack verticalAlign=\"start\" className={captionsContentContainerClassName}>\n <Stack.Item className={displayNameContainerClassName}>\n <Text className={displayNameClassName}>{displayName}</Text>\n </Stack.Item>\n <Stack.Item className={captionClassName} dir=\"auto\">\n {captionText}\n </Stack.Item>\n </Stack>\n </Stack>\n );\n};\n"]}
@@ -28,5 +28,5 @@ export declare const _LocalVideoTile: React.MemoExoticComponent<(props: {
28
28
  styles?: VideoTileStylesProps | undefined;
29
29
  personaMinSize?: number | undefined;
30
30
  raisedHand?: RaisedHand | undefined;
31
- }) => JSX.Element>;
31
+ }) => React.JSX.Element>;
32
32
  //# sourceMappingURL=LocalVideoTile.d.ts.map
@@ -32,5 +32,5 @@ export declare const _RemoteVideoTile: React.MemoExoticComponent<(props: {
32
32
  isPinned?: boolean | undefined;
33
33
  disablePinMenuItem?: boolean | undefined;
34
34
  toggleAnnouncerString?: ((announcerString: string) => void) | undefined;
35
- }) => JSX.Element>;
35
+ }) => React.JSX.Element>;
36
36
  //# sourceMappingURL=RemoteVideoTile.d.ts.map
@@ -7,5 +7,5 @@ import { VideoGalleryLocalParticipant } from '../../types';
7
7
  */
8
8
  export declare const LocalScreenShare: React.MemoExoticComponent<(props: {
9
9
  localParticipant: VideoGalleryLocalParticipant;
10
- }) => JSX.Element | null>;
10
+ }) => React.JSX.Element | null>;
11
11
  //# sourceMappingURL=LocalScreenShare.d.ts.map
@@ -15,5 +15,5 @@ export declare const RemoteScreenShare: React.MemoExoticComponent<(props: {
15
15
  isMuted?: boolean | undefined;
16
16
  isSpeaking?: boolean | undefined;
17
17
  renderElement?: HTMLElement | undefined;
18
- }) => JSX.Element>;
18
+ }) => React.JSX.Element>;
19
19
  //# sourceMappingURL=RemoteScreenShare.d.ts.map
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import React from 'react';
2
2
  /**
3
3
  * Icons used by the React components exported from this library.
4
4
  *
@@ -15,91 +15,91 @@ export declare type ComponentIcons = Record<keyof typeof DEFAULT_COMPONENT_ICONS
15
15
  * @public
16
16
  */
17
17
  export declare const DEFAULT_COMPONENT_ICONS: {
18
- ChatMessageOptions: JSX.Element;
19
- ControlButtonCameraOff: JSX.Element;
20
- ControlButtonCameraOn: JSX.Element;
21
- ControlButtonEndCall: JSX.Element;
22
- ControlButtonMicOff: JSX.Element;
23
- ControlButtonMicOn: JSX.Element;
24
- ControlButtonOptions: JSX.Element;
25
- ControlButtonParticipants: JSX.Element;
26
- ControlButtonParticipantsContextualMenuItem: JSX.Element;
27
- ControlButtonScreenShareStart: JSX.Element;
28
- ControlButtonScreenShareStop: JSX.Element;
29
- ControlButtonRaiseHand: JSX.Element;
30
- ControlButtonLowerHand: JSX.Element;
31
- RaiseHandContextualMenuItem: JSX.Element;
32
- LowerHandContextualMenuItem: JSX.Element;
33
- CancelFileUpload: JSX.Element;
34
- DownloadFile: JSX.Element;
35
- DataLossPreventionProhibited: JSX.Element;
36
- EditBoxCancel: JSX.Element;
37
- EditBoxSubmit: JSX.Element;
38
- ErrorBarCallCameraAccessDenied: JSX.Element;
39
- ErrorBarCallCameraAlreadyInUse: JSX.Element;
40
- ErrorBarCallLocalVideoFreeze: JSX.Element;
41
- ErrorBarCallMacOsCameraAccessDenied: JSX.Element;
42
- ErrorBarCallMacOsMicrophoneAccessDenied: JSX.Element;
43
- ErrorBarCallMicrophoneAccessDenied: JSX.Element;
44
- ErrorBarCallMicrophoneMutedBySystem: JSX.Element;
45
- ErrorBarCallMicrophoneUnmutedBySystem: JSX.Element;
46
- ErrorBarCallNetworkQualityLow: JSX.Element;
47
- ErrorBarCallNoMicrophoneFound: JSX.Element;
48
- ErrorBarCallNoSpeakerFound: JSX.Element;
49
- ErrorBarClear: JSX.Element;
50
- ErrorBarCallVideoRecoveredBySystem: JSX.Element;
51
- ErrorBarCallVideoStoppedBySystem: JSX.Element;
52
- HorizontalGalleryLeftButton: JSX.Element;
53
- HorizontalGalleryRightButton: JSX.Element;
54
- MessageDelivered: JSX.Element;
55
- MessageEdit: JSX.Element;
56
- MessageFailed: JSX.Element;
57
- MessageRemove: JSX.Element;
58
- MessageResend: JSX.Element;
59
- MessageSeen: JSX.Element;
60
- MessageSending: JSX.Element;
61
- OptionsCamera: JSX.Element;
62
- OptionsMic: JSX.Element;
63
- OptionsSpeaker: JSX.Element;
64
- ParticipantItemMicOff: JSX.Element;
65
- ParticipantItemOptions: JSX.Element;
66
- ParticipantItemOptionsHovered: JSX.Element;
67
- ParticipantItemScreenShareStart: JSX.Element;
68
- HoldCallContextualMenuItem: JSX.Element;
69
- HoldCallButton: JSX.Element;
70
- ResumeCall: JSX.Element;
71
- SendBoxSend: JSX.Element;
72
- SendBoxSendHovered: JSX.Element;
73
- VideoTileMicOff: JSX.Element;
74
- DialpadBackspace: JSX.Element;
75
- SitePermissionsSparkle: JSX.Element;
76
- SitePermissionCamera: JSX.Element;
77
- SitePermissionMic: JSX.Element;
78
- SitePermissionCameraDenied: JSX.Element;
79
- SitePermissionMicDenied: JSX.Element;
80
- UnsupportedEnvironmentWarning: JSX.Element;
81
- BrowserPermissionDeniedError: JSX.Element;
82
- VideoTilePinned: JSX.Element;
83
- VideoTileMoreOptions: JSX.Element;
84
- VideoTileScaleFit: JSX.Element;
85
- VideoTileScaleFill: JSX.Element;
86
- PinParticipant: JSX.Element;
87
- UnpinParticipant: JSX.Element;
88
- SplitButtonPrimaryActionCameraOn: JSX.Element;
89
- SplitButtonPrimaryActionCameraOff: JSX.Element;
90
- SplitButtonPrimaryActionMicUnmuted: JSX.Element;
91
- SplitButtonPrimaryActionMicMuted: JSX.Element;
92
- VerticalGalleryLeftButton: JSX.Element;
93
- VerticalGalleryRightButton: JSX.Element;
94
- ControlButtonVideoEffectsOption: JSX.Element;
95
- ConfigurationScreenVideoEffectsButton: JSX.Element;
96
- CaptionsIcon: JSX.Element;
97
- CaptionsOffIcon: JSX.Element;
98
- CaptionsSettingsIcon: JSX.Element;
99
- ChangeSpokenLanguageIcon: JSX.Element;
100
- ChangeCaptionLanguageIcon: JSX.Element;
101
- ContextMenuCameraIcon: JSX.Element;
102
- ContextMenuMicIcon: JSX.Element;
103
- ContextMenuSpeakerIcon: JSX.Element;
18
+ ChatMessageOptions: React.JSX.Element;
19
+ ControlButtonCameraOff: React.JSX.Element;
20
+ ControlButtonCameraOn: React.JSX.Element;
21
+ ControlButtonEndCall: React.JSX.Element;
22
+ ControlButtonMicOff: React.JSX.Element;
23
+ ControlButtonMicOn: React.JSX.Element;
24
+ ControlButtonOptions: React.JSX.Element;
25
+ ControlButtonParticipants: React.JSX.Element;
26
+ ControlButtonParticipantsContextualMenuItem: React.JSX.Element;
27
+ ControlButtonScreenShareStart: React.JSX.Element;
28
+ ControlButtonScreenShareStop: React.JSX.Element;
29
+ ControlButtonRaiseHand: React.JSX.Element;
30
+ ControlButtonLowerHand: React.JSX.Element;
31
+ RaiseHandContextualMenuItem: React.JSX.Element;
32
+ LowerHandContextualMenuItem: React.JSX.Element;
33
+ CancelFileUpload: React.JSX.Element;
34
+ DownloadFile: React.JSX.Element;
35
+ DataLossPreventionProhibited: React.JSX.Element;
36
+ EditBoxCancel: React.JSX.Element;
37
+ EditBoxSubmit: React.JSX.Element;
38
+ ErrorBarCallCameraAccessDenied: React.JSX.Element;
39
+ ErrorBarCallCameraAlreadyInUse: React.JSX.Element;
40
+ ErrorBarCallLocalVideoFreeze: React.JSX.Element;
41
+ ErrorBarCallMacOsCameraAccessDenied: React.JSX.Element;
42
+ ErrorBarCallMacOsMicrophoneAccessDenied: React.JSX.Element;
43
+ ErrorBarCallMicrophoneAccessDenied: React.JSX.Element;
44
+ ErrorBarCallMicrophoneMutedBySystem: React.JSX.Element;
45
+ ErrorBarCallMicrophoneUnmutedBySystem: React.JSX.Element;
46
+ ErrorBarCallNetworkQualityLow: React.JSX.Element;
47
+ ErrorBarCallNoMicrophoneFound: React.JSX.Element;
48
+ ErrorBarCallNoSpeakerFound: React.JSX.Element;
49
+ ErrorBarClear: React.JSX.Element;
50
+ ErrorBarCallVideoRecoveredBySystem: React.JSX.Element;
51
+ ErrorBarCallVideoStoppedBySystem: React.JSX.Element;
52
+ HorizontalGalleryLeftButton: React.JSX.Element;
53
+ HorizontalGalleryRightButton: React.JSX.Element;
54
+ MessageDelivered: React.JSX.Element;
55
+ MessageEdit: React.JSX.Element;
56
+ MessageFailed: React.JSX.Element;
57
+ MessageRemove: React.JSX.Element;
58
+ MessageResend: React.JSX.Element;
59
+ MessageSeen: React.JSX.Element;
60
+ MessageSending: React.JSX.Element;
61
+ OptionsCamera: React.JSX.Element;
62
+ OptionsMic: React.JSX.Element;
63
+ OptionsSpeaker: React.JSX.Element;
64
+ ParticipantItemMicOff: React.JSX.Element;
65
+ ParticipantItemOptions: React.JSX.Element;
66
+ ParticipantItemOptionsHovered: React.JSX.Element;
67
+ ParticipantItemScreenShareStart: React.JSX.Element;
68
+ HoldCallContextualMenuItem: React.JSX.Element;
69
+ HoldCallButton: React.JSX.Element;
70
+ ResumeCall: React.JSX.Element;
71
+ SendBoxSend: React.JSX.Element;
72
+ SendBoxSendHovered: React.JSX.Element;
73
+ VideoTileMicOff: React.JSX.Element;
74
+ DialpadBackspace: React.JSX.Element;
75
+ SitePermissionsSparkle: React.JSX.Element;
76
+ SitePermissionCamera: React.JSX.Element;
77
+ SitePermissionMic: React.JSX.Element;
78
+ SitePermissionCameraDenied: React.JSX.Element;
79
+ SitePermissionMicDenied: React.JSX.Element;
80
+ UnsupportedEnvironmentWarning: React.JSX.Element;
81
+ BrowserPermissionDeniedError: React.JSX.Element;
82
+ VideoTilePinned: React.JSX.Element;
83
+ VideoTileMoreOptions: React.JSX.Element;
84
+ VideoTileScaleFit: React.JSX.Element;
85
+ VideoTileScaleFill: React.JSX.Element;
86
+ PinParticipant: React.JSX.Element;
87
+ UnpinParticipant: React.JSX.Element;
88
+ SplitButtonPrimaryActionCameraOn: React.JSX.Element;
89
+ SplitButtonPrimaryActionCameraOff: React.JSX.Element;
90
+ SplitButtonPrimaryActionMicUnmuted: React.JSX.Element;
91
+ SplitButtonPrimaryActionMicMuted: React.JSX.Element;
92
+ VerticalGalleryLeftButton: React.JSX.Element;
93
+ VerticalGalleryRightButton: React.JSX.Element;
94
+ ControlButtonVideoEffectsOption: React.JSX.Element;
95
+ ConfigurationScreenVideoEffectsButton: React.JSX.Element;
96
+ CaptionsIcon: React.JSX.Element;
97
+ CaptionsOffIcon: React.JSX.Element;
98
+ CaptionsSettingsIcon: React.JSX.Element;
99
+ ChangeSpokenLanguageIcon: React.JSX.Element;
100
+ ChangeCaptionLanguageIcon: React.JSX.Element;
101
+ ContextMenuCameraIcon: React.JSX.Element;
102
+ ContextMenuMicIcon: React.JSX.Element;
103
+ ContextMenuSpeakerIcon: React.JSX.Element;
104
104
  };
105
105
  //# sourceMappingURL=icons.d.ts.map
@@ -0,0 +1,61 @@
1
+ import { AudioDeviceInfo, Call, DtmfTone, ParticipantRole, PermissionConstraints, VideoDeviceInfo } from '@azure/communication-calling';
2
+ import { EnvironmentInfo } from '@azure/communication-calling';
3
+ import type { CallAdapter, CallAdapterState } from './adapter';
4
+ /**
5
+ * Temporary copy of the packages/react-composites/tests/browser/call/app/mocks/MockCallAdapter.ts
6
+ * @internal
7
+ */
8
+ export declare class _MockCallAdapter implements CallAdapter {
9
+ constructor(testState: {
10
+ askDevicePermission?: (constrain: PermissionConstraints) => Promise<void>;
11
+ localParticipantRole?: ParticipantRole;
12
+ });
13
+ state: CallAdapterState;
14
+ private emitter;
15
+ setState(state: CallAdapterState): void;
16
+ addParticipant(): Promise<void>;
17
+ onStateChange(handler: (state: CallAdapterState) => void): void;
18
+ offStateChange(handler: (state: CallAdapterState) => void): void;
19
+ allowUnsupportedBrowserVersion(): void;
20
+ getState(): CallAdapterState;
21
+ dispose(): void;
22
+ joinCall(): Call | undefined;
23
+ leaveCall(): Promise<void>;
24
+ startCamera(): Promise<void>;
25
+ stopCamera(): Promise<void>;
26
+ mute(): Promise<void>;
27
+ unmute(): Promise<void>;
28
+ startCall(): Call | undefined;
29
+ holdCall(): Promise<void>;
30
+ resumeCall(): Promise<void>;
31
+ startScreenShare(): Promise<void>;
32
+ stopScreenShare(): Promise<void>;
33
+ raiseHand(): Promise<void>;
34
+ lowerHand(): Promise<void>;
35
+ removeParticipant(): Promise<void>;
36
+ createStreamView(): Promise<void>;
37
+ disposeStreamView(): Promise<void>;
38
+ disposeScreenShareStreamView(): Promise<void>;
39
+ disposeLocalVideoStreamView(): Promise<void>;
40
+ disposeRemoteVideoStreamView(): Promise<void>;
41
+ askDevicePermission(constrain: PermissionConstraints): Promise<void>;
42
+ queryCameras(): Promise<VideoDeviceInfo[]>;
43
+ queryMicrophones(): Promise<AudioDeviceInfo[]>;
44
+ querySpeakers(): Promise<AudioDeviceInfo[]>;
45
+ setCamera(): Promise<void>;
46
+ setMicrophone(): Promise<void>;
47
+ setSpeaker(): Promise<void>;
48
+ sendDtmfTone(dtmfTone: DtmfTone): Promise<void>;
49
+ on(): void;
50
+ off(): void;
51
+ getEnvironmentInfo(): Promise<EnvironmentInfo>;
52
+ startCaptions(): Promise<void>;
53
+ setCaptionLanguage(): Promise<void>;
54
+ setSpokenLanguage(): Promise<void>;
55
+ stopCaptions(): Promise<void>;
56
+ startVideoBackgroundEffect(): Promise<void>;
57
+ stopVideoBackgroundEffects(): Promise<void>;
58
+ updateBackgroundPickerImages(): void;
59
+ updateSelectedVideoBackgroundEffect(): void;
60
+ }
61
+ //# sourceMappingURL=MockCallAdapter.d.ts.map
@@ -0,0 +1,255 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
5
+ return new (P || (P = Promise))(function (resolve, reject) {
6
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
7
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
9
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
10
+ });
11
+ };
12
+ /* @conditional-compile-remove(teams-identity-support) */
13
+ import { CallKind } from '@azure/communication-calling';
14
+ import { EventEmitter } from 'events';
15
+ /**
16
+ * Temporary copy of the packages/react-composites/tests/browser/call/app/mocks/MockCallAdapter.ts
17
+ * @internal
18
+ */
19
+ // TODO: Remove this simplified copy of the MockCallAdapter when the original MockCallAdapter is moved to fake-backends package and can be imported
20
+ export class _MockCallAdapter {
21
+ constructor(testState) {
22
+ this.emitter = new EventEmitter();
23
+ this.state = Object.assign({}, createDefaultCallAdapterState(/* @conditional-compile-remove(rooms) */ testState.localParticipantRole));
24
+ if (testState.askDevicePermission) {
25
+ this.askDevicePermission = testState.askDevicePermission;
26
+ }
27
+ }
28
+ setState(state) {
29
+ this.state = state;
30
+ this.emitter.emit('stateChanged', state);
31
+ }
32
+ addParticipant() {
33
+ throw Error('addParticipant not implemented');
34
+ }
35
+ onStateChange(handler) {
36
+ this.emitter.addListener('stateChanged', handler);
37
+ }
38
+ offStateChange(handler) {
39
+ this.emitter.removeListener('stateChanged', handler);
40
+ }
41
+ allowUnsupportedBrowserVersion() {
42
+ throw Error('allowWithUnsupportedBrowserVersion not implemented');
43
+ }
44
+ getState() {
45
+ return this.state;
46
+ }
47
+ dispose() {
48
+ throw Error('dispose not implemented');
49
+ }
50
+ joinCall() {
51
+ throw Error('joinCall not implemented');
52
+ }
53
+ leaveCall() {
54
+ throw Error('leaveCall not implemented');
55
+ }
56
+ startCamera() {
57
+ throw Error('leaveCall not implemented');
58
+ }
59
+ stopCamera() {
60
+ throw Error('stopCamera not implemented');
61
+ }
62
+ mute() {
63
+ throw Error('mute not implemented');
64
+ }
65
+ unmute() {
66
+ throw Error('unmute not implemented');
67
+ }
68
+ startCall() {
69
+ throw Error('startCall not implemented');
70
+ }
71
+ holdCall() {
72
+ return Promise.resolve();
73
+ }
74
+ resumeCall() {
75
+ return Promise.resolve();
76
+ }
77
+ startScreenShare() {
78
+ throw Error('startScreenShare not implemented');
79
+ }
80
+ stopScreenShare() {
81
+ throw Error('stopScreenShare not implemented');
82
+ }
83
+ /* @conditional-compile-remove(raise-hand) */
84
+ raiseHand() {
85
+ throw Error('raiseHand not implemented');
86
+ }
87
+ /* @conditional-compile-remove(raise-hand) */
88
+ lowerHand() {
89
+ throw Error('lowerHand not implemented');
90
+ }
91
+ removeParticipant() {
92
+ throw Error('removeParticipant not implemented');
93
+ }
94
+ createStreamView() {
95
+ throw Error('createStreamView not implemented');
96
+ }
97
+ disposeStreamView() {
98
+ return Promise.resolve();
99
+ }
100
+ disposeScreenShareStreamView() {
101
+ return Promise.resolve();
102
+ }
103
+ disposeLocalVideoStreamView() {
104
+ return Promise.resolve();
105
+ }
106
+ disposeRemoteVideoStreamView() {
107
+ return Promise.resolve();
108
+ }
109
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
110
+ askDevicePermission(constrain) {
111
+ throw Error('askDevicePermission not implemented');
112
+ }
113
+ queryCameras() {
114
+ return __awaiter(this, void 0, void 0, function* () {
115
+ return [];
116
+ });
117
+ }
118
+ queryMicrophones() {
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ return [];
121
+ });
122
+ }
123
+ querySpeakers() {
124
+ return __awaiter(this, void 0, void 0, function* () {
125
+ return [];
126
+ });
127
+ }
128
+ setCamera() {
129
+ throw Error('setCamera not implemented');
130
+ }
131
+ setMicrophone() {
132
+ throw Error('setMicrophone not implemented');
133
+ }
134
+ setSpeaker() {
135
+ throw Error('setSpeaker not implemented');
136
+ }
137
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
138
+ sendDtmfTone(dtmfTone) {
139
+ throw Error('sendDtmfTone not implemented');
140
+ }
141
+ on() {
142
+ throw Error('on not implemented');
143
+ }
144
+ off() {
145
+ throw Error('off not implemented');
146
+ }
147
+ /* @conditional-compile-remove(PSTN-calls) */
148
+ getEnvironmentInfo() {
149
+ throw Error('getEnvironmentInfo not implemented');
150
+ }
151
+ /* @conditional-compile-remove(close-captions) */
152
+ startCaptions() {
153
+ throw Error('start captions not implemented');
154
+ }
155
+ /* @conditional-compile-remove(close-captions) */
156
+ setCaptionLanguage() {
157
+ throw Error('setCaptionLanguage not implemented');
158
+ }
159
+ /* @conditional-compile-remove(close-captions) */
160
+ setSpokenLanguage() {
161
+ throw Error('setSpokenLanguage not implemented');
162
+ }
163
+ /* @conditional-compile-remove(close-captions) */
164
+ stopCaptions() {
165
+ throw Error('stopCaptions not implemented');
166
+ }
167
+ /* @conditional-compile-remove(video-background-effects) */
168
+ startVideoBackgroundEffect() {
169
+ throw new Error('startVideoBackgroundEffect not implemented.');
170
+ }
171
+ /* @conditional-compile-remove(video-background-effects) */
172
+ stopVideoBackgroundEffects() {
173
+ throw new Error('stopVideoBackgroundEffects not implemented.');
174
+ }
175
+ /* @conditional-compile-remove(video-background-effects) */
176
+ updateBackgroundPickerImages() {
177
+ throw new Error('updateBackgroundPickerImages not implemented.');
178
+ }
179
+ /* @conditional-compile-remove(video-background-effects) */
180
+ updateSelectedVideoBackgroundEffect() {
181
+ throw new Error('updateSelectedVideoBackgroundEffect not implemented.');
182
+ }
183
+ }
184
+ /**
185
+ * Default call adapter state that the {@link _MockCallAdapter} class is initialized with an optional role.
186
+ */
187
+ const createDefaultCallAdapterState = (role) => {
188
+ return {
189
+ displayName: 'Agnes Thompson',
190
+ isLocalPreviewMicrophoneEnabled: true,
191
+ page: 'call',
192
+ call: {
193
+ id: 'call1',
194
+ /* @conditional-compile-remove(teams-identity-support) */
195
+ kind: CallKind.Call,
196
+ callerInfo: { displayName: 'caller', identifier: { kind: 'communicationUser', communicationUserId: '1' } },
197
+ direction: 'Incoming',
198
+ transcription: { isTranscriptionActive: false },
199
+ recording: { isRecordingActive: false },
200
+ startTime: new Date(500000000000),
201
+ endTime: new Date(500000000000),
202
+ diagnostics: { network: { latest: {} }, media: { latest: {} } },
203
+ state: 'Connected',
204
+ localVideoStreams: [],
205
+ isMuted: false,
206
+ isScreenSharingOn: false,
207
+ remoteParticipants: {},
208
+ remoteParticipantsEnded: {},
209
+ /* @conditional-compile-remove(raise-hand) */
210
+ raiseHand: { raisedHands: [] },
211
+ /* @conditional-compile-remove(rooms) */
212
+ role,
213
+ /* @conditional-compile-remove(close-captions) */
214
+ captionsFeature: {
215
+ captions: [],
216
+ supportedSpokenLanguages: [],
217
+ supportedCaptionLanguages: [],
218
+ currentCaptionLanguage: '',
219
+ currentSpokenLanguage: '',
220
+ isCaptionsFeatureActive: false,
221
+ startCaptionsInProgress: false
222
+ },
223
+ /* @conditional-compile-remove(call-transfer) */
224
+ transfer: {
225
+ acceptedTransfers: {}
226
+ },
227
+ /* @conditional-compile-remove(optimal-video-count) */
228
+ optimalVideoCount: {
229
+ maxRemoteVideoStreams: 4
230
+ }
231
+ },
232
+ userId: { kind: 'communicationUser', communicationUserId: '1' },
233
+ devices: {
234
+ isSpeakerSelectionAvailable: true,
235
+ selectedCamera: { id: 'camera1', name: '1st Camera', deviceType: 'UsbCamera' },
236
+ cameras: [{ id: 'camera1', name: '1st Camera', deviceType: 'UsbCamera' }],
237
+ selectedMicrophone: {
238
+ id: 'microphone1',
239
+ name: '1st Microphone',
240
+ deviceType: 'Microphone',
241
+ isSystemDefault: true
242
+ },
243
+ microphones: [{ id: 'microphone1', name: '1st Microphone', deviceType: 'Microphone', isSystemDefault: true }],
244
+ selectedSpeaker: { id: 'speaker1', name: '1st Speaker', deviceType: 'Speaker', isSystemDefault: true },
245
+ speakers: [{ id: 'speaker1', name: '1st Speaker', deviceType: 'Speaker', isSystemDefault: true }],
246
+ unparentedViews: [],
247
+ deviceAccess: { video: true, audio: true }
248
+ },
249
+ isTeamsCall: false,
250
+ /* @conditional-compile-remove(rooms) */
251
+ isRoomsCall: false,
252
+ latestErrors: {}
253
+ };
254
+ };
255
+ //# sourceMappingURL=MockCallAdapter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MockCallAdapter.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/MockCallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAUlC,yDAAyD;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGxD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGtC;;;GAGG;AACH,mJAAmJ;AACnJ,MAAM,OAAO,gBAAgB;IAC3B,YAAY,SAGX;QAYO,YAAO,GAAG,IAAI,YAAY,EAAE,CAAC;QAXnC,IAAI,CAAC,KAAK,qBACL,6BAA6B,CAAC,wCAAwC,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAC1G,CAAC;QAEF,IAAI,SAAS,CAAC,mBAAmB,EAAE;YACjC,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC,mBAAmB,CAAC;SAC1D;IACH,CAAC;IAMD,QAAQ,CAAC,KAAuB;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,cAAc;QACZ,MAAM,KAAK,CAAC,gCAAgC,CAAC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EAAE,aAAa;gBACjB,IAAI,EAAE,gBAAgB;gBACtB,UAAU,EAAE,YAAY;gBACxB,eAAe,EAAE,IAAI;aACtB;YACD,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;YAC7G,eAAe,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE;YACtG,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;YACjG,eAAe,EAAE,EAAE;YACnB,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;SAC3C;QACD,WAAW,EAAE,KAAK;QAClB,wCAAwC;QACxC,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;KACjB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n AudioDeviceInfo,\n Call,\n DtmfTone,\n ParticipantRole,\n PermissionConstraints,\n VideoDeviceInfo\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { CallKind } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport { EventEmitter } from 'events';\nimport type { CallAdapter, CallAdapterState } from './adapter';\n\n/**\n * Temporary copy of the packages/react-composites/tests/browser/call/app/mocks/MockCallAdapter.ts\n * @internal\n */\n// TODO: Remove this simplified copy of the MockCallAdapter when the original MockCallAdapter is moved to fake-backends package and can be imported\nexport class _MockCallAdapter implements CallAdapter {\n constructor(testState: {\n askDevicePermission?: (constrain: PermissionConstraints) => Promise<void>;\n localParticipantRole?: ParticipantRole;\n }) {\n this.state = {\n ...createDefaultCallAdapterState(/* @conditional-compile-remove(rooms) */ testState.localParticipantRole)\n };\n\n if (testState.askDevicePermission) {\n this.askDevicePermission = testState.askDevicePermission;\n }\n }\n\n state: CallAdapterState;\n\n private emitter = new EventEmitter();\n\n setState(state: CallAdapterState): void {\n this.state = state;\n this.emitter.emit('stateChanged', state);\n }\n\n addParticipant(): Promise<void> {\n throw Error('addParticipant not implemented');\n }\n onStateChange(handler: (state: CallAdapterState) => void): void {\n this.emitter.addListener('stateChanged', handler);\n }\n offStateChange(handler: (state: CallAdapterState) => void): void {\n this.emitter.removeListener('stateChanged', handler);\n }\n allowUnsupportedBrowserVersion(): void {\n throw Error('allowWithUnsupportedBrowserVersion not implemented');\n }\n getState(): CallAdapterState {\n return this.state;\n }\n dispose(): void {\n throw Error('dispose not implemented');\n }\n joinCall(): Call | undefined {\n throw Error('joinCall not implemented');\n }\n leaveCall(): Promise<void> {\n throw Error('leaveCall not implemented');\n }\n startCamera(): Promise<void> {\n throw Error('leaveCall not implemented');\n }\n stopCamera(): Promise<void> {\n throw Error('stopCamera not implemented');\n }\n mute(): Promise<void> {\n throw Error('mute not implemented');\n }\n unmute(): Promise<void> {\n throw Error('unmute not implemented');\n }\n startCall(): Call | undefined {\n throw Error('startCall not implemented');\n }\n holdCall(): Promise<void> {\n return Promise.resolve();\n }\n resumeCall(): Promise<void> {\n return Promise.resolve();\n }\n startScreenShare(): Promise<void> {\n throw Error('startScreenShare not implemented');\n }\n stopScreenShare(): Promise<void> {\n throw Error('stopScreenShare not implemented');\n }\n /* @conditional-compile-remove(raise-hand) */\n raiseHand(): Promise<void> {\n throw Error('raiseHand not implemented');\n }\n /* @conditional-compile-remove(raise-hand) */\n lowerHand(): Promise<void> {\n throw Error('lowerHand not implemented');\n }\n removeParticipant(): Promise<void> {\n throw Error('removeParticipant not implemented');\n }\n createStreamView(): Promise<void> {\n throw Error('createStreamView not implemented');\n }\n disposeStreamView(): Promise<void> {\n return Promise.resolve();\n }\n disposeScreenShareStreamView(): Promise<void> {\n return Promise.resolve();\n }\n disposeLocalVideoStreamView(): Promise<void> {\n return Promise.resolve();\n }\n disposeRemoteVideoStreamView(): Promise<void> {\n return Promise.resolve();\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n askDevicePermission(constrain: PermissionConstraints): Promise<void> {\n throw Error('askDevicePermission not implemented');\n }\n async queryCameras(): Promise<VideoDeviceInfo[]> {\n return [];\n }\n async queryMicrophones(): Promise<AudioDeviceInfo[]> {\n return [];\n }\n async querySpeakers(): Promise<AudioDeviceInfo[]> {\n return [];\n }\n setCamera(): Promise<void> {\n throw Error('setCamera not implemented');\n }\n setMicrophone(): Promise<void> {\n throw Error('setMicrophone not implemented');\n }\n setSpeaker(): Promise<void> {\n throw Error('setSpeaker not implemented');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n sendDtmfTone(dtmfTone: DtmfTone): Promise<void> {\n throw Error('sendDtmfTone not implemented');\n }\n on(): void {\n throw Error('on not implemented');\n }\n off(): void {\n throw Error('off not implemented');\n }\n /* @conditional-compile-remove(PSTN-calls) */\n getEnvironmentInfo(): Promise<EnvironmentInfo> {\n throw Error('getEnvironmentInfo not implemented');\n }\n\n /* @conditional-compile-remove(close-captions) */\n startCaptions(): Promise<void> {\n throw Error('start captions not implemented');\n }\n\n /* @conditional-compile-remove(close-captions) */\n setCaptionLanguage(): Promise<void> {\n throw Error('setCaptionLanguage not implemented');\n }\n\n /* @conditional-compile-remove(close-captions) */\n setSpokenLanguage(): Promise<void> {\n throw Error('setSpokenLanguage not implemented');\n }\n\n /* @conditional-compile-remove(close-captions) */\n stopCaptions(): Promise<void> {\n throw Error('stopCaptions not implemented');\n }\n /* @conditional-compile-remove(video-background-effects) */\n startVideoBackgroundEffect(): Promise<void> {\n throw new Error('startVideoBackgroundEffect not implemented.');\n }\n\n /* @conditional-compile-remove(video-background-effects) */\n stopVideoBackgroundEffects(): Promise<void> {\n throw new Error('stopVideoBackgroundEffects not implemented.');\n }\n /* @conditional-compile-remove(video-background-effects) */\n updateBackgroundPickerImages(): void {\n throw new Error('updateBackgroundPickerImages not implemented.');\n }\n /* @conditional-compile-remove(video-background-effects) */\n public updateSelectedVideoBackgroundEffect(): void {\n throw new Error('updateSelectedVideoBackgroundEffect not implemented.');\n }\n}\n\n/**\n * Default call adapter state that the {@link _MockCallAdapter} class is initialized with an optional role.\n */\nconst createDefaultCallAdapterState = (role?: ParticipantRole): CallAdapterState => {\n return {\n displayName: 'Agnes Thompson',\n isLocalPreviewMicrophoneEnabled: true,\n page: 'call',\n call: {\n id: 'call1',\n /* @conditional-compile-remove(teams-identity-support) */\n kind: CallKind.Call,\n callerInfo: { displayName: 'caller', identifier: { kind: 'communicationUser', communicationUserId: '1' } },\n direction: 'Incoming',\n transcription: { isTranscriptionActive: false },\n recording: { isRecordingActive: false },\n startTime: new Date(500000000000),\n endTime: new Date(500000000000),\n diagnostics: { network: { latest: {} }, media: { latest: {} } },\n state: 'Connected',\n localVideoStreams: [],\n isMuted: false,\n isScreenSharingOn: false,\n remoteParticipants: {},\n remoteParticipantsEnded: {},\n /* @conditional-compile-remove(raise-hand) */\n raiseHand: { raisedHands: [] },\n /* @conditional-compile-remove(rooms) */\n role,\n /* @conditional-compile-remove(close-captions) */\n captionsFeature: {\n captions: [],\n supportedSpokenLanguages: [],\n supportedCaptionLanguages: [],\n currentCaptionLanguage: '',\n currentSpokenLanguage: '',\n isCaptionsFeatureActive: false,\n startCaptionsInProgress: false\n },\n /* @conditional-compile-remove(call-transfer) */\n transfer: {\n acceptedTransfers: {}\n },\n /* @conditional-compile-remove(optimal-video-count) */\n optimalVideoCount: {\n maxRemoteVideoStreams: 4\n }\n },\n userId: { kind: 'communicationUser', communicationUserId: '1' },\n devices: {\n isSpeakerSelectionAvailable: true,\n selectedCamera: { id: 'camera1', name: '1st Camera', deviceType: 'UsbCamera' },\n cameras: [{ id: 'camera1', name: '1st Camera', deviceType: 'UsbCamera' }],\n selectedMicrophone: {\n id: 'microphone1',\n name: '1st Microphone',\n deviceType: 'Microphone',\n isSystemDefault: true\n },\n microphones: [{ id: 'microphone1', name: '1st Microphone', deviceType: 'Microphone', isSystemDefault: true }],\n selectedSpeaker: { id: 'speaker1', name: '1st Speaker', deviceType: 'Speaker', isSystemDefault: true },\n speakers: [{ id: 'speaker1', name: '1st Speaker', deviceType: 'Speaker', isSystemDefault: true }],\n unparentedViews: [],\n deviceAccess: { video: true, audio: true }\n },\n isTeamsCall: false,\n /* @conditional-compile-remove(rooms) */\n isRoomsCall: false,\n latestErrors: {}\n };\n};\n"]}