@azure/communication-react 1.24.0-alpha-202501291646 → 1.24.0-alpha-202501300015
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.
- package/dist/communication-react.d.ts +112 -5
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-Cq3nUCjN.js → ChatMessageComponentAsRichTextEditBox-B7usiRRs.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-Cq3nUCjN.js.map → ChatMessageComponentAsRichTextEditBox-B7usiRRs.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DX7BSYyk.js → RichTextSendBoxWrapper-BUOpEC0L.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DX7BSYyk.js.map → RichTextSendBoxWrapper-BUOpEC0L.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-8zA739Rz.js → index-BYO_RzRh.js} +490 -99
- package/dist/dist-cjs/communication-react/index-BYO_RzRh.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +11 -4
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +12 -2
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +9 -0
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +102 -5
- package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +1 -0
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +8 -17
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +7 -21
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +3 -11
- package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +2 -3
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +0 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +1 -9
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +1 -7
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +61 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +5 -0
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +110 -6
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +9 -3
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/Converter.d.ts +6 -0
- package/dist/dist-esm/calling-stateful-client/src/Converter.js +12 -0
- package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.d.ts +16 -0
- package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js +25 -0
- package/dist/dist-esm/calling-stateful-client/src/RealTimeTextSubscriber.js.map +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.d.ts +1 -0
- package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +4 -4
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenuItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/StartRealTimeTextButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +20 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +22 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +23 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +12 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +16 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +10 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +6 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js +3 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.d.ts +12 -0
- package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.js +23 -0
- package/dist/dist-esm/react-composites/src/composites/common/CallingRealTimeTextModal.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +27 -2
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +48 -0
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +36 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +1 -0
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/index-8zA739Rz.js.map +0 -1
@@ -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,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.24.0-alpha-
|
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,2BAA2B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.24.0-alpha-202501300015';\n"]}
|
@@ -6,12 +6,11 @@ import { CallClientState, DeviceManagerState, RemoteParticipantState, LocalVideo
|
|
6
6
|
import { TeamsIncomingCallState } from "../../calling-stateful-client/src";
|
7
7
|
import { ReactionState } from "../../calling-stateful-client/src";
|
8
8
|
import { CaptionsInfo } from "../../calling-stateful-client/src";
|
9
|
-
import { CaptionsKind } from '@azure/communication-calling';
|
9
|
+
import { CaptionsKind, CapabilitiesChangeInfo } from '@azure/communication-calling';
|
10
|
+
import { RealTimeTextInfo } from "../../calling-stateful-client/src";
|
10
11
|
import { RaisedHandState } from "../../calling-stateful-client/src";
|
11
12
|
import { SupportedCaptionLanguage, SupportedSpokenLanguage } from "../../react-components/src";
|
12
|
-
import { ConferencePhoneInfo } from "../../calling-stateful-client/src";
|
13
|
-
import { CallNotifications } from "../../calling-stateful-client/src";
|
14
|
-
import { CapabilitiesChangeInfo } from '@azure/communication-calling';
|
13
|
+
import { ConferencePhoneInfo, CallNotifications } from "../../calling-stateful-client/src";
|
15
14
|
import { TogetherModeCallFeatureState } from "../../calling-stateful-client/src";
|
16
15
|
/**
|
17
16
|
* Common props used to reference calling declarative client state.
|
@@ -149,6 +148,14 @@ export declare const getIncomingCalls: (state: CallClientState) => IncomingCallS
|
|
149
148
|
export declare const getRemovedIncomingCalls: (state: CallClientState) => IncomingCallState[] | TeamsIncomingCallState[];
|
150
149
|
/** @private */
|
151
150
|
export declare const getAssignedBreakoutRoom: (state: CallClientState, props: CallingBaseSelectorProps) => BreakoutRoom | undefined;
|
151
|
+
/** @private */
|
152
|
+
export declare const getRealTimeTextStatus: (state: CallClientState, props: CallingBaseSelectorProps) => boolean | undefined;
|
153
|
+
/** @private */
|
154
|
+
export declare const getRealTimeText: (state: CallClientState, props: CallingBaseSelectorProps) => {
|
155
|
+
completedMessages?: RealTimeTextInfo[];
|
156
|
+
currentInProgress?: RealTimeTextInfo[];
|
157
|
+
myInProgress?: RealTimeTextInfo;
|
158
|
+
} | undefined;
|
152
159
|
/**
|
153
160
|
* @private
|
154
161
|
*/
|
@@ -21,7 +21,6 @@ export const isHideAttendeeNamesEnabled = (state, props) => {
|
|
21
21
|
* @private
|
22
22
|
*/
|
23
23
|
export const getCapabilities = (state, props) => { var _a, _b; return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.capabilitiesFeature) === null || _b === void 0 ? void 0 : _b.capabilities; };
|
24
|
-
/* @conditional-compile-remove(media-access) */
|
25
24
|
/**
|
26
25
|
* @private
|
27
26
|
*/
|
@@ -97,7 +96,6 @@ export const getIdentifier = (state) => toFlatCommunicationIdentifier(state.user
|
|
97
96
|
* @private
|
98
97
|
*/
|
99
98
|
export const getLatestErrors = (state) => state.latestErrors;
|
100
|
-
/* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */
|
101
99
|
/**
|
102
100
|
* @private
|
103
101
|
*/
|
@@ -190,6 +188,18 @@ export const getAssignedBreakoutRoom = (state, props) => {
|
|
190
188
|
var _a, _b;
|
191
189
|
return (_b = (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.breakoutRooms) === null || _b === void 0 ? void 0 : _b.assignedBreakoutRoom;
|
192
190
|
};
|
191
|
+
/* @conditional-compile-remove(rtt) */
|
192
|
+
/** @private */
|
193
|
+
export const getRealTimeTextStatus = (state, props) => {
|
194
|
+
var _a;
|
195
|
+
return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.realTimeTextFeature.isRealTimeTextFeatureActive;
|
196
|
+
};
|
197
|
+
/* @conditional-compile-remove(rtt) */
|
198
|
+
/** @private */
|
199
|
+
export const getRealTimeText = (state, props) => {
|
200
|
+
var _a;
|
201
|
+
return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.realTimeTextFeature.realTimeTexts;
|
202
|
+
};
|
193
203
|
/* @conditional-compile-remove(together-mode) */
|
194
204
|
/**
|
195
205
|
* @private
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"baseSelectors.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/baseSelectors.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAkCxE;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAsB,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC;AAEpG;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAsB,EAAE,KAA+B,EAA+B,EAAE;;IAC9G,OAAO,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,IAAI,CAAC;AACzC,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAsB,EAAE,KAA+B,EAAW,EAAE;;IAC7G,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,iBAAiB,mCAAI,KAAK,CAAC;AAC/D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,KAAsB,EACtB,KAA+B,EACM,EAAE,eAAC,OAAA,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,mBAAmB,0CAAE,YAAY,CAAA,EAAA,CAAC;AAEvG,+CAA+C;AAC/C;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAC9C,KAAsB,EACtB,KAA+B,EACK,EAAE;;IACtC,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC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AM,2BAA2B,GAAG,CACzC,KAAsB,EACtB,KAA+B,EACQ,EAAE;;IACzC,OAAO,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,eAAe,CAAC,wBAAqD,CAAC;AAC1G,CAAC,CAAC;AAEF,eAAe;AACf,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,KAAsB,EACtB,KAA+B,EACI,EAAE;;IACrC,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,iBAAiB,0CAAE,gBAAgB,CAAC;AACxE,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAkD,EAAE;IACzG,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,KAAsB,EAAkD,EAAE;IAChH,OAAO,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;AACjD,CAAC,CAAC;AAEF,iDAAiD;AACjD,eAAe;AACf,MAAM,CAAC,MAAM,uBAAuB,GAAG,CACrC,KAAsB,EACtB,KAA+B,EACL,EAAE;;IAC5B,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,aAAa,0CAAE,oBAAoB,CAAC;AACxE,CAAC,CAAC;AAEF,gDAAgD;AAChD;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,KAAsB,EACtB,KAA+B,EACW,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,YAAY,CAAA,EAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { CallState, DominantSpeakersInfo, EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { BreakoutRoom } from '@azure/communication-calling';\nimport { ParticipantCapabilities } from '@azure/communication-calling';\nimport { ParticipantRole } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallClientState,\n DeviceManagerState,\n RemoteParticipantState,\n LocalVideoStreamState,\n CallErrors,\n DiagnosticsCallFeatureState,\n SpotlightCallFeatureState,\n IncomingCallState\n} from '@internal/calling-stateful-client';\nimport { TeamsIncomingCallState } from '@internal/calling-stateful-client';\nimport { ReactionState } from '@internal/calling-stateful-client';\nimport { CaptionsInfo } from '@internal/calling-stateful-client';\n\nimport { CaptionsKind } from '@azure/communication-calling';\nimport { RaisedHandState } from '@internal/calling-stateful-client';\nimport { SupportedCaptionLanguage, SupportedSpokenLanguage } from '@internal/react-components';\nimport { ConferencePhoneInfo } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */\nimport { CallNotifications } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(media-access) */\nimport { CapabilitiesChangeInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(together-mode) */\nimport { TogetherModeCallFeatureState } from '@internal/calling-stateful-client';\n/**\n * Common props used to reference calling declarative client state.\n *\n * @public\n */\nexport type CallingBaseSelectorProps = {\n callId: string;\n};\n\n/**\n * @private\n */\nexport const getDeviceManager = (state: CallClientState): DeviceManagerState => state.deviceManager;\n\n/**\n * @private\n */\nexport const getRole = (state: CallClientState, props: CallingBaseSelectorProps): ParticipantRole | undefined => {\n return state.calls[props.callId]?.role;\n};\n\n/**\n * @private\n */\nexport const isHideAttendeeNamesEnabled = (state: CallClientState, props: CallingBaseSelectorProps): boolean => {\n return state.calls[props.callId]?.hideAttendeeNames ?? false;\n};\n\n/**\n * @private\n */\nexport const getCapabilities = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): ParticipantCapabilities | undefined => state.calls[props.callId]?.capabilitiesFeature?.capabilities;\n\n/* @conditional-compile-remove(media-access) */\n/**\n * @private\n */\nexport const getLatestCapabilitiesChangedInfo = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): CapabilitiesChangeInfo | undefined => {\n return state.calls[props.callId]?.capabilitiesFeature?.latestCapabilitiesChangeInfo;\n};\n\n/**\n * @private\n */\nexport const getCallExists = (state: CallClientState, props: CallingBaseSelectorProps): boolean =>\n !!state.calls[props.callId];\n\n/**\n * @private\n */\nexport const getDominantSpeakers = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): undefined | DominantSpeakersInfo => state.calls[props.callId]?.dominantSpeakers;\n\n/**\n * @private\n */\nexport const getRemoteParticipants = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n):\n | {\n [keys: string]: RemoteParticipantState;\n }\n | undefined => {\n return state.calls[props.callId]?.remoteParticipants;\n};\n\n/**\n * @private\n */\nexport const getLocalParticipantRaisedHand = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): RaisedHandState | undefined => {\n return state.calls[props.callId]?.raiseHand?.localParticipantRaisedHand;\n};\n\n/**\n * @private\n */\nexport const getSpotlightCallFeature = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): SpotlightCallFeatureState | undefined => {\n return state.calls[props.callId]?.spotlight;\n};\n\n/**\n * @private\n */\nexport const getLocalParticipantReactionState = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): ReactionState | undefined => {\n return state.calls[props.callId]?.localParticipantReaction;\n};\n\n/**\n * @private\n */\nexport const getIsScreenSharingOn = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined =>\n state.calls[props.callId]?.isScreenSharingOn;\n\n/**\n * @private\n */\nexport const getIsMuted = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined =>\n state.calls[props.callId]?.isMuted;\n\n/**\n * @private\n */\nexport const getOptimalVideoCount = (state: CallClientState, props: CallingBaseSelectorProps): number | undefined =>\n state.calls[props.callId]?.optimalVideoCount.maxRemoteVideoStreams;\n\n/**\n * @private\n */\nexport const getLocalVideoStreams = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): LocalVideoStreamState[] | undefined => state.calls[props.callId]?.localVideoStreams;\n\n/**\n * @private\n */\nexport const getScreenShareRemoteParticipant = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): string | undefined => state.calls[props.callId]?.screenShareRemoteParticipant;\n\n/**\n * @private\n */\nexport const getDisplayName = (state: CallClientState): string | undefined => state.callAgent?.displayName;\n\n/**\n * @private\n */\nexport const getIdentifier = (state: CallClientState): string => toFlatCommunicationIdentifier(state.userId);\n\n/**\n * @private\n */\nexport const getLatestErrors = (state: CallClientState): CallErrors => state.latestErrors;\n\n/* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */\n/**\n * @private\n */\nexport const getLatestNotifications = (state: CallClientState): CallNotifications => state.latestNotifications;\n\n/**\n * @private\n */\nexport const getDiagnostics = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): DiagnosticsCallFeatureState | undefined => state.calls[props.callId]?.diagnostics;\n\n/**\n * @private\n */\nexport const getCallState = (state: CallClientState, props: CallingBaseSelectorProps): CallState | undefined =>\n state.calls[props.callId]?.state;\n\n/**\n * @private\n */\nexport const getEnvironmentInfo = (state: CallClientState): undefined | EnvironmentInfo => {\n return state.environmentInfo;\n};\n\n/** @private */\nexport const getParticipantCount = (state: CallClientState, props: CallingBaseSelectorProps): number | undefined => {\n /* @conditional-compile-remove(total-participant-count) */\n return state.calls[props.callId]?.totalParticipantCount;\n return undefined;\n};\n\n/** @private */\nexport const getCaptionsKind = (state: CallClientState, props: CallingBaseSelectorProps): CaptionsKind | undefined => {\n return state.calls[props.callId]?.captionsFeature.captionsKind;\n};\n\n/** @private */\nexport const getCaptions = (state: CallClientState, props: CallingBaseSelectorProps): CaptionsInfo[] | undefined => {\n return state.calls[props.callId]?.captionsFeature.captions;\n};\n\n/** @private */\nexport const getCaptionsStatus = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined => {\n return state.calls[props.callId]?.captionsFeature.isCaptionsFeatureActive;\n};\n\n/** @private */\nexport const getStartCaptionsInProgress = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): boolean | undefined => {\n return state.calls[props.callId]?.captionsFeature.startCaptionsInProgress;\n};\n\n/** @private */\nexport const getCurrentCaptionLanguage = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): SupportedCaptionLanguage | undefined => {\n return state.calls[props.callId]?.captionsFeature.currentCaptionLanguage as SupportedCaptionLanguage;\n};\n\n/** @private */\nexport const getCurrentSpokenLanguage = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): SupportedSpokenLanguage | undefined => {\n return state.calls[props.callId]?.captionsFeature.currentSpokenLanguage as SupportedSpokenLanguage;\n};\n\n/** @private */\nexport const getSupportedCaptionLanguages = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): SupportedCaptionLanguage[] | undefined => {\n return state.calls[props.callId]?.captionsFeature.supportedCaptionLanguages as SupportedCaptionLanguage[];\n};\n\n/** @private */\nexport const getSupportedSpokenLanguages = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): SupportedSpokenLanguage[] | undefined => {\n return state.calls[props.callId]?.captionsFeature.supportedSpokenLanguages as SupportedSpokenLanguage[];\n};\n\n/** @private */\nexport const getMeetingConferencePhones = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): ConferencePhoneInfo[] | undefined => {\n return state.calls[props.callId]?.meetingConference?.conferencePhones;\n};\n\n/**\n * selector for retrieving the incoming calls from state\n * @returns the incoming calls in the call client state\n * @private\n */\nexport const getIncomingCalls = (state: CallClientState): IncomingCallState[] | TeamsIncomingCallState[] => {\n return Object.values(state.incomingCalls);\n};\n\n/**\n * selector for retrieving the incoming calls that have been removed from state\n * @returns the incoming calls that have been removed\n * @private\n */\nexport const getRemovedIncomingCalls = (state: CallClientState): IncomingCallState[] | TeamsIncomingCallState[] => {\n return Object.values(state.incomingCallsEnded);\n};\n\n/* @conditional-compile-remove(breakout-rooms) */\n/** @private */\nexport const getAssignedBreakoutRoom = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): BreakoutRoom | undefined => {\n return state.calls[props.callId]?.breakoutRooms?.assignedBreakoutRoom;\n};\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * @private\n */\nexport const getTogetherModeCallFeature = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): TogetherModeCallFeatureState | undefined => state.calls[props.callId]?.togetherMode;\n"]}
|
1
|
+
{"version":3,"file":"baseSelectors.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/baseSelectors.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AA+BxE;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAAsB,EAAsB,EAAE,CAAC,KAAK,CAAC,aAAa,CAAC;AAEpG;;GAEG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,KAAsB,EAAE,KAA+B,EAA+B,EAAE;;IAC9G,OAAO,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,IAAI,CAAC;AACzC,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,KAAsB,EAAE,KAA+B,EAAW,EAAE;;IAC7G,OAAO,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,iBAAiB,mCAAI,KAAK,CAAC;AAC/D,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,KAAsB,EACtB,KAA+B,EACM,EAAE,eAAC,OAAA,MAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,mBAAmB,0CAAE,YAAY,CAAA,EAAA,CAAC;AAEvG;;GAEG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAC9C,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,sCAAsC;AACtC,eAAe;AACf,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,KAAsB,EACtB,KAA+B,EAOnB,EAAE;;IACd,OAAO,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,mBAAmB,CAAC,aAAa,CAAC;AACtE,CAAC,CAAC;AAEF,gDAAgD;AAChD;;GAEG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,KAAsB,EACtB,KAA+B,EACW,EAAE,WAAC,OAAA,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,YAAY,CAAA,EAAA,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\nimport { CallState, DominantSpeakersInfo, EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { BreakoutRoom } from '@azure/communication-calling';\nimport { ParticipantCapabilities } from '@azure/communication-calling';\nimport { ParticipantRole } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport {\n CallClientState,\n DeviceManagerState,\n RemoteParticipantState,\n LocalVideoStreamState,\n CallErrors,\n DiagnosticsCallFeatureState,\n SpotlightCallFeatureState,\n IncomingCallState\n} from '@internal/calling-stateful-client';\nimport { TeamsIncomingCallState } from '@internal/calling-stateful-client';\nimport { ReactionState } from '@internal/calling-stateful-client';\nimport { CaptionsInfo } from '@internal/calling-stateful-client';\nimport { CaptionsKind, CapabilitiesChangeInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(rtt) */\nimport { RealTimeTextInfo } from '@internal/calling-stateful-client';\nimport { RaisedHandState } from '@internal/calling-stateful-client';\nimport { SupportedCaptionLanguage, SupportedSpokenLanguage } from '@internal/react-components';\nimport { ConferencePhoneInfo, CallNotifications } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(together-mode) */\nimport { TogetherModeCallFeatureState } from '@internal/calling-stateful-client';\n/**\n * Common props used to reference calling declarative client state.\n *\n * @public\n */\nexport type CallingBaseSelectorProps = {\n callId: string;\n};\n\n/**\n * @private\n */\nexport const getDeviceManager = (state: CallClientState): DeviceManagerState => state.deviceManager;\n\n/**\n * @private\n */\nexport const getRole = (state: CallClientState, props: CallingBaseSelectorProps): ParticipantRole | undefined => {\n return state.calls[props.callId]?.role;\n};\n\n/**\n * @private\n */\nexport const isHideAttendeeNamesEnabled = (state: CallClientState, props: CallingBaseSelectorProps): boolean => {\n return state.calls[props.callId]?.hideAttendeeNames ?? false;\n};\n\n/**\n * @private\n */\nexport const getCapabilities = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): ParticipantCapabilities | undefined => state.calls[props.callId]?.capabilitiesFeature?.capabilities;\n\n/**\n * @private\n */\nexport const getLatestCapabilitiesChangedInfo = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): CapabilitiesChangeInfo | undefined => {\n return state.calls[props.callId]?.capabilitiesFeature?.latestCapabilitiesChangeInfo;\n};\n\n/**\n * @private\n */\nexport const getCallExists = (state: CallClientState, props: CallingBaseSelectorProps): boolean =>\n !!state.calls[props.callId];\n\n/**\n * @private\n */\nexport const getDominantSpeakers = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): undefined | DominantSpeakersInfo => state.calls[props.callId]?.dominantSpeakers;\n\n/**\n * @private\n */\nexport const getRemoteParticipants = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n):\n | {\n [keys: string]: RemoteParticipantState;\n }\n | undefined => {\n return state.calls[props.callId]?.remoteParticipants;\n};\n\n/**\n * @private\n */\nexport const getLocalParticipantRaisedHand = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): RaisedHandState | undefined => {\n return state.calls[props.callId]?.raiseHand?.localParticipantRaisedHand;\n};\n\n/**\n * @private\n */\nexport const getSpotlightCallFeature = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): SpotlightCallFeatureState | undefined => {\n return state.calls[props.callId]?.spotlight;\n};\n\n/**\n * @private\n */\nexport const getLocalParticipantReactionState = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): ReactionState | undefined => {\n return state.calls[props.callId]?.localParticipantReaction;\n};\n\n/**\n * @private\n */\nexport const getIsScreenSharingOn = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined =>\n state.calls[props.callId]?.isScreenSharingOn;\n\n/**\n * @private\n */\nexport const getIsMuted = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined =>\n state.calls[props.callId]?.isMuted;\n\n/**\n * @private\n */\nexport const getOptimalVideoCount = (state: CallClientState, props: CallingBaseSelectorProps): number | undefined =>\n state.calls[props.callId]?.optimalVideoCount.maxRemoteVideoStreams;\n\n/**\n * @private\n */\nexport const getLocalVideoStreams = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): LocalVideoStreamState[] | undefined => state.calls[props.callId]?.localVideoStreams;\n\n/**\n * @private\n */\nexport const getScreenShareRemoteParticipant = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): string | undefined => state.calls[props.callId]?.screenShareRemoteParticipant;\n\n/**\n * @private\n */\nexport const getDisplayName = (state: CallClientState): string | undefined => state.callAgent?.displayName;\n\n/**\n * @private\n */\nexport const getIdentifier = (state: CallClientState): string => toFlatCommunicationIdentifier(state.userId);\n\n/**\n * @private\n */\nexport const getLatestErrors = (state: CallClientState): CallErrors => state.latestErrors;\n\n/**\n * @private\n */\nexport const getLatestNotifications = (state: CallClientState): CallNotifications => state.latestNotifications;\n\n/**\n * @private\n */\nexport const getDiagnostics = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): DiagnosticsCallFeatureState | undefined => state.calls[props.callId]?.diagnostics;\n\n/**\n * @private\n */\nexport const getCallState = (state: CallClientState, props: CallingBaseSelectorProps): CallState | undefined =>\n state.calls[props.callId]?.state;\n\n/**\n * @private\n */\nexport const getEnvironmentInfo = (state: CallClientState): undefined | EnvironmentInfo => {\n return state.environmentInfo;\n};\n\n/** @private */\nexport const getParticipantCount = (state: CallClientState, props: CallingBaseSelectorProps): number | undefined => {\n /* @conditional-compile-remove(total-participant-count) */\n return state.calls[props.callId]?.totalParticipantCount;\n return undefined;\n};\n\n/** @private */\nexport const getCaptionsKind = (state: CallClientState, props: CallingBaseSelectorProps): CaptionsKind | undefined => {\n return state.calls[props.callId]?.captionsFeature.captionsKind;\n};\n\n/** @private */\nexport const getCaptions = (state: CallClientState, props: CallingBaseSelectorProps): CaptionsInfo[] | undefined => {\n return state.calls[props.callId]?.captionsFeature.captions;\n};\n\n/** @private */\nexport const getCaptionsStatus = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined => {\n return state.calls[props.callId]?.captionsFeature.isCaptionsFeatureActive;\n};\n\n/** @private */\nexport const getStartCaptionsInProgress = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): boolean | undefined => {\n return state.calls[props.callId]?.captionsFeature.startCaptionsInProgress;\n};\n\n/** @private */\nexport const getCurrentCaptionLanguage = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): SupportedCaptionLanguage | undefined => {\n return state.calls[props.callId]?.captionsFeature.currentCaptionLanguage as SupportedCaptionLanguage;\n};\n\n/** @private */\nexport const getCurrentSpokenLanguage = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): SupportedSpokenLanguage | undefined => {\n return state.calls[props.callId]?.captionsFeature.currentSpokenLanguage as SupportedSpokenLanguage;\n};\n\n/** @private */\nexport const getSupportedCaptionLanguages = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): SupportedCaptionLanguage[] | undefined => {\n return state.calls[props.callId]?.captionsFeature.supportedCaptionLanguages as SupportedCaptionLanguage[];\n};\n\n/** @private */\nexport const getSupportedSpokenLanguages = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): SupportedSpokenLanguage[] | undefined => {\n return state.calls[props.callId]?.captionsFeature.supportedSpokenLanguages as SupportedSpokenLanguage[];\n};\n\n/** @private */\nexport const getMeetingConferencePhones = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): ConferencePhoneInfo[] | undefined => {\n return state.calls[props.callId]?.meetingConference?.conferencePhones;\n};\n\n/**\n * selector for retrieving the incoming calls from state\n * @returns the incoming calls in the call client state\n * @private\n */\nexport const getIncomingCalls = (state: CallClientState): IncomingCallState[] | TeamsIncomingCallState[] => {\n return Object.values(state.incomingCalls);\n};\n\n/**\n * selector for retrieving the incoming calls that have been removed from state\n * @returns the incoming calls that have been removed\n * @private\n */\nexport const getRemovedIncomingCalls = (state: CallClientState): IncomingCallState[] | TeamsIncomingCallState[] => {\n return Object.values(state.incomingCallsEnded);\n};\n\n/* @conditional-compile-remove(breakout-rooms) */\n/** @private */\nexport const getAssignedBreakoutRoom = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): BreakoutRoom | undefined => {\n return state.calls[props.callId]?.breakoutRooms?.assignedBreakoutRoom;\n};\n\n/* @conditional-compile-remove(rtt) */\n/** @private */\nexport const getRealTimeTextStatus = (state: CallClientState, props: CallingBaseSelectorProps): boolean | undefined => {\n return state.calls[props.callId]?.realTimeTextFeature.isRealTimeTextFeatureActive;\n};\n\n/* @conditional-compile-remove(rtt) */\n/** @private */\nexport const getRealTimeText = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n):\n | {\n completedMessages?: RealTimeTextInfo[];\n currentInProgress?: RealTimeTextInfo[];\n myInProgress?: RealTimeTextInfo;\n }\n | undefined => {\n return state.calls[props.callId]?.realTimeTextFeature.realTimeTexts;\n};\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * @private\n */\nexport const getTogetherModeCallFeature = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n): TogetherModeCallFeatureState | undefined => state.calls[props.callId]?.togetherMode;\n"]}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { CallClientState } from "../../calling-stateful-client/src";
|
2
2
|
import { CallingBaseSelectorProps } from './baseSelectors';
|
3
3
|
import { CaptionsInformation, SupportedCaptionLanguage, SupportedSpokenLanguage } from "../../react-components/src";
|
4
|
+
import { RealTimeTextInformation } from "../../react-components/src";
|
4
5
|
/**
|
5
6
|
* Selector type for the {@link StartCaptionsButton} component.
|
6
7
|
* @public
|
@@ -39,7 +40,15 @@ export declare const captionSettingsSelector: CaptionSettingsSelector;
|
|
39
40
|
*/
|
40
41
|
export type CaptionsBannerSelector = (state: CallClientState, props: CallingBaseSelectorProps) => {
|
41
42
|
captions: CaptionsInformation[];
|
43
|
+
realTimeTexts: {
|
44
|
+
completedMessages?: RealTimeTextInformation[];
|
45
|
+
currentInProgress?: RealTimeTextInformation[];
|
46
|
+
myInProgress?: RealTimeTextInformation;
|
47
|
+
};
|
42
48
|
isCaptionsOn: boolean;
|
49
|
+
startCaptionsInProgress: boolean;
|
50
|
+
isRealTimeTextOn: boolean;
|
51
|
+
latestLocalRealTimeText: RealTimeTextInformation;
|
43
52
|
};
|
44
53
|
/**
|
45
54
|
* Selector for {@link CaptionsBanner} component.
|
@@ -1,6 +1,8 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT License.
|
3
3
|
import { getDisplayName, getIdentifier, getRemoteParticipants, getStartCaptionsInProgress, getSupportedCaptionLanguages } from './baseSelectors';
|
4
|
+
/* @conditional-compile-remove(rtt) */
|
5
|
+
import { getRealTimeTextStatus, getRealTimeText } from './baseSelectors';
|
4
6
|
import { getCaptions, getCaptionsStatus, getCurrentCaptionLanguage, getCurrentSpokenLanguage, getSupportedSpokenLanguages } from './baseSelectors';
|
5
7
|
import * as reselect from 'reselect';
|
6
8
|
import { toFlatCommunicationIdentifier } from "../../acs-ui-common/src";
|
@@ -41,9 +43,24 @@ export const captionSettingsSelector = reselect.createSelector([
|
|
41
43
|
*
|
42
44
|
* @public
|
43
45
|
*/
|
44
|
-
export const captionsBannerSelector = reselect.createSelector([
|
46
|
+
export const captionsBannerSelector = reselect.createSelector([
|
47
|
+
getCaptions,
|
48
|
+
/* @conditional-compile-remove(rtt) */
|
49
|
+
getRealTimeText,
|
50
|
+
getCaptionsStatus,
|
51
|
+
/* @conditional-compile-remove(rtt) */
|
52
|
+
getRealTimeTextStatus,
|
53
|
+
getStartCaptionsInProgress,
|
54
|
+
getRemoteParticipants,
|
55
|
+
getDisplayName,
|
56
|
+
getIdentifier
|
57
|
+
], (captions,
|
58
|
+
/* @conditional-compile-remove(rtt) */
|
59
|
+
realTimeTexts, isCaptionsFeatureActive,
|
60
|
+
/* @conditional-compile-remove(rtt) */
|
61
|
+
isRealTimeTextActive, startCaptionsInProgress, remoteParticipants, displayName, identifier) => {
|
62
|
+
var _a, _b;
|
45
63
|
const captionsInfo = captions === null || captions === void 0 ? void 0 : captions.map((c, index) => {
|
46
|
-
var _a;
|
47
64
|
const userId = getCaptionsSpeakerIdentifier(c);
|
48
65
|
let finalDisplayName;
|
49
66
|
if (userId === identifier) {
|
@@ -58,17 +75,97 @@ export const captionsBannerSelector = reselect.createSelector([getCaptions, getC
|
|
58
75
|
return {
|
59
76
|
id: (finalDisplayName !== null && finalDisplayName !== void 0 ? finalDisplayName : 'Unnamed Participant') + index,
|
60
77
|
displayName: finalDisplayName !== null && finalDisplayName !== void 0 ? finalDisplayName : 'Unnamed Participant',
|
61
|
-
captionText:
|
62
|
-
userId
|
78
|
+
captionText: c.captionText,
|
79
|
+
userId,
|
80
|
+
createdTimeStamp: c.timestamp
|
63
81
|
};
|
64
82
|
});
|
83
|
+
/* @conditional-compile-remove(rtt) */
|
84
|
+
const completedRealTimeTexts = (_a = realTimeTexts === null || realTimeTexts === void 0 ? void 0 : realTimeTexts.completedMessages) === null || _a === void 0 ? void 0 : _a.filter((rtt) => rtt.message !== '').map((rtt) => {
|
85
|
+
const userId = getRealTimeTextSpeakerIdentifier(rtt);
|
86
|
+
return {
|
87
|
+
id: rtt.sequenceId,
|
88
|
+
displayName: getRealTimeTextDisplayName(rtt, identifier, remoteParticipants, displayName, userId),
|
89
|
+
message: rtt.message,
|
90
|
+
userId,
|
91
|
+
isTyping: rtt.resultType === 'Partial',
|
92
|
+
isMe: rtt.isMe,
|
93
|
+
finalizedTimeStamp: rtt.updatedTimestamp
|
94
|
+
};
|
95
|
+
});
|
96
|
+
/* @conditional-compile-remove(rtt) */
|
97
|
+
const inProgressRealTimeTexts = (_b = realTimeTexts === null || realTimeTexts === void 0 ? void 0 : realTimeTexts.currentInProgress) === null || _b === void 0 ? void 0 : _b.filter((rtt) => rtt.message !== '').map((rtt) => {
|
98
|
+
const userId = getRealTimeTextSpeakerIdentifier(rtt);
|
99
|
+
return {
|
100
|
+
id: rtt.sequenceId,
|
101
|
+
displayName: getRealTimeTextDisplayName(rtt, identifier, remoteParticipants, displayName, userId),
|
102
|
+
message: rtt.message,
|
103
|
+
userId,
|
104
|
+
isTyping: rtt.resultType === 'Partial',
|
105
|
+
isMe: rtt.isMe,
|
106
|
+
finalizedTimeStamp: rtt.updatedTimestamp
|
107
|
+
};
|
108
|
+
});
|
109
|
+
/* @conditional-compile-remove(rtt) */
|
110
|
+
const myInProgress = (realTimeTexts === null || realTimeTexts === void 0 ? void 0 : realTimeTexts.myInProgress) && realTimeTexts.myInProgress.message !== ''
|
111
|
+
? {
|
112
|
+
id: realTimeTexts.myInProgress.sequenceId,
|
113
|
+
displayName: displayName,
|
114
|
+
message: realTimeTexts.myInProgress.message,
|
115
|
+
userId: identifier,
|
116
|
+
isTyping: realTimeTexts.myInProgress.resultType === 'Partial',
|
117
|
+
isMe: true,
|
118
|
+
finalizedTimeStamp: realTimeTexts.myInProgress.updatedTimestamp
|
119
|
+
}
|
120
|
+
: undefined;
|
121
|
+
/* @conditional-compile-remove(rtt) */
|
122
|
+
// find the last final local real time text caption if myInProgress is not available
|
123
|
+
let latestLocalRealTimeText;
|
124
|
+
/* @conditional-compile-remove(rtt) */
|
125
|
+
if (!myInProgress) {
|
126
|
+
latestLocalRealTimeText =
|
127
|
+
realTimeTexts &&
|
128
|
+
realTimeTexts.completedMessages &&
|
129
|
+
realTimeTexts.completedMessages
|
130
|
+
.slice()
|
131
|
+
.reverse()
|
132
|
+
.find((rtt) => rtt.isMe);
|
133
|
+
}
|
65
134
|
return {
|
66
135
|
captions: captionsInfo !== null && captionsInfo !== void 0 ? captionsInfo : [],
|
136
|
+
/* @conditional-compile-remove(rtt) */
|
137
|
+
realTimeTexts: {
|
138
|
+
completedMessages: completedRealTimeTexts,
|
139
|
+
currentInProgress: inProgressRealTimeTexts,
|
140
|
+
myInProgress: myInProgress
|
141
|
+
},
|
67
142
|
isCaptionsOn: isCaptionsFeatureActive !== null && isCaptionsFeatureActive !== void 0 ? isCaptionsFeatureActive : false,
|
68
|
-
startCaptionsInProgress: startCaptionsInProgress !== null && startCaptionsInProgress !== void 0 ? startCaptionsInProgress : false
|
143
|
+
startCaptionsInProgress: startCaptionsInProgress !== null && startCaptionsInProgress !== void 0 ? startCaptionsInProgress : false,
|
144
|
+
/* @conditional-compile-remove(rtt) */
|
145
|
+
isRealTimeTextOn: isRealTimeTextActive !== null && isRealTimeTextActive !== void 0 ? isRealTimeTextActive : false,
|
146
|
+
/* @conditional-compile-remove(rtt) */
|
147
|
+
latestLocalRealTimeText: (myInProgress !== null && myInProgress !== void 0 ? myInProgress : latestLocalRealTimeText)
|
69
148
|
};
|
70
149
|
});
|
71
150
|
const getCaptionsSpeakerIdentifier = (captions) => {
|
72
151
|
return captions.speaker.identifier ? toFlatCommunicationIdentifier(captions.speaker.identifier) : '';
|
73
152
|
};
|
153
|
+
/* @conditional-compile-remove(rtt) */
|
154
|
+
const getRealTimeTextSpeakerIdentifier = (realTimeText) => {
|
155
|
+
return realTimeText.sender.identifier ? toFlatCommunicationIdentifier(realTimeText.sender.identifier) : '';
|
156
|
+
};
|
157
|
+
/* @conditional-compile-remove(rtt) */
|
158
|
+
const getRealTimeTextDisplayName = (realTimeText, identifier, remoteParticipants, displayName, userId) => {
|
159
|
+
let finalDisplayName;
|
160
|
+
if (userId === identifier) {
|
161
|
+
finalDisplayName = displayName;
|
162
|
+
}
|
163
|
+
else if (remoteParticipants) {
|
164
|
+
const participant = remoteParticipants[userId];
|
165
|
+
if (participant) {
|
166
|
+
finalDisplayName = participant.displayName;
|
167
|
+
}
|
168
|
+
}
|
169
|
+
return finalDisplayName !== null && finalDisplayName !== void 0 ? finalDisplayName : 'Unnamed Participant';
|
170
|
+
};
|
74
171
|
//# sourceMappingURL=captionsSelector.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"captionsSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/captionsSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAEL,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC7B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AACrC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAgBxE;;;;GAIG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAgC,QAAQ,CAAC,cAAc,CAC7F,CAAC,iBAAiB,EAAE,yBAAyB,EAAE,wBAAwB,CAAC,EACxE,CAAC,uBAAuB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,EAAE;IACzE,OAAO;QACL,OAAO,EAAE,uBAAuB,aAAvB,uBAAuB,cAAvB,uBAAuB,GAAI,KAAK;QACzC,sBAAsB,EAAE,sBAAsB,aAAtB,sBAAsB,cAAtB,sBAAsB,GAAI,EAAE;QACpD,qBAAqB,EAAE,qBAAqB,aAArB,qBAAqB,cAArB,qBAAqB,GAAI,OAAO;KACxD,CAAC;AACJ,CAAC,CACF,CAAC;AAiBF;;;;GAIG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAA4B,QAAQ,CAAC,cAAc,CACrF;IACE,4BAA4B;IAC5B,yBAAyB;IACzB,2BAA2B;IAC3B,wBAAwB;IACxB,iBAAiB;CAClB,EACD,C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;QACH,CAAC;QACD,OAAO;YACL,EAAE,EAAE,CAAC,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,qBAAqB,CAAC,GAAG,KAAK;YACvD,WAAW,EAAE,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,qBAAqB;YACtD,WAAW,EAAE,MAAA,CAAC,CAAC,WAAW,mCAAI,EAAE;YAChC,MAAM;SACP,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,OAAO;QACL,QAAQ,EAAE,YAAY,aAAZ,YAAY,cAAZ,YAAY,GAAI,EAAE;QAC5B,YAAY,EAAE,uBAAuB,aAAvB,uBAAuB,cAAvB,uBAAuB,GAAI,KAAK;QAC9C,uBAAuB,EAAE,uBAAuB,aAAvB,uBAAuB,cAAvB,uBAAuB,GAAI,KAAK;KAC1D,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,4BAA4B,GAAG,CAAC,QAAsB,EAAU,EAAE;IACtE,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,6BAA6B,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvG,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallClientState, CaptionsInfo } from '@internal/calling-stateful-client';\nimport {\n CallingBaseSelectorProps,\n getDisplayName,\n getIdentifier,\n getRemoteParticipants,\n getStartCaptionsInProgress,\n getSupportedCaptionLanguages\n} from './baseSelectors';\nimport {\n getCaptions,\n getCaptionsStatus,\n getCurrentCaptionLanguage,\n getCurrentSpokenLanguage,\n getSupportedSpokenLanguages\n} from './baseSelectors';\nimport * as reselect from 'reselect';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CaptionsInformation, SupportedCaptionLanguage, SupportedSpokenLanguage } from '@internal/react-components';\n\n/**\n * Selector type for the {@link StartCaptionsButton} component.\n * @public\n */\nexport type StartCaptionsButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n checked: boolean;\n currentCaptionLanguage: string;\n currentSpokenLanguage: string;\n};\n\n/**\n * Selector for {@link StartCaptionsButton} component.\n *\n * @public\n */\nexport const startCaptionsButtonSelector: StartCaptionsButtonSelector = reselect.createSelector(\n [getCaptionsStatus, getCurrentCaptionLanguage, getCurrentSpokenLanguage],\n (isCaptionsFeatureActive, currentCaptionLanguage, currentSpokenLanguage) => {\n return {\n checked: isCaptionsFeatureActive ?? false,\n currentCaptionLanguage: currentCaptionLanguage ?? '',\n currentSpokenLanguage: currentSpokenLanguage ?? 'en-us'\n };\n }\n);\n\n/**\n * Selector type for components for Changing caption language and spoken language\n * @public\n */\nexport type CaptionSettingsSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n supportedCaptionLanguages: SupportedCaptionLanguage[];\n currentCaptionLanguage: SupportedCaptionLanguage;\n supportedSpokenLanguages: SupportedSpokenLanguage[];\n currentSpokenLanguage: SupportedSpokenLanguage;\n isCaptionsFeatureActive: boolean;\n};\n\n/**\n * Selector for Changing caption language and spoken language\n *\n * @public\n */\nexport const captionSettingsSelector: CaptionSettingsSelector = reselect.createSelector(\n [\n getSupportedCaptionLanguages,\n getCurrentCaptionLanguage,\n getSupportedSpokenLanguages,\n getCurrentSpokenLanguage,\n getCaptionsStatus\n ],\n (\n supportedCaptionLanguages,\n currentCaptionLanguage,\n supportedSpokenLanguages,\n currentSpokenLanguage,\n isCaptionsFeatureActive\n ) => {\n return {\n supportedCaptionLanguages: supportedCaptionLanguages ?? [],\n currentCaptionLanguage: currentCaptionLanguage ?? 'en',\n supportedSpokenLanguages: supportedSpokenLanguages ?? ['en-us'],\n currentSpokenLanguage: currentSpokenLanguage ?? 'en-us',\n isCaptionsFeatureActive: isCaptionsFeatureActive ?? false\n };\n }\n);\n/**\n * Selector type for the {@link CaptionsBanner} component.\n * @public\n */\nexport type CaptionsBannerSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n captions: CaptionsInformation[];\n isCaptionsOn: boolean;\n};\n\n/**\n * Selector for {@link CaptionsBanner} component.\n *\n * @public\n */\nexport const captionsBannerSelector: CaptionsBannerSelector = reselect.createSelector(\n [getCaptions, getCaptionsStatus, getStartCaptionsInProgress, getRemoteParticipants, getDisplayName, getIdentifier],\n (captions, isCaptionsFeatureActive, startCaptionsInProgress, remoteParticipants, displayName, identifier) => {\n const captionsInfo = captions?.map((c, index) => {\n const userId = getCaptionsSpeakerIdentifier(c);\n let finalDisplayName;\n if (userId === identifier) {\n finalDisplayName = displayName;\n } else if (remoteParticipants) {\n const participant = remoteParticipants[userId];\n if (participant) {\n finalDisplayName = participant.displayName;\n }\n }\n return {\n id: (finalDisplayName ?? 'Unnamed Participant') + index,\n displayName: finalDisplayName ?? 'Unnamed Participant',\n captionText: c.captionText ?? '',\n userId\n };\n });\n return {\n captions: captionsInfo ?? [],\n isCaptionsOn: isCaptionsFeatureActive ?? false,\n startCaptionsInProgress: startCaptionsInProgress ?? false\n };\n }\n);\n\nconst getCaptionsSpeakerIdentifier = (captions: CaptionsInfo): string => {\n return captions.speaker.identifier ? toFlatCommunicationIdentifier(captions.speaker.identifier) : '';\n};\n"]}
|
1
|
+
{"version":3,"file":"captionsSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/captionsSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAEL,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,0BAA0B,EAC1B,4BAA4B,EAC7B,MAAM,iBAAiB,CAAC;AACzB,sCAAsC;AACtC,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;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U,EAAE;IACtE,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,6BAA6B,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACvG,CAAC,CAAC;AACF,sCAAsC;AACtC,MAAM,gCAAgC,GAAG,CAAC,YAA8B,EAAU,EAAE;IAClF,OAAO,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,6BAA6B,CAAC,YAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAC7G,CAAC,CAAC;AAEF,sCAAsC;AACtC,MAAM,0BAA0B,GAAG,CACjC,YAA8B,EAC9B,UAAkB,EAClB,kBAIa,EACb,WAA+B,EAC/B,MAAc,EACN,EAAE;IACV,IAAI,gBAAgB,CAAC;IACrB,IAAI,MAAM,KAAK,UAAU,EAAE,CAAC;QAC1B,gBAAgB,GAAG,WAAW,CAAC;IACjC,CAAC;SAAM,IAAI,kBAAkB,EAAE,CAAC;QAC9B,MAAM,WAAW,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;QAC/C,IAAI,WAAW,EAAE,CAAC;YAChB,gBAAgB,GAAG,WAAW,CAAC,WAAW,CAAC;QAC7C,CAAC;IACH,CAAC;IACD,OAAO,gBAAgB,aAAhB,gBAAgB,cAAhB,gBAAgB,GAAI,qBAAqB,CAAC;AACnD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallClientState, CaptionsInfo } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(rtt) */\nimport { RealTimeTextInfo, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport {\n CallingBaseSelectorProps,\n getDisplayName,\n getIdentifier,\n getRemoteParticipants,\n getStartCaptionsInProgress,\n getSupportedCaptionLanguages\n} from './baseSelectors';\n/* @conditional-compile-remove(rtt) */\nimport { getRealTimeTextStatus, getRealTimeText } from './baseSelectors';\nimport {\n getCaptions,\n getCaptionsStatus,\n getCurrentCaptionLanguage,\n getCurrentSpokenLanguage,\n getSupportedSpokenLanguages\n} from './baseSelectors';\nimport * as reselect from 'reselect';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CaptionsInformation, SupportedCaptionLanguage, SupportedSpokenLanguage } from '@internal/react-components';\n/* @conditional-compile-remove(rtt) */\nimport { RealTimeTextInformation } from '@internal/react-components';\n\n/**\n * Selector type for the {@link StartCaptionsButton} component.\n * @public\n */\nexport type StartCaptionsButtonSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n checked: boolean;\n currentCaptionLanguage: string;\n currentSpokenLanguage: string;\n};\n\n/**\n * Selector for {@link StartCaptionsButton} component.\n *\n * @public\n */\nexport const startCaptionsButtonSelector: StartCaptionsButtonSelector = reselect.createSelector(\n [getCaptionsStatus, getCurrentCaptionLanguage, getCurrentSpokenLanguage],\n (isCaptionsFeatureActive, currentCaptionLanguage, currentSpokenLanguage) => {\n return {\n checked: isCaptionsFeatureActive ?? false,\n currentCaptionLanguage: currentCaptionLanguage ?? '',\n currentSpokenLanguage: currentSpokenLanguage ?? 'en-us'\n };\n }\n);\n\n/**\n * Selector type for components for Changing caption language and spoken language\n * @public\n */\nexport type CaptionSettingsSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n supportedCaptionLanguages: SupportedCaptionLanguage[];\n currentCaptionLanguage: SupportedCaptionLanguage;\n supportedSpokenLanguages: SupportedSpokenLanguage[];\n currentSpokenLanguage: SupportedSpokenLanguage;\n isCaptionsFeatureActive: boolean;\n};\n\n/**\n * Selector for Changing caption language and spoken language\n *\n * @public\n */\nexport const captionSettingsSelector: CaptionSettingsSelector = reselect.createSelector(\n [\n getSupportedCaptionLanguages,\n getCurrentCaptionLanguage,\n getSupportedSpokenLanguages,\n getCurrentSpokenLanguage,\n getCaptionsStatus\n ],\n (\n supportedCaptionLanguages,\n currentCaptionLanguage,\n supportedSpokenLanguages,\n currentSpokenLanguage,\n isCaptionsFeatureActive\n ) => {\n return {\n supportedCaptionLanguages: supportedCaptionLanguages ?? [],\n currentCaptionLanguage: currentCaptionLanguage ?? 'en',\n supportedSpokenLanguages: supportedSpokenLanguages ?? ['en-us'],\n currentSpokenLanguage: currentSpokenLanguage ?? 'en-us',\n isCaptionsFeatureActive: isCaptionsFeatureActive ?? false\n };\n }\n);\n/**\n * Selector type for the {@link CaptionsBanner} component.\n * @public\n */\nexport type CaptionsBannerSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n captions: CaptionsInformation[];\n /* @conditional-compile-remove(rtt) */\n realTimeTexts: {\n completedMessages?: RealTimeTextInformation[];\n currentInProgress?: RealTimeTextInformation[];\n myInProgress?: RealTimeTextInformation;\n };\n isCaptionsOn: boolean;\n startCaptionsInProgress: boolean;\n /* @conditional-compile-remove(rtt) */\n isRealTimeTextOn: boolean;\n /* @conditional-compile-remove(rtt) */\n latestLocalRealTimeText: RealTimeTextInformation;\n};\n\n/**\n * Selector for {@link CaptionsBanner} component.\n *\n * @public\n */\nexport const captionsBannerSelector: CaptionsBannerSelector = reselect.createSelector(\n [\n getCaptions,\n /* @conditional-compile-remove(rtt) */\n getRealTimeText,\n getCaptionsStatus,\n /* @conditional-compile-remove(rtt) */\n getRealTimeTextStatus,\n getStartCaptionsInProgress,\n getRemoteParticipants,\n getDisplayName,\n getIdentifier\n ],\n (\n captions,\n /* @conditional-compile-remove(rtt) */\n realTimeTexts,\n isCaptionsFeatureActive,\n /* @conditional-compile-remove(rtt) */\n isRealTimeTextActive,\n startCaptionsInProgress,\n remoteParticipants,\n displayName,\n identifier\n ) => {\n const captionsInfo = captions?.map((c, index) => {\n const userId = getCaptionsSpeakerIdentifier(c);\n let finalDisplayName;\n if (userId === identifier) {\n finalDisplayName = displayName;\n } else if (remoteParticipants) {\n const participant = remoteParticipants[userId];\n if (participant) {\n finalDisplayName = participant.displayName;\n }\n }\n\n return {\n id: (finalDisplayName ?? 'Unnamed Participant') + index,\n displayName: finalDisplayName ?? 'Unnamed Participant',\n captionText: c.captionText,\n userId,\n createdTimeStamp: c.timestamp\n };\n });\n /* @conditional-compile-remove(rtt) */\n const completedRealTimeTexts = realTimeTexts?.completedMessages\n ?.filter((rtt) => rtt.message !== '')\n .map((rtt) => {\n const userId = getRealTimeTextSpeakerIdentifier(rtt);\n return {\n id: rtt.sequenceId,\n displayName: getRealTimeTextDisplayName(rtt, identifier, remoteParticipants, displayName, userId),\n message: rtt.message,\n userId,\n isTyping: rtt.resultType === 'Partial',\n isMe: rtt.isMe,\n finalizedTimeStamp: rtt.updatedTimestamp\n };\n });\n /* @conditional-compile-remove(rtt) */\n const inProgressRealTimeTexts = realTimeTexts?.currentInProgress\n ?.filter((rtt) => rtt.message !== '')\n .map((rtt) => {\n const userId = getRealTimeTextSpeakerIdentifier(rtt);\n return {\n id: rtt.sequenceId,\n displayName: getRealTimeTextDisplayName(rtt, identifier, remoteParticipants, displayName, userId),\n message: rtt.message,\n userId,\n isTyping: rtt.resultType === 'Partial',\n isMe: rtt.isMe,\n finalizedTimeStamp: rtt.updatedTimestamp\n };\n });\n /* @conditional-compile-remove(rtt) */\n const myInProgress =\n realTimeTexts?.myInProgress && realTimeTexts.myInProgress.message !== ''\n ? {\n id: realTimeTexts.myInProgress.sequenceId,\n displayName: displayName,\n message: realTimeTexts.myInProgress.message,\n userId: identifier,\n isTyping: realTimeTexts.myInProgress.resultType === 'Partial',\n isMe: true,\n finalizedTimeStamp: realTimeTexts.myInProgress.updatedTimestamp\n }\n : undefined;\n\n /* @conditional-compile-remove(rtt) */\n // find the last final local real time text caption if myInProgress is not available\n let latestLocalRealTimeText;\n /* @conditional-compile-remove(rtt) */\n if (!myInProgress) {\n latestLocalRealTimeText =\n realTimeTexts &&\n realTimeTexts.completedMessages &&\n realTimeTexts.completedMessages\n .slice()\n .reverse()\n .find((rtt) => rtt.isMe);\n }\n\n return {\n captions: captionsInfo ?? [],\n /* @conditional-compile-remove(rtt) */\n realTimeTexts: {\n completedMessages: completedRealTimeTexts as RealTimeTextInformation[],\n currentInProgress: inProgressRealTimeTexts as RealTimeTextInformation[],\n myInProgress: myInProgress as RealTimeTextInformation\n },\n isCaptionsOn: isCaptionsFeatureActive ?? false,\n startCaptionsInProgress: startCaptionsInProgress ?? false,\n /* @conditional-compile-remove(rtt) */\n isRealTimeTextOn: isRealTimeTextActive ?? false,\n /* @conditional-compile-remove(rtt) */\n latestLocalRealTimeText: (myInProgress ?? latestLocalRealTimeText) as RealTimeTextInformation\n };\n }\n);\n\nconst getCaptionsSpeakerIdentifier = (captions: CaptionsInfo): string => {\n return captions.speaker.identifier ? toFlatCommunicationIdentifier(captions.speaker.identifier) : '';\n};\n/* @conditional-compile-remove(rtt) */\nconst getRealTimeTextSpeakerIdentifier = (realTimeText: RealTimeTextInfo): string => {\n return realTimeText.sender.identifier ? toFlatCommunicationIdentifier(realTimeText.sender.identifier) : '';\n};\n\n/* @conditional-compile-remove(rtt) */\nconst getRealTimeTextDisplayName = (\n realTimeText: RealTimeTextInfo,\n identifier: string,\n remoteParticipants:\n | {\n [keys: string]: RemoteParticipantState;\n }\n | undefined,\n displayName: string | undefined,\n userId: string\n): string => {\n let finalDisplayName;\n if (userId === identifier) {\n finalDisplayName = displayName;\n } else if (remoteParticipants) {\n const participant = remoteParticipants[userId];\n if (participant) {\n finalDisplayName = participant.displayName;\n }\n }\n return finalDisplayName ?? 'Unnamed Participant';\n};\n"]}
|
@@ -57,6 +57,7 @@ export interface CommonCallingHandlers {
|
|
57
57
|
onStopNoiseSuppressionEffect: () => Promise<void>;
|
58
58
|
onStartCaptions: (options?: CaptionsOptions) => Promise<void>;
|
59
59
|
onStopCaptions: () => Promise<void>;
|
60
|
+
onSendRealTimeText: (text: string, isFinalized: boolean) => Promise<void>;
|
60
61
|
onSetSpokenLanguage: (language: string) => Promise<void>;
|
61
62
|
onSetCaptionLanguage: (language: string) => Promise<void>;
|
62
63
|
onSubmitSurvey(survey: CallSurvey): Promise<CallSurveyResponse | undefined>;
|
@@ -427,6 +427,11 @@ export const createDefaultCommonCallingHandlers = memoizeOne((callClient, device
|
|
427
427
|
const captionsFeature = call === null || call === void 0 ? void 0 : call.feature(Features.Captions).captions;
|
428
428
|
yield captionsFeature.setCaptionLanguage(language);
|
429
429
|
});
|
430
|
+
/* @conditional-compile-remove(rtt) */
|
431
|
+
const onSendRealTimeText = (text, isFinalized) => __awaiter(void 0, void 0, void 0, function* () {
|
432
|
+
const realTimeTextFeature = call === null || call === void 0 ? void 0 : call.feature(Features.RealTimeText);
|
433
|
+
yield (realTimeTextFeature === null || realTimeTextFeature === void 0 ? void 0 : realTimeTextFeature.sendRealTimeText(text, isFinalized));
|
434
|
+
});
|
430
435
|
const onSubmitSurvey = (survey) => __awaiter(void 0, void 0, void 0, function* () { return yield (call === null || call === void 0 ? void 0 : call.feature(Features.CallSurvey).submitSurvey(survey)); });
|
431
436
|
const onStartSpotlight = (userIds) => __awaiter(void 0, void 0, void 0, function* () {
|
432
437
|
const participants = userIds === null || userIds === void 0 ? void 0 : userIds.map((userId) => _toCommunicationIdentifier(userId));
|
@@ -520,39 +525,31 @@ export const createDefaultCommonCallingHandlers = memoizeOne((callClient, device
|
|
520
525
|
togetherModeFeature.sceneSize = { width, height };
|
521
526
|
}
|
522
527
|
};
|
523
|
-
/* @conditional-compile-remove(media-access) */
|
524
528
|
const onForbidAudio = (userIds) => __awaiter(void 0, void 0, void 0, function* () {
|
525
529
|
const participants = userIds === null || userIds === void 0 ? void 0 : userIds.map((userId) => _toCommunicationIdentifier(userId));
|
526
530
|
yield (call === null || call === void 0 ? void 0 : call.feature(Features.MediaAccess).forbidAudio(participants));
|
527
531
|
});
|
528
|
-
/* @conditional-compile-remove(media-access) */
|
529
532
|
const onPermitAudio = (userIds) => __awaiter(void 0, void 0, void 0, function* () {
|
530
533
|
const participants = userIds === null || userIds === void 0 ? void 0 : userIds.map((userId) => _toCommunicationIdentifier(userId));
|
531
534
|
yield (call === null || call === void 0 ? void 0 : call.feature(Features.MediaAccess).permitAudio(participants));
|
532
535
|
});
|
533
|
-
/* @conditional-compile-remove(media-access) */
|
534
536
|
const onForbidOthersAudio = () => __awaiter(void 0, void 0, void 0, function* () {
|
535
537
|
yield (call === null || call === void 0 ? void 0 : call.feature(Features.MediaAccess).forbidOthersAudio());
|
536
538
|
});
|
537
|
-
/* @conditional-compile-remove(media-access) */
|
538
539
|
const onPermitOthersAudio = () => __awaiter(void 0, void 0, void 0, function* () {
|
539
540
|
yield (call === null || call === void 0 ? void 0 : call.feature(Features.MediaAccess).permitOthersAudio());
|
540
541
|
});
|
541
|
-
/* @conditional-compile-remove(media-access) */
|
542
542
|
const onForbidVideo = (userIds) => __awaiter(void 0, void 0, void 0, function* () {
|
543
543
|
const participants = userIds === null || userIds === void 0 ? void 0 : userIds.map((userId) => _toCommunicationIdentifier(userId));
|
544
544
|
yield (call === null || call === void 0 ? void 0 : call.feature(Features.MediaAccess).forbidVideo(participants));
|
545
545
|
});
|
546
|
-
/* @conditional-compile-remove(media-access) */
|
547
546
|
const onPermitVideo = (userIds) => __awaiter(void 0, void 0, void 0, function* () {
|
548
547
|
const participants = userIds === null || userIds === void 0 ? void 0 : userIds.map((userId) => _toCommunicationIdentifier(userId));
|
549
548
|
yield (call === null || call === void 0 ? void 0 : call.feature(Features.MediaAccess).permitVideo(participants));
|
550
549
|
});
|
551
|
-
/* @conditional-compile-remove(media-access) */
|
552
550
|
const onForbidOthersVideo = () => __awaiter(void 0, void 0, void 0, function* () {
|
553
551
|
yield (call === null || call === void 0 ? void 0 : call.feature(Features.MediaAccess).forbidOthersVideo());
|
554
552
|
});
|
555
|
-
/* @conditional-compile-remove(media-access) */
|
556
553
|
const onPermitOthersVideo = () => __awaiter(void 0, void 0, void 0, function* () {
|
557
554
|
yield (call === null || call === void 0 ? void 0 : call.feature(Features.MediaAccess).permitOthersVideo());
|
558
555
|
});
|
@@ -614,22 +611,16 @@ export const createDefaultCommonCallingHandlers = memoizeOne((callClient, device
|
|
614
611
|
onSetTogetherModeSceneSize,
|
615
612
|
/* @conditional-compile-remove(together-mode) */
|
616
613
|
onDisposeTogetherModeStreamView,
|
617
|
-
/* @conditional-compile-remove(media-access) */
|
618
614
|
onForbidAudio,
|
619
|
-
/* @conditional-compile-remove(media-access) */
|
620
615
|
onPermitAudio,
|
621
|
-
/* @conditional-compile-remove(media-access) */
|
622
616
|
onForbidOthersAudio,
|
623
|
-
/* @conditional-compile-remove(media-access) */
|
624
617
|
onPermitOthersAudio,
|
625
|
-
/* @conditional-compile-remove(media-access) */
|
626
618
|
onForbidVideo,
|
627
|
-
/* @conditional-compile-remove(media-access) */
|
628
619
|
onPermitVideo,
|
629
|
-
/* @conditional-compile-remove(media-access) */
|
630
620
|
onForbidOthersVideo,
|
631
|
-
|
632
|
-
|
621
|
+
onPermitOthersVideo,
|
622
|
+
/* @conditional-compile-remove(rtt) */
|
623
|
+
onSendRealTimeText
|
633
624
|
};
|
634
625
|
});
|
635
626
|
//# sourceMappingURL=createCommonHandlers.js.map
|