@azure/communication-react 1.24.0-alpha-202502070016 → 1.24.0-alpha-202502110016
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/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-D-iJcjDA.js → ChatMessageComponentAsRichTextEditBox-BdaMdRPs.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-D-iJcjDA.js.map → ChatMessageComponentAsRichTextEditBox-BdaMdRPs.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CNz42FMN.js → RichTextSendBoxWrapper-BUPI_ONF.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-CNz42FMN.js.map → RichTextSendBoxWrapper-BUPI_ONF.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-Cu19Sqfi.js → index-DvpGB9Hs.js} +135 -90
- package/dist/dist-cjs/communication-react/index-DvpGB9Hs.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.js +8 -2
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +1 -0
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js +13 -4
- package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js +2 -2
- package/dist/dist-esm/react-components/src/components/TogetherModeOverlay.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/cy-GB/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/es-MX/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/fr-CA/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +5 -0
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +5 -0
- package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.js +0 -1
- package/dist/dist-esm/react-components/src/theming/FluentThemeProvider.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +6 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +9 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +19 -6
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallComposite.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +2 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +15 -14
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.js +0 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/PeopleButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +9 -5
- package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +1 -0
- package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/cy-GB/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-MX/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-CA/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +1 -1
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/index-Cu19Sqfi.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-202502110016';\n"]}
|
@@ -143,12 +143,18 @@ export const getStartCaptionsInProgress = (state, props) => {
|
|
143
143
|
};
|
144
144
|
/** @private */
|
145
145
|
export const getCurrentCaptionLanguage = (state, props) => {
|
146
|
-
var _a;
|
147
|
-
|
146
|
+
var _a, _b;
|
147
|
+
// we default to 'en' if the currentCaptionLanguage is not set
|
148
|
+
if (((_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.currentCaptionLanguage) === '') {
|
149
|
+
return 'en';
|
150
|
+
}
|
151
|
+
return (_b = state.calls[props.callId]) === null || _b === void 0 ? void 0 : _b.captionsFeature.currentCaptionLanguage;
|
148
152
|
};
|
149
153
|
/** @private */
|
150
154
|
export const getCurrentSpokenLanguage = (state, props) => {
|
151
155
|
var _a;
|
156
|
+
// when currentSpokenLanguage is '', it means the spoken language is not set.
|
157
|
+
// In this case we suggest showing the captions modal to set the spoken language when starting captions
|
152
158
|
return (_a = state.calls[props.callId]) === null || _a === void 0 ? void 0 : _a.captionsFeature.currentSpokenLanguage;
|
153
159
|
};
|
154
160
|
/** @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;AA+BxE;;GAEG;AACH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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
|
+
{"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;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AAC,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,sCAAsC;AACtC,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAsB,EAAE,KAA+B,EAAuB,EAAE;;IACpH,OAAO,MAAA,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,0CAAE,mBAAmB,CAAC,2BAA2B,CAAC;AACpF,CAAC,CAAC;AAEF,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 // we default to 'en' if the currentCaptionLanguage is not set\n if (state.calls[props.callId]?.captionsFeature.currentCaptionLanguage === '') {\n return 'en';\n }\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 // when currentSpokenLanguage is '', it means the spoken language is not set.\n // In this case we suggest showing the captions modal to set the spoken language when starting captions\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"]}
|
@@ -232,6 +232,7 @@ export class CallSubscriber {
|
|
232
232
|
this._localVideoStreamVideoEffectsSubscribers = new Map();
|
233
233
|
this._capabilitiesSubscriber = new CapabilitiesSubscriber(this._callIdRef, this._context, this._call.feature(Features.Capabilities));
|
234
234
|
this._spotlightSubscriber = new SpotlightSubscriber(this._callIdRef, this._context, this._call.feature(Features.Spotlight));
|
235
|
+
/* @conditional-compile-remove(breakout-rooms) */
|
235
236
|
// Clear assigned breakout room closed notification for this call.
|
236
237
|
this._context.deleteLatestNotification('assignedBreakoutRoomClosed');
|
237
238
|
/* @conditional-compile-remove(breakout-rooms) */
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"CallSubscriber.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/CallSubscriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,QAAQ,EAAuC,MAAM,8BAA8B,CAAC;AAC7F,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAIxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EACL,6CAA6C,EAC7C,6CAA6C,EAC9C,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;A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AW,EAAE,CAAC;QAChE,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAC9B,cAAc,EACd,IAAI,qBAAqB,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAC9F,CAAC;IACJ,CAAC;IAEO,yBAAyB,CAAC,WAA8B;QAC9D,MAAM,cAAc,GAAG,6BAA6B,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;QAC7E,MAAM,qBAAqB,GAAG,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAC/E,IAAI,qBAAqB,EAAE,CAAC;YAC1B,qBAAqB,CAAC,WAAW,EAAE,CAAC;YACpC,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;CAyJF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Features, LocalVideoStream, RemoteParticipant } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CallCommon } from './BetaToStableTypes';\nimport { CallContext } from './CallContext';\nimport { CallIdRef } from './CallIdRef';\nimport { CaptionsFeatureSubscriber } from './CaptionsSubscriber';\nimport {\n convertSdkLocalStreamToDeclarativeLocalStream,\n convertSdkParticipantToDeclarativeParticipant\n} from './Converter';\nimport { InternalCallContext } from './InternalCallContext';\n\nimport { LocalVideoStreamVideoEffectsSubscriber } from './LocalVideoStreamVideoEffectsSubscriber';\nimport { ParticipantSubscriber } from './ParticipantSubscriber';\nimport { RecordingSubscriber } from './RecordingSubscriber';\nimport { PPTLiveSubscriber } from './PPTLiveSubscriber';\nimport { disposeView } from './StreamUtils';\nimport { TranscriptionSubscriber } from './TranscriptionSubscriber';\nimport { UserFacingDiagnosticsSubscriber } from './UserFacingDiagnosticsSubscriber';\nimport { RaiseHandSubscriber } from './RaiseHandSubscriber';\nimport { OptimalVideoCountSubscriber } from './OptimalVideoCountSubscriber';\n\nimport { CapabilitiesSubscriber } from './CapabilitiesSubscriber';\nimport { ReactionSubscriber } from './ReactionSubscriber';\nimport { SpotlightSubscriber } from './SpotlightSubscriber';\n/* @conditional-compile-remove(local-recording-notification) */\nimport { LocalRecordingSubscriber } from './LocalRecordingSubscriber';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { BreakoutRoomsSubscriber } from './BreakoutRoomsSubscriber';\n/* @conditional-compile-remove(together-mode) */\nimport { TogetherModeSubscriber } from './TogetherModeSubscriber';\nimport { MediaAccessSubscriber } from './MediaAccessSubscriber';\nimport { _isTeamsMeeting } from './TypeGuards';\n/* @conditional-compile-remove(rtt) */\nimport { RealTimeTextSubscriber } from './RealTimeTextSubscriber';\n\n/**\n * Keeps track of the listeners assigned to a particular call because when we get an event from SDK, it doesn't tell us\n * which call it is for. If we keep track of this then we know which call in the state that needs an update and also\n * which property of that call. Also we can use this when unregistering to a call.\n */\nexport class CallSubscriber {\n private _call: CallCommon;\n private _callIdRef: CallIdRef;\n private _context: CallContext;\n private _internalContext: InternalCallContext;\n\n private _diagnosticsSubscriber: UserFacingDiagnosticsSubscriber;\n private _participantSubscribers: Map<string, ParticipantSubscriber>;\n private _recordingSubscriber: RecordingSubscriber;\n private _transcriptionSubscriber: TranscriptionSubscriber;\n /* @conditional-compile-remove(local-recording-notification) */\n private _localRecordingSubscriber?: LocalRecordingSubscriber;\n private _pptLiveSubscriber: PPTLiveSubscriber;\n private _optimalVideoCountSubscriber: OptimalVideoCountSubscriber;\n private _CaptionsFeatureSubscriber?: CaptionsFeatureSubscriber;\n /* @conditional-compile-remove(rtt) */\n private _realTimeTextSubscriber?: RealTimeTextSubscriber;\n private _raiseHandSubscriber?: RaiseHandSubscriber;\n private _reactionSubscriber?: ReactionSubscriber;\n\n private _localVideoStreamVideoEffectsSubscribers: Map<string, LocalVideoStreamVideoEffectsSubscriber>;\n\n private _capabilitiesSubscriber: CapabilitiesSubscriber;\n private _spotlightSubscriber: SpotlightSubscriber;\n /* @conditional-compile-remove(breakout-rooms) */\n private _breakoutRoomsSubscriber: BreakoutRoomsSubscriber;\n /* @conditional-compile-remove(together-mode) */\n private _togetherModeSubscriber: TogetherModeSubscriber;\n private _mediaAccessSubscriber: MediaAccessSubscriber;\n\n constructor(call: CallCommon, context: CallContext, internalContext: InternalCallContext) {\n this._call = call;\n this._callIdRef = { callId: call.id };\n this._context = context;\n this._internalContext = internalContext;\n\n this._diagnosticsSubscriber = new UserFacingDiagnosticsSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.UserFacingDiagnostics)\n );\n this._participantSubscribers = new Map<string, ParticipantSubscriber>();\n this._recordingSubscriber = new RecordingSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Recording)\n );\n this._pptLiveSubscriber = new PPTLiveSubscriber(this._callIdRef, this._context, this._call);\n this._transcriptionSubscriber = new TranscriptionSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Transcription)\n );\n this._raiseHandSubscriber = new RaiseHandSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.RaiseHand)\n );\n this._reactionSubscriber = new ReactionSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Reaction)\n );\n this._optimalVideoCountSubscriber = new OptimalVideoCountSubscriber({\n callIdRef: this._callIdRef,\n context: this._context,\n localOptimalVideoCountFeature: this._call.feature(Features.OptimalVideoCount)\n });\n\n this._localVideoStreamVideoEffectsSubscribers = new Map();\n\n this._capabilitiesSubscriber = new CapabilitiesSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Capabilities)\n );\n\n this._spotlightSubscriber = new SpotlightSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Spotlight)\n );\n\n // Clear assigned breakout room closed notification for this call.\n this._context.deleteLatestNotification('assignedBreakoutRoomClosed');\n /* @conditional-compile-remove(breakout-rooms) */\n this._breakoutRoomsSubscriber = new BreakoutRoomsSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.BreakoutRooms)\n );\n /* @conditional-compile-remove(together-mode) */\n this._togetherModeSubscriber = new TogetherModeSubscriber(\n this._callIdRef,\n this._context,\n this._internalContext,\n this._call.feature(Features.TogetherMode)\n );\n\n this._mediaAccessSubscriber = new MediaAccessSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.MediaAccess)\n );\n /* @conditional-compile-remove(rtt) */\n this._realTimeTextSubscriber = new RealTimeTextSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.RealTimeText)\n );\n\n this.subscribe();\n }\n\n private _safeSubscribeInitCaptionSubscriber = (): void => {\n this._safeSubscribe(this.initCaptionSubscriber);\n };\n\n private _safeSubscribeInitTeamsMeetingConference = (): void => {\n this._safeSubscribe(this.initTeamsMeetingConference);\n };\n\n /* @conditional-compile-remove(local-recording-notification) */\n private _safeSubscribeInitLocalRecordingNotificationSubscriber = (): void => {\n this._safeSubscribe(this.initLocalRecordingNotificationSubscriber);\n };\n\n private subscribe = (): void => {\n this._call.on('stateChanged', this.stateChanged);\n this._call.on('stateChanged', this._safeSubscribeInitCaptionSubscriber);\n this._call.on('stateChanged', this._safeSubscribeInitTeamsMeetingConference);\n /* @conditional-compile-remove(local-recording-notification) */\n this._call.on('stateChanged', this._safeSubscribeInitLocalRecordingNotificationSubscriber);\n this._call.on('idChanged', this.idChanged);\n this._call.on('isScreenSharingOnChanged', this.isScreenSharingOnChanged);\n this._call.on('remoteParticipantsUpdated', this.remoteParticipantsUpdated);\n this._call.on('localVideoStreamsUpdated', this.localVideoStreamsUpdated);\n this._call.on('isMutedChanged', this.isMuteChanged);\n this._call.on('roleChanged', this.callRoleChangedHandler);\n this._call.feature(Features.DominantSpeakers).on('dominantSpeakersChanged', this.dominantSpeakersChanged);\n /* @conditional-compile-remove(total-participant-count) */\n this._call.on('totalParticipantCountChanged', this.totalParticipantCountChangedHandler);\n this._call.on('mutedByOthers', this.mutedByOthersHandler);\n\n for (const localVideoStream of this._call.localVideoStreams) {\n this._internalContext.setLocalRenderInfo(\n this._callIdRef.callId,\n localVideoStream.mediaStreamType,\n localVideoStream,\n 'NotRendered',\n undefined\n );\n }\n\n if (this._call.remoteParticipants.length > 0) {\n this._call.remoteParticipants.forEach((participant: RemoteParticipant) => {\n this.addParticipantListener(participant);\n });\n\n this._context.setCallRemoteParticipants(\n this._callIdRef.callId,\n this._call.remoteParticipants.map(convertSdkParticipantToDeclarativeParticipant),\n []\n );\n }\n };\n\n public unsubscribe = (): void => {\n this._call.off('stateChanged', this.stateChanged);\n this._call.off('stateChanged', this._safeSubscribeInitCaptionSubscriber);\n this._call.off('stateChanged', this._safeSubscribeInitTeamsMeetingConference);\n /* @conditional-compile-remove(local-recording-notification) */\n this._call.off('stateChanged', this._safeSubscribeInitLocalRecordingNotificationSubscriber);\n this._call.off('idChanged', this.idChanged);\n this._call.off('isScreenSharingOnChanged', this.isScreenSharingOnChanged);\n this._call.off('remoteParticipantsUpdated', this.remoteParticipantsUpdated);\n this._call.off('localVideoStreamsUpdated', this.localVideoStreamsUpdated);\n this._call.off('isMutedChanged', this.isMuteChanged);\n this._call.off('roleChanged', this.callRoleChangedHandler);\n /* @conditional-compile-remove(total-participant-count) */\n this._call.off('totalParticipantCountChanged', this.totalParticipantCountChangedHandler);\n this._call.off('mutedByOthers', this.mutedByOthersHandler);\n\n this._participantSubscribers.forEach((participantSubscriber: ParticipantSubscriber) => {\n participantSubscriber.unsubscribe();\n });\n this._participantSubscribers.clear();\n\n // If we are unsubscribing that means we no longer want to display any video for this call (callEnded or callAgent\n // disposed) and we should not be updating it any more. So if video is rendering we stop rendering.\n for (const localVideoStream of this._call.localVideoStreams) {\n const mediaStreamType = localVideoStream.mediaStreamType;\n disposeView(\n this._context,\n this._internalContext,\n this._callIdRef.callId,\n undefined,\n convertSdkLocalStreamToDeclarativeLocalStream(localVideoStream)\n );\n this._internalContext.deleteLocalRenderInfo(this._callIdRef.callId, mediaStreamType);\n }\n\n this._diagnosticsSubscriber.unsubscribe();\n this._recordingSubscriber.unsubscribe();\n this._transcriptionSubscriber.unsubscribe();\n /* @conditional-compile-remove(local-recording-notification) */\n this._localRecordingSubscriber?.unsubscribe();\n this._optimalVideoCountSubscriber.unsubscribe();\n this._pptLiveSubscriber.unsubscribe();\n this._CaptionsFeatureSubscriber?.unsubscribe();\n /* @conditional-compile-remove(rtt) */\n this._realTimeTextSubscriber?.unsubscribe();\n this._raiseHandSubscriber?.unsubscribe();\n\n this._capabilitiesSubscriber.unsubscribe();\n this._reactionSubscriber?.unsubscribe();\n this._spotlightSubscriber.unsubscribe();\n /* @conditional-compile-remove(breakout-rooms) */\n this._breakoutRoomsSubscriber.unsubscribe();\n /* @conditional-compile-remove(together-mode) */\n this._togetherModeSubscriber.unsubscribe();\n this._mediaAccessSubscriber.unsubscribe();\n };\n\n // This is a helper function to safely call subscriber functions. This is needed in order to prevent events\n // with the same event type from failing to fire due to a subscriber throwing an error upon subscription.\n // Wrap your listeners with this helper function if your listener can fail due to initialization or fail\n // during a function call. This will prevent other events using the same event type from failing to fire.\n private _safeSubscribe(subscriber: () => void): void {\n try {\n subscriber();\n } catch (e) {\n this._context.teeErrorToState(e as Error, 'Call.on');\n }\n }\n\n private addParticipantListener(participant: RemoteParticipant): void {\n const participantKey = toFlatCommunicationIdentifier(participant.identifier);\n this._participantSubscribers.get(participantKey)?.unsubscribe();\n this._participantSubscribers.set(\n participantKey,\n new ParticipantSubscriber(this._callIdRef, participant, this._context, this._internalContext)\n );\n }\n\n private removeParticipantListener(participant: RemoteParticipant): void {\n const participantKey = toFlatCommunicationIdentifier(participant.identifier);\n const participantSubscriber = this._participantSubscribers.get(participantKey);\n if (participantSubscriber) {\n participantSubscriber.unsubscribe();\n this._participantSubscribers.delete(participantKey);\n }\n }\n\n private stateChanged = (): void => {\n this._context.setCallState(this._callIdRef.callId, this._call.state);\n };\n\n private initCaptionSubscriber = (): void => {\n // subscribe to captions here so that we don't call captions when call is not initialized\n if (this._call.state === 'Connected' && !this._CaptionsFeatureSubscriber) {\n this._CaptionsFeatureSubscriber = new CaptionsFeatureSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Captions)\n );\n this._call.off('stateChanged', this._safeSubscribeInitCaptionSubscriber);\n }\n };\n\n private initTeamsMeetingConference = (): void => {\n if (this._call.state === 'Connected' && _isTeamsMeeting(this._call)) {\n this._call\n .feature(Features.TeamsMeetingAudioConferencing)\n .getTeamsMeetingAudioConferencingDetails()\n .then((teamsMeetingConferenceDetails) => {\n this._context.setTeamsMeetingConference(this._callIdRef.callId, teamsMeetingConferenceDetails);\n });\n this._call.off('stateChanged', this._safeSubscribeInitTeamsMeetingConference);\n }\n };\n\n /* @conditional-compile-remove(local-recording-notification) */\n private initLocalRecordingNotificationSubscriber = (): void => {\n // Subscribe to LocalRecordingFeature as it is only available in interop scenarios\n // Will throw an error if not in interop scenarios\n if (this._call.state === 'Connected' && this._call.kind === 'TeamsCall' && !this._localRecordingSubscriber) {\n this._localRecordingSubscriber = new LocalRecordingSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.LocalRecording)\n );\n this._call.off('stateChanged', this._safeSubscribeInitLocalRecordingNotificationSubscriber);\n }\n };\n\n private idChanged = (): void => {\n this._internalContext.setCallId(this._call.id, this._callIdRef.callId);\n this._context.setCallId(this._call.id, this._callIdRef.callId);\n this._callIdRef.callId = this._call.id;\n };\n\n private isScreenSharingOnChanged = (): void => {\n this._context.setCallIsScreenSharingOn(this._callIdRef.callId, this._call.isScreenSharingOn);\n };\n\n private isMuteChanged = (): void => {\n this._context.setCallIsMicrophoneMuted(this._callIdRef.callId, this._call.isMuted);\n };\n\n private callRoleChangedHandler = (): void => {\n this._context.setRole(this._callIdRef.callId, this._call.role);\n };\n\n /* @conditional-compile-remove(total-participant-count) */\n private totalParticipantCountChangedHandler = (): void => {\n this._context.setTotalParticipantCount(this._callIdRef.callId, this._call.totalParticipantCount);\n };\n\n // TODO: Tee to notification state once available\n private mutedByOthersHandler = (): void => {\n this._context.teeErrorToState(\n { name: 'mutedByOthers', message: 'Muted by another participant' },\n 'Call.mutedByOthers'\n );\n };\n\n private remoteParticipantsUpdated = (event: { added: RemoteParticipant[]; removed: RemoteParticipant[] }): void => {\n event.added.forEach((participant: RemoteParticipant) => {\n this.addParticipantListener(participant);\n });\n event.removed.forEach((participant: RemoteParticipant) => {\n this.removeParticipantListener(participant);\n });\n\n // Remove any added participants from remoteParticipantsEnded if they are there and add any removed participants to\n // remoteParticipantsEnded.\n this._context.setCallRemoteParticipantsEnded(\n this._callIdRef.callId,\n event.removed.map(convertSdkParticipantToDeclarativeParticipant),\n event.added.map((participant: RemoteParticipant) => {\n return toFlatCommunicationIdentifier(participant.identifier);\n })\n );\n\n // Add added participants to remoteParticipants and remove removed participants from remoteParticipants.\n this._context.setCallRemoteParticipants(\n this._callIdRef.callId,\n event.added.map(convertSdkParticipantToDeclarativeParticipant),\n event.removed.map((participant: RemoteParticipant) => {\n return toFlatCommunicationIdentifier(participant.identifier);\n })\n );\n };\n\n private localVideoStreamsUpdated = (event: { added: LocalVideoStream[]; removed: LocalVideoStream[] }): void => {\n for (const localVideoStream of event.added) {\n const mediaStreamType = localVideoStream.mediaStreamType;\n // IMPORTANT: The internalContext should be set before context. This is done to ensure that the internal context\n // has the required data when component re-renders due to external state changes.\n this._internalContext.setLocalRenderInfo(\n this._callIdRef.callId,\n mediaStreamType,\n localVideoStream,\n 'NotRendered',\n undefined\n );\n\n // Subscribe to video effect changes\n this._localVideoStreamVideoEffectsSubscribers.get(mediaStreamType)?.unsubscribe();\n this._localVideoStreamVideoEffectsSubscribers.set(\n mediaStreamType,\n new LocalVideoStreamVideoEffectsSubscriber({\n parent: this._callIdRef,\n context: this._context,\n localVideoStream: localVideoStream,\n localVideoStreamEffectsAPI: localVideoStream.feature(Features.VideoEffects)\n })\n );\n }\n for (const localVideoStream of event.removed) {\n const mediaStreamType = localVideoStream.mediaStreamType;\n this._localVideoStreamVideoEffectsSubscribers.get(mediaStreamType)?.unsubscribe();\n disposeView(\n this._context,\n this._internalContext,\n this._callIdRef.callId,\n undefined,\n convertSdkLocalStreamToDeclarativeLocalStream(localVideoStream)\n );\n\n this._internalContext.deleteLocalRenderInfo(this._callIdRef.callId, mediaStreamType);\n }\n\n this._context.setCallLocalVideoStream(\n this._callIdRef.callId,\n event.added.map(convertSdkLocalStreamToDeclarativeLocalStream),\n event.removed.map(convertSdkLocalStreamToDeclarativeLocalStream)\n );\n };\n\n private dominantSpeakersChanged = (): void => {\n const dominantSpeakers = this._call.feature(Features.DominantSpeakers).dominantSpeakers;\n this._context.setCallDominantSpeakers(this._callIdRef.callId, dominantSpeakers);\n };\n}\n"]}
|
1
|
+
{"version":3,"file":"CallSubscriber.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/CallSubscriber.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,QAAQ,EAAuC,MAAM,8BAA8B,CAAC;AAC7F,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAIxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EACL,6CAA6C,EAC7C,6CAA6C,EAC9C,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CA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BAAqB,EAAE,CAAC;YAC1B,qBAAqB,CAAC,WAAW,EAAE,CAAC;YACpC,IAAI,CAAC,uBAAuB,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;CAyJF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Features, LocalVideoStream, RemoteParticipant } from '@azure/communication-calling';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CallCommon } from './BetaToStableTypes';\nimport { CallContext } from './CallContext';\nimport { CallIdRef } from './CallIdRef';\nimport { CaptionsFeatureSubscriber } from './CaptionsSubscriber';\nimport {\n convertSdkLocalStreamToDeclarativeLocalStream,\n convertSdkParticipantToDeclarativeParticipant\n} from './Converter';\nimport { InternalCallContext } from './InternalCallContext';\n\nimport { LocalVideoStreamVideoEffectsSubscriber } from './LocalVideoStreamVideoEffectsSubscriber';\nimport { ParticipantSubscriber } from './ParticipantSubscriber';\nimport { RecordingSubscriber } from './RecordingSubscriber';\nimport { PPTLiveSubscriber } from './PPTLiveSubscriber';\nimport { disposeView } from './StreamUtils';\nimport { TranscriptionSubscriber } from './TranscriptionSubscriber';\nimport { UserFacingDiagnosticsSubscriber } from './UserFacingDiagnosticsSubscriber';\nimport { RaiseHandSubscriber } from './RaiseHandSubscriber';\nimport { OptimalVideoCountSubscriber } from './OptimalVideoCountSubscriber';\n\nimport { CapabilitiesSubscriber } from './CapabilitiesSubscriber';\nimport { ReactionSubscriber } from './ReactionSubscriber';\nimport { SpotlightSubscriber } from './SpotlightSubscriber';\n/* @conditional-compile-remove(local-recording-notification) */\nimport { LocalRecordingSubscriber } from './LocalRecordingSubscriber';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { BreakoutRoomsSubscriber } from './BreakoutRoomsSubscriber';\n/* @conditional-compile-remove(together-mode) */\nimport { TogetherModeSubscriber } from './TogetherModeSubscriber';\nimport { MediaAccessSubscriber } from './MediaAccessSubscriber';\nimport { _isTeamsMeeting } from './TypeGuards';\n/* @conditional-compile-remove(rtt) */\nimport { RealTimeTextSubscriber } from './RealTimeTextSubscriber';\n\n/**\n * Keeps track of the listeners assigned to a particular call because when we get an event from SDK, it doesn't tell us\n * which call it is for. If we keep track of this then we know which call in the state that needs an update and also\n * which property of that call. Also we can use this when unregistering to a call.\n */\nexport class CallSubscriber {\n private _call: CallCommon;\n private _callIdRef: CallIdRef;\n private _context: CallContext;\n private _internalContext: InternalCallContext;\n\n private _diagnosticsSubscriber: UserFacingDiagnosticsSubscriber;\n private _participantSubscribers: Map<string, ParticipantSubscriber>;\n private _recordingSubscriber: RecordingSubscriber;\n private _transcriptionSubscriber: TranscriptionSubscriber;\n /* @conditional-compile-remove(local-recording-notification) */\n private _localRecordingSubscriber?: LocalRecordingSubscriber;\n private _pptLiveSubscriber: PPTLiveSubscriber;\n private _optimalVideoCountSubscriber: OptimalVideoCountSubscriber;\n private _CaptionsFeatureSubscriber?: CaptionsFeatureSubscriber;\n /* @conditional-compile-remove(rtt) */\n private _realTimeTextSubscriber?: RealTimeTextSubscriber;\n private _raiseHandSubscriber?: RaiseHandSubscriber;\n private _reactionSubscriber?: ReactionSubscriber;\n\n private _localVideoStreamVideoEffectsSubscribers: Map<string, LocalVideoStreamVideoEffectsSubscriber>;\n\n private _capabilitiesSubscriber: CapabilitiesSubscriber;\n private _spotlightSubscriber: SpotlightSubscriber;\n /* @conditional-compile-remove(breakout-rooms) */\n private _breakoutRoomsSubscriber: BreakoutRoomsSubscriber;\n /* @conditional-compile-remove(together-mode) */\n private _togetherModeSubscriber: TogetherModeSubscriber;\n private _mediaAccessSubscriber: MediaAccessSubscriber;\n\n constructor(call: CallCommon, context: CallContext, internalContext: InternalCallContext) {\n this._call = call;\n this._callIdRef = { callId: call.id };\n this._context = context;\n this._internalContext = internalContext;\n\n this._diagnosticsSubscriber = new UserFacingDiagnosticsSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.UserFacingDiagnostics)\n );\n this._participantSubscribers = new Map<string, ParticipantSubscriber>();\n this._recordingSubscriber = new RecordingSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Recording)\n );\n this._pptLiveSubscriber = new PPTLiveSubscriber(this._callIdRef, this._context, this._call);\n this._transcriptionSubscriber = new TranscriptionSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Transcription)\n );\n this._raiseHandSubscriber = new RaiseHandSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.RaiseHand)\n );\n this._reactionSubscriber = new ReactionSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Reaction)\n );\n this._optimalVideoCountSubscriber = new OptimalVideoCountSubscriber({\n callIdRef: this._callIdRef,\n context: this._context,\n localOptimalVideoCountFeature: this._call.feature(Features.OptimalVideoCount)\n });\n\n this._localVideoStreamVideoEffectsSubscribers = new Map();\n\n this._capabilitiesSubscriber = new CapabilitiesSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Capabilities)\n );\n\n this._spotlightSubscriber = new SpotlightSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Spotlight)\n );\n\n /* @conditional-compile-remove(breakout-rooms) */\n // Clear assigned breakout room closed notification for this call.\n this._context.deleteLatestNotification('assignedBreakoutRoomClosed');\n /* @conditional-compile-remove(breakout-rooms) */\n this._breakoutRoomsSubscriber = new BreakoutRoomsSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.BreakoutRooms)\n );\n /* @conditional-compile-remove(together-mode) */\n this._togetherModeSubscriber = new TogetherModeSubscriber(\n this._callIdRef,\n this._context,\n this._internalContext,\n this._call.feature(Features.TogetherMode)\n );\n\n this._mediaAccessSubscriber = new MediaAccessSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.MediaAccess)\n );\n /* @conditional-compile-remove(rtt) */\n this._realTimeTextSubscriber = new RealTimeTextSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.RealTimeText)\n );\n\n this.subscribe();\n }\n\n private _safeSubscribeInitCaptionSubscriber = (): void => {\n this._safeSubscribe(this.initCaptionSubscriber);\n };\n\n private _safeSubscribeInitTeamsMeetingConference = (): void => {\n this._safeSubscribe(this.initTeamsMeetingConference);\n };\n\n /* @conditional-compile-remove(local-recording-notification) */\n private _safeSubscribeInitLocalRecordingNotificationSubscriber = (): void => {\n this._safeSubscribe(this.initLocalRecordingNotificationSubscriber);\n };\n\n private subscribe = (): void => {\n this._call.on('stateChanged', this.stateChanged);\n this._call.on('stateChanged', this._safeSubscribeInitCaptionSubscriber);\n this._call.on('stateChanged', this._safeSubscribeInitTeamsMeetingConference);\n /* @conditional-compile-remove(local-recording-notification) */\n this._call.on('stateChanged', this._safeSubscribeInitLocalRecordingNotificationSubscriber);\n this._call.on('idChanged', this.idChanged);\n this._call.on('isScreenSharingOnChanged', this.isScreenSharingOnChanged);\n this._call.on('remoteParticipantsUpdated', this.remoteParticipantsUpdated);\n this._call.on('localVideoStreamsUpdated', this.localVideoStreamsUpdated);\n this._call.on('isMutedChanged', this.isMuteChanged);\n this._call.on('roleChanged', this.callRoleChangedHandler);\n this._call.feature(Features.DominantSpeakers).on('dominantSpeakersChanged', this.dominantSpeakersChanged);\n /* @conditional-compile-remove(total-participant-count) */\n this._call.on('totalParticipantCountChanged', this.totalParticipantCountChangedHandler);\n this._call.on('mutedByOthers', this.mutedByOthersHandler);\n\n for (const localVideoStream of this._call.localVideoStreams) {\n this._internalContext.setLocalRenderInfo(\n this._callIdRef.callId,\n localVideoStream.mediaStreamType,\n localVideoStream,\n 'NotRendered',\n undefined\n );\n }\n\n if (this._call.remoteParticipants.length > 0) {\n this._call.remoteParticipants.forEach((participant: RemoteParticipant) => {\n this.addParticipantListener(participant);\n });\n\n this._context.setCallRemoteParticipants(\n this._callIdRef.callId,\n this._call.remoteParticipants.map(convertSdkParticipantToDeclarativeParticipant),\n []\n );\n }\n };\n\n public unsubscribe = (): void => {\n this._call.off('stateChanged', this.stateChanged);\n this._call.off('stateChanged', this._safeSubscribeInitCaptionSubscriber);\n this._call.off('stateChanged', this._safeSubscribeInitTeamsMeetingConference);\n /* @conditional-compile-remove(local-recording-notification) */\n this._call.off('stateChanged', this._safeSubscribeInitLocalRecordingNotificationSubscriber);\n this._call.off('idChanged', this.idChanged);\n this._call.off('isScreenSharingOnChanged', this.isScreenSharingOnChanged);\n this._call.off('remoteParticipantsUpdated', this.remoteParticipantsUpdated);\n this._call.off('localVideoStreamsUpdated', this.localVideoStreamsUpdated);\n this._call.off('isMutedChanged', this.isMuteChanged);\n this._call.off('roleChanged', this.callRoleChangedHandler);\n /* @conditional-compile-remove(total-participant-count) */\n this._call.off('totalParticipantCountChanged', this.totalParticipantCountChangedHandler);\n this._call.off('mutedByOthers', this.mutedByOthersHandler);\n\n this._participantSubscribers.forEach((participantSubscriber: ParticipantSubscriber) => {\n participantSubscriber.unsubscribe();\n });\n this._participantSubscribers.clear();\n\n // If we are unsubscribing that means we no longer want to display any video for this call (callEnded or callAgent\n // disposed) and we should not be updating it any more. So if video is rendering we stop rendering.\n for (const localVideoStream of this._call.localVideoStreams) {\n const mediaStreamType = localVideoStream.mediaStreamType;\n disposeView(\n this._context,\n this._internalContext,\n this._callIdRef.callId,\n undefined,\n convertSdkLocalStreamToDeclarativeLocalStream(localVideoStream)\n );\n this._internalContext.deleteLocalRenderInfo(this._callIdRef.callId, mediaStreamType);\n }\n\n this._diagnosticsSubscriber.unsubscribe();\n this._recordingSubscriber.unsubscribe();\n this._transcriptionSubscriber.unsubscribe();\n /* @conditional-compile-remove(local-recording-notification) */\n this._localRecordingSubscriber?.unsubscribe();\n this._optimalVideoCountSubscriber.unsubscribe();\n this._pptLiveSubscriber.unsubscribe();\n this._CaptionsFeatureSubscriber?.unsubscribe();\n /* @conditional-compile-remove(rtt) */\n this._realTimeTextSubscriber?.unsubscribe();\n this._raiseHandSubscriber?.unsubscribe();\n\n this._capabilitiesSubscriber.unsubscribe();\n this._reactionSubscriber?.unsubscribe();\n this._spotlightSubscriber.unsubscribe();\n /* @conditional-compile-remove(breakout-rooms) */\n this._breakoutRoomsSubscriber.unsubscribe();\n /* @conditional-compile-remove(together-mode) */\n this._togetherModeSubscriber.unsubscribe();\n this._mediaAccessSubscriber.unsubscribe();\n };\n\n // This is a helper function to safely call subscriber functions. This is needed in order to prevent events\n // with the same event type from failing to fire due to a subscriber throwing an error upon subscription.\n // Wrap your listeners with this helper function if your listener can fail due to initialization or fail\n // during a function call. This will prevent other events using the same event type from failing to fire.\n private _safeSubscribe(subscriber: () => void): void {\n try {\n subscriber();\n } catch (e) {\n this._context.teeErrorToState(e as Error, 'Call.on');\n }\n }\n\n private addParticipantListener(participant: RemoteParticipant): void {\n const participantKey = toFlatCommunicationIdentifier(participant.identifier);\n this._participantSubscribers.get(participantKey)?.unsubscribe();\n this._participantSubscribers.set(\n participantKey,\n new ParticipantSubscriber(this._callIdRef, participant, this._context, this._internalContext)\n );\n }\n\n private removeParticipantListener(participant: RemoteParticipant): void {\n const participantKey = toFlatCommunicationIdentifier(participant.identifier);\n const participantSubscriber = this._participantSubscribers.get(participantKey);\n if (participantSubscriber) {\n participantSubscriber.unsubscribe();\n this._participantSubscribers.delete(participantKey);\n }\n }\n\n private stateChanged = (): void => {\n this._context.setCallState(this._callIdRef.callId, this._call.state);\n };\n\n private initCaptionSubscriber = (): void => {\n // subscribe to captions here so that we don't call captions when call is not initialized\n if (this._call.state === 'Connected' && !this._CaptionsFeatureSubscriber) {\n this._CaptionsFeatureSubscriber = new CaptionsFeatureSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.Captions)\n );\n this._call.off('stateChanged', this._safeSubscribeInitCaptionSubscriber);\n }\n };\n\n private initTeamsMeetingConference = (): void => {\n if (this._call.state === 'Connected' && _isTeamsMeeting(this._call)) {\n this._call\n .feature(Features.TeamsMeetingAudioConferencing)\n .getTeamsMeetingAudioConferencingDetails()\n .then((teamsMeetingConferenceDetails) => {\n this._context.setTeamsMeetingConference(this._callIdRef.callId, teamsMeetingConferenceDetails);\n });\n this._call.off('stateChanged', this._safeSubscribeInitTeamsMeetingConference);\n }\n };\n\n /* @conditional-compile-remove(local-recording-notification) */\n private initLocalRecordingNotificationSubscriber = (): void => {\n // Subscribe to LocalRecordingFeature as it is only available in interop scenarios\n // Will throw an error if not in interop scenarios\n if (this._call.state === 'Connected' && this._call.kind === 'TeamsCall' && !this._localRecordingSubscriber) {\n this._localRecordingSubscriber = new LocalRecordingSubscriber(\n this._callIdRef,\n this._context,\n this._call.feature(Features.LocalRecording)\n );\n this._call.off('stateChanged', this._safeSubscribeInitLocalRecordingNotificationSubscriber);\n }\n };\n\n private idChanged = (): void => {\n this._internalContext.setCallId(this._call.id, this._callIdRef.callId);\n this._context.setCallId(this._call.id, this._callIdRef.callId);\n this._callIdRef.callId = this._call.id;\n };\n\n private isScreenSharingOnChanged = (): void => {\n this._context.setCallIsScreenSharingOn(this._callIdRef.callId, this._call.isScreenSharingOn);\n };\n\n private isMuteChanged = (): void => {\n this._context.setCallIsMicrophoneMuted(this._callIdRef.callId, this._call.isMuted);\n };\n\n private callRoleChangedHandler = (): void => {\n this._context.setRole(this._callIdRef.callId, this._call.role);\n };\n\n /* @conditional-compile-remove(total-participant-count) */\n private totalParticipantCountChangedHandler = (): void => {\n this._context.setTotalParticipantCount(this._callIdRef.callId, this._call.totalParticipantCount);\n };\n\n // TODO: Tee to notification state once available\n private mutedByOthersHandler = (): void => {\n this._context.teeErrorToState(\n { name: 'mutedByOthers', message: 'Muted by another participant' },\n 'Call.mutedByOthers'\n );\n };\n\n private remoteParticipantsUpdated = (event: { added: RemoteParticipant[]; removed: RemoteParticipant[] }): void => {\n event.added.forEach((participant: RemoteParticipant) => {\n this.addParticipantListener(participant);\n });\n event.removed.forEach((participant: RemoteParticipant) => {\n this.removeParticipantListener(participant);\n });\n\n // Remove any added participants from remoteParticipantsEnded if they are there and add any removed participants to\n // remoteParticipantsEnded.\n this._context.setCallRemoteParticipantsEnded(\n this._callIdRef.callId,\n event.removed.map(convertSdkParticipantToDeclarativeParticipant),\n event.added.map((participant: RemoteParticipant) => {\n return toFlatCommunicationIdentifier(participant.identifier);\n })\n );\n\n // Add added participants to remoteParticipants and remove removed participants from remoteParticipants.\n this._context.setCallRemoteParticipants(\n this._callIdRef.callId,\n event.added.map(convertSdkParticipantToDeclarativeParticipant),\n event.removed.map((participant: RemoteParticipant) => {\n return toFlatCommunicationIdentifier(participant.identifier);\n })\n );\n };\n\n private localVideoStreamsUpdated = (event: { added: LocalVideoStream[]; removed: LocalVideoStream[] }): void => {\n for (const localVideoStream of event.added) {\n const mediaStreamType = localVideoStream.mediaStreamType;\n // IMPORTANT: The internalContext should be set before context. This is done to ensure that the internal context\n // has the required data when component re-renders due to external state changes.\n this._internalContext.setLocalRenderInfo(\n this._callIdRef.callId,\n mediaStreamType,\n localVideoStream,\n 'NotRendered',\n undefined\n );\n\n // Subscribe to video effect changes\n this._localVideoStreamVideoEffectsSubscribers.get(mediaStreamType)?.unsubscribe();\n this._localVideoStreamVideoEffectsSubscribers.set(\n mediaStreamType,\n new LocalVideoStreamVideoEffectsSubscriber({\n parent: this._callIdRef,\n context: this._context,\n localVideoStream: localVideoStream,\n localVideoStreamEffectsAPI: localVideoStream.feature(Features.VideoEffects)\n })\n );\n }\n for (const localVideoStream of event.removed) {\n const mediaStreamType = localVideoStream.mediaStreamType;\n this._localVideoStreamVideoEffectsSubscribers.get(mediaStreamType)?.unsubscribe();\n disposeView(\n this._context,\n this._internalContext,\n this._callIdRef.callId,\n undefined,\n convertSdkLocalStreamToDeclarativeLocalStream(localVideoStream)\n );\n\n this._internalContext.deleteLocalRenderInfo(this._callIdRef.callId, mediaStreamType);\n }\n\n this._context.setCallLocalVideoStream(\n this._callIdRef.callId,\n event.added.map(convertSdkLocalStreamToDeclarativeLocalStream),\n event.removed.map(convertSdkLocalStreamToDeclarativeLocalStream)\n );\n };\n\n private dominantSpeakersChanged = (): void => {\n const dominantSpeakers = this._call.feature(Features.DominantSpeakers).dominantSpeakers;\n this._context.setCallDominantSpeakers(this._callIdRef.callId, dominantSpeakers);\n };\n}\n"]}
|
@@ -27,7 +27,6 @@ export const ParticipantItem = (props) => {
|
|
27
27
|
const participantItemId = useId();
|
28
28
|
const participantItemFlyoutId = useId();
|
29
29
|
const hasFlyout = !!(menuItems && (menuItems === null || menuItems === void 0 ? void 0 : menuItems.length) > 0);
|
30
|
-
const flyoutShowing = hasFlyout && menuHidden;
|
31
30
|
const strings = Object.assign(Object.assign({}, localeStrings), props.strings);
|
32
31
|
const participantStateString = formatParticipantStateString(props, strings);
|
33
32
|
const showMenuIcon = !participantStateString && (itemHovered || !menuHidden) && hasFlyout;
|
@@ -52,9 +51,15 @@ export const ParticipantItem = (props) => {
|
|
52
51
|
setItemHovered(false);
|
53
52
|
setMenuHidden(true);
|
54
53
|
};
|
55
|
-
const menuButton = useMemo(() => (React.createElement(Stack, { horizontal: true, horizontalAlign: "end", className: mergeStyles(menuButtonContainerStyle, { color: theme.palette.neutralPrimary }), title: strings.menuTitle, "data-ui-id": ids.participantItemMenuButton },
|
56
|
-
React.createElement(Icon, { iconName: "ParticipantItemOptionsHovered", className: mergeStyles(iconStyles, !showMenuIcon ? displayNoneStyle : {}) }))), [
|
57
|
-
|
54
|
+
const menuButton = useMemo(() => (React.createElement(Stack, { horizontal: true, horizontalAlign: "end", className: mergeStyles(menuButtonContainerStyle, { color: theme.palette.neutralPrimary }), title: strings.menuTitle, "aria-controls": participantItemFlyoutId, "data-ui-id": ids.participantItemMenuButton },
|
55
|
+
React.createElement(Icon, { iconName: "ParticipantItemOptionsHovered", className: mergeStyles(iconStyles, !showMenuIcon ? displayNoneStyle : {}) }))), [
|
56
|
+
theme.palette.neutralPrimary,
|
57
|
+
strings.menuTitle,
|
58
|
+
participantItemFlyoutId,
|
59
|
+
ids.participantItemMenuButton,
|
60
|
+
showMenuIcon
|
61
|
+
]);
|
62
|
+
return (React.createElement("div", { ref: containerRef, role: 'menuitem', id: participantItemId, "aria-label": (_b = (hasFlyout ? (_a = props.strings) === null || _a === void 0 ? void 0 : _a.participantItemWithMoreOptionsAriaLabel : undefined)) !== null && _b !== void 0 ? _b : (_c = props.strings) === null || _c === void 0 ? void 0 : _c.participantItemAriaLabel, "aria-labelledby": `${props.ariaLabelledBy} ${participantItemId}`, "aria-expanded": menuHidden ? false : true, "aria-disabled": hasFlyout || props.onClick ? false : true, "aria-haspopup": hasFlyout ? true : undefined, "aria-controls": participantItemFlyoutId, "data-is-focusable": hasFlyout, "data-ui-id": "participant-item", className: mergeStyles(participantItemContainerStyle({ clickable: hasFlyout }, theme), styles === null || styles === void 0 ? void 0 : styles.root), onMouseEnter: () => setItemHovered(true), onMouseLeave: () => setItemHovered(false), onClick: () => {
|
58
63
|
if (!participantStateString) {
|
59
64
|
setItemHovered(true);
|
60
65
|
setMenuHidden(false);
|
@@ -63,6 +68,10 @@ export const ParticipantItem = (props) => {
|
|
63
68
|
if (!menuHidden) {
|
64
69
|
onDismissMenu();
|
65
70
|
}
|
71
|
+
}, onKeyDown: (event) => {
|
72
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
73
|
+
setMenuHidden(false);
|
74
|
+
}
|
66
75
|
}, tabIndex: hasFlyout ? 0 : undefined },
|
67
76
|
React.createElement(Stack, { horizontal: true, className: mergeStyles({
|
68
77
|
flexGrow: 1,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ParticipantItem.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/ParticipantItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,cAAc,EACd,eAAe,EACf,IAAI,EAGJ,WAAW,EACX,OAAO,EAEP,WAAW,EACX,KAAK,EACL,IAAI,EACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,SAAS,EA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ACtB,OAAO,KAAK,CAAC,gBAAgB,KAAK,YAAY,IAAI,KAAK,CAAC,gBAAgB,KAAK,SAAS;QACpF,CAAC,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,uBAAuB;QAClC,CAAC,CAAC,KAAK,CAAC,gBAAgB,KAAK,MAAM;YACjC,CAAC,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,oBAAoB;YAC/B,CAAC,CAAC,SAAS,CAAC;AAClB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n ContextualMenu,\n DirectionalHint,\n Icon,\n IContextualMenuItem,\n IStyle,\n mergeStyles,\n Persona,\n PersonaPresence,\n PersonaSize,\n Stack,\n Text\n} from '@fluentui/react';\nimport React, { useMemo, useRef, useState } from 'react';\nimport { useIdentifiers } from '../identifiers';\nimport { useLocale } from '../localization';\nimport { useTheme } from '../theming';\nimport { BaseCustomStyles, OnRenderAvatarCallback } from '../types';\nimport {\n displayNoneStyle,\n iconContainerStyle,\n iconStyles,\n meContainerStyle,\n menuButtonContainerStyle,\n participantItemContainerStyle,\n participantStateStringStyles\n} from './styles/ParticipantItem.styles';\nimport { _formatString, _preventDismissOnEvent as preventDismissOnEvent } from '@internal/acs-ui-common';\nimport { ParticipantState } from '../types';\nimport { useId } from '@fluentui/react-hooks';\n\n/**\n * Fluent styles for {@link ParticipantItem}.\n *\n * @public\n */\nexport interface ParticipantItemStyles extends BaseCustomStyles {\n /** Styles for the avatar. */\n avatar?: IStyle;\n /** Styles for the (You) string. */\n me?: IStyle;\n /** Styles for the container of the icon. */\n iconContainer?: IStyle;\n /** Styles for the menu. */\n menu?: IStyle;\n}\n\n/**\n * Strings of {@link ParticipantItem} that can be overridden.\n *\n * @public\n */\nexport interface ParticipantItemStrings {\n /** String shown when participant is me */\n isMeText: string;\n /** String shown when hovering over menu button */\n menuTitle: string;\n /** Label for the remove button in participant menu */\n removeButtonLabel: string;\n /** Label for the sharing icon in participant state stack */\n sharingIconLabel: string;\n /** Label for the muted icon in participant state stack */\n mutedIconLabel: string;\n /** Label for the raised hand icon in participant state stack */\n handRaisedIconLabel?: string;\n /** placeholder text for participants who does not have a display name*/\n displayNamePlaceholder?: string;\n /** String shown when `participantState` is `Ringing` */\n participantStateRinging?: string;\n /** String shown when `participantState` is `Hold` */\n participantStateHold?: string;\n /** Aria Label applied to the base element of the `participantItem` */\n participantItemAriaLabel?: string;\n /** Aria Label applied to the base element of the `participantItem` when there are more options present */\n participantItemWithMoreOptionsAriaLabel?: string;\n /** String for the attendee role */\n attendeeRole: string;\n /** Label for the disabled microphone icon in participant state stack */\n micDisabledIconLabel: string;\n /** Label for the disabled camera icon in participant state stack */\n cameraDisabledIconLabel: string;\n}\n\n/**\n * Props for {@link ParticipantItem}.\n *\n * @public\n */\nexport interface ParticipantItemProps {\n /** Unique User ID of the participant. This `userId` is available in the `onRenderAvatar` callback function */\n userId?: string;\n /** Name of participant. */\n displayName?: string;\n /** Optional indicator to show participant is the user. */\n me?: boolean;\n /** Optional callback returning a JSX element to override avatar. */\n onRenderAvatar?: OnRenderAvatarCallback;\n /** Optional array of IContextualMenuItem for contextual menu. */\n menuItems?: IContextualMenuItem[];\n /** Optional callback returning a JSX element rendered on the right portion of the ParticipantItem. Intended for adding icons. */\n onRenderIcon?: (props?: ParticipantItemProps) => JSX.Element | null;\n /** Optional PersonaPresence to show participant presence. This will not have an effect if property avatar is assigned. */\n presence?: PersonaPresence;\n /**\n * Allows users to pass in an object contains custom CSS styles.\n * @Example\n * ```\n * <ParticipantItem styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: ParticipantItemStyles;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<ParticipantItemStrings>;\n /**\n * Optional callback when component is clicked\n */\n onClick?: (props?: ParticipantItemProps) => void;\n /** Optional value to determine if the tooltip should be shown for participants or not */\n showParticipantOverflowTooltip?: boolean;\n /**\n * Optional value to determine and display a participants connection status.\n * For example, `Connecting`, `Ringing` etc.\n * The actual text that is displayed is determined by the localized string\n * corresponding to the provided participant state.\n * For example, `strings.participantStateConnecting` will be used if `participantState` is `Connecting`.\n */\n participantState?: ParticipantState;\n /**\n * Optional aria property that prefixes the ParticipantItems aria content\n * Takes in a unique id value of the element you would like to be read before the ParticipantItem.\n */\n ariaLabelledBy?: string;\n}\n\n/**\n * Component to render a calling or chat participant.\n *\n * Displays the participant's avatar, displayName and status as well as optional icons and context menu.\n *\n * @public\n */\nexport const ParticipantItem = (props: ParticipantItemProps): JSX.Element => {\n const {\n userId,\n displayName,\n onRenderAvatar,\n menuItems,\n onRenderIcon,\n presence,\n styles,\n me,\n onClick,\n showParticipantOverflowTooltip\n } = props;\n const [itemHovered, setItemHovered] = useState<boolean>(false);\n const [menuHidden, setMenuHidden] = useState<boolean>(true);\n const containerRef = useRef<HTMLDivElement>(null);\n const theme = useTheme();\n const localeStrings = useLocale().strings.participantItem;\n const ids = useIdentifiers();\n const participantItemId = useId();\n const participantItemFlyoutId = useId();\n const hasFlyout = !!(menuItems && menuItems?.length > 0);\n const flyoutShowing = hasFlyout && menuHidden;\n\n const strings = { ...localeStrings, ...props.strings };\n const participantStateString = formatParticipantStateString(props, strings);\n\n const showMenuIcon = !participantStateString && (itemHovered || !menuHidden) && hasFlyout;\n\n // For 'me' show empty name so avatar will get 'Person' icon, when there is no name\n const meAvatarText = displayName?.trim() || '';\n\n const avatarOptions = {\n text: me ? meAvatarText : displayName?.trim() || strings.displayNamePlaceholder,\n size: PersonaSize.size32,\n presence: presence,\n initialsTextColor: 'white',\n showOverflowTooltip: showParticipantOverflowTooltip,\n showUnknownPersonaCoin: !me && (!displayName?.trim() || displayName === strings.displayNamePlaceholder)\n };\n\n const avatar = onRenderAvatar ? (\n onRenderAvatar(userId ?? '', avatarOptions)\n ) : (\n <Persona\n className={mergeStyles(\n {\n // Prevents persona text from being vertically truncated if a global line height is less than 1.15.\n lineHeight: '1.15rem'\n },\n styles?.avatar\n )}\n {...avatarOptions}\n />\n );\n\n const meTextStyle = useMemo(\n () => mergeStyles(meContainerStyle, { color: theme.palette.neutralSecondary }, styles?.me),\n [theme.palette.neutralSecondary, styles?.me]\n );\n const contextualMenuStyle = useMemo(\n () => mergeStyles({ background: theme.palette.neutralLighterAlt }, styles?.menu),\n [theme.palette.neutralLighterAlt, styles?.menu]\n );\n const infoContainerStyle = useMemo(\n () =>\n mergeStyles(\n iconContainerStyle,\n { color: theme.palette.neutralSecondary, marginLeft: 'auto' },\n styles?.iconContainer\n ),\n [theme.palette.neutralSecondary, styles?.iconContainer]\n );\n\n const onDismissMenu = (): void => {\n setItemHovered(false);\n setMenuHidden(true);\n };\n\n const menuButton = useMemo(\n () => (\n <Stack\n horizontal={true}\n horizontalAlign=\"end\"\n className={mergeStyles(menuButtonContainerStyle, { color: theme.palette.neutralPrimary })}\n title={strings.menuTitle}\n data-ui-id={ids.participantItemMenuButton}\n >\n <Icon\n iconName=\"ParticipantItemOptionsHovered\"\n className={mergeStyles(iconStyles, !showMenuIcon ? displayNoneStyle : {})}\n />\n </Stack>\n ),\n [theme.palette.neutralPrimary, strings.menuTitle, ids.participantItemMenuButton, showMenuIcon]\n );\n\n return (\n <div\n ref={containerRef}\n role={'menuitem'}\n id={participantItemId}\n aria-label={\n (hasFlyout ? props.strings?.participantItemWithMoreOptionsAriaLabel : undefined) ??\n props.strings?.participantItemAriaLabel\n }\n aria-labelledby={`${props.ariaLabelledBy} ${participantItemId}`}\n aria-expanded={flyoutShowing}\n aria-disabled={hasFlyout || props.onClick ? false : true}\n aria-haspopup={hasFlyout ? true : undefined}\n aria-controls={participantItemFlyoutId}\n data-is-focusable={hasFlyout}\n data-ui-id=\"participant-item\"\n className={mergeStyles(participantItemContainerStyle({ clickable: hasFlyout }, theme), styles?.root)}\n onMouseEnter={() => setItemHovered(true)}\n onMouseLeave={() => setItemHovered(false)}\n onClick={() => {\n if (!participantStateString) {\n setItemHovered(true);\n setMenuHidden(false);\n onClick?.(props);\n }\n if (!menuHidden) {\n onDismissMenu();\n }\n }}\n tabIndex={hasFlyout ? 0 : undefined}\n >\n <Stack\n horizontal\n className={mergeStyles({\n flexGrow: 1,\n maxWidth: '100%',\n alignItems: 'center'\n })}\n >\n {avatar}\n {me && <Text className={meTextStyle}>{strings.isMeText}</Text>}\n <Stack horizontal className={mergeStyles(infoContainerStyle)}>\n {!showMenuIcon && onRenderIcon && onRenderIcon(props)}\n {/* When the participantStateString has a value, we don't show the menu */}\n {!me && participantStateString ? (\n <Text data-ui-id=\"participant-item-state-string\" className={mergeStyles(participantStateStringStyles)}>\n {participantStateString}\n </Text>\n ) : (\n <>\n {hasFlyout && (\n <>\n {menuButton}\n <ContextualMenu\n id={participantItemFlyoutId}\n items={menuItems}\n hidden={menuHidden}\n target={containerRef}\n onItemClick={onDismissMenu}\n onDismiss={onDismissMenu}\n directionalHint={DirectionalHint.bottomRightEdge}\n className={contextualMenuStyle}\n calloutProps={{\n preventDismissOnEvent\n }}\n />\n </>\n )}\n </>\n )}\n </Stack>\n </Stack>\n </div>\n );\n};\n\n/** @private */\nexport const formatParticipantStateString = (\n props: ParticipantItemProps,\n strings: ParticipantItemStrings\n): string | undefined => {\n return props.participantState === 'EarlyMedia' || props.participantState === 'Ringing'\n ? strings?.participantStateRinging\n : props.participantState === 'Hold'\n ? strings?.participantStateHold\n : undefined;\n};\n"]}
|
1
|
+
{"version":3,"file":"ParticipantItem.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/ParticipantItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,cAAc,EACd,eAAe,EACf,IAAI,EAGJ,WAAW,EACX,OAAO,EAEP,WAAW,EACX,KAAK,EACL,IAAI,EACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,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,CAAC,eAAe,EAChD,SAAS,EAAE,mBAAmB,EAC9B,YAAY,EAAE;4BACZ,qBAAqB;yBACtB,GACD,CACD,CACJ,CACA,CACJ,CACK,CACF,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe;AACf,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAC1C,KAA2B,EAC3B,OAA+B,EACX,EAAE;IACtB,OAAO,KAAK,CAAC,gBAAgB,KAAK,YAAY,IAAI,KAAK,CAAC,gBAAgB,KAAK,SAAS;QACpF,CAAC,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,uBAAuB;QAClC,CAAC,CAAC,KAAK,CAAC,gBAAgB,KAAK,MAAM;YACjC,CAAC,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,oBAAoB;YAC/B,CAAC,CAAC,SAAS,CAAC;AAClB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n ContextualMenu,\n DirectionalHint,\n Icon,\n IContextualMenuItem,\n IStyle,\n mergeStyles,\n Persona,\n PersonaPresence,\n PersonaSize,\n Stack,\n Text\n} from '@fluentui/react';\nimport React, { useMemo, useRef, useState } from 'react';\nimport { useIdentifiers } from '../identifiers';\nimport { useLocale } from '../localization';\nimport { useTheme } from '../theming';\nimport { BaseCustomStyles, OnRenderAvatarCallback } from '../types';\nimport {\n displayNoneStyle,\n iconContainerStyle,\n iconStyles,\n meContainerStyle,\n menuButtonContainerStyle,\n participantItemContainerStyle,\n participantStateStringStyles\n} from './styles/ParticipantItem.styles';\nimport { _formatString, _preventDismissOnEvent as preventDismissOnEvent } from '@internal/acs-ui-common';\nimport { ParticipantState } from '../types';\nimport { useId } from '@fluentui/react-hooks';\n\n/**\n * Fluent styles for {@link ParticipantItem}.\n *\n * @public\n */\nexport interface ParticipantItemStyles extends BaseCustomStyles {\n /** Styles for the avatar. */\n avatar?: IStyle;\n /** Styles for the (You) string. */\n me?: IStyle;\n /** Styles for the container of the icon. */\n iconContainer?: IStyle;\n /** Styles for the menu. */\n menu?: IStyle;\n}\n\n/**\n * Strings of {@link ParticipantItem} that can be overridden.\n *\n * @public\n */\nexport interface ParticipantItemStrings {\n /** String shown when participant is me */\n isMeText: string;\n /** String shown when hovering over menu button */\n menuTitle: string;\n /** Label for the remove button in participant menu */\n removeButtonLabel: string;\n /** Label for the sharing icon in participant state stack */\n sharingIconLabel: string;\n /** Label for the muted icon in participant state stack */\n mutedIconLabel: string;\n /** Label for the raised hand icon in participant state stack */\n handRaisedIconLabel?: string;\n /** placeholder text for participants who does not have a display name*/\n displayNamePlaceholder?: string;\n /** String shown when `participantState` is `Ringing` */\n participantStateRinging?: string;\n /** String shown when `participantState` is `Hold` */\n participantStateHold?: string;\n /** Aria Label applied to the base element of the `participantItem` */\n participantItemAriaLabel?: string;\n /** Aria Label applied to the base element of the `participantItem` when there are more options present */\n participantItemWithMoreOptionsAriaLabel?: string;\n /** String for the attendee role */\n attendeeRole: string;\n /** Label for the disabled microphone icon in participant state stack */\n micDisabledIconLabel: string;\n /** Label for the disabled camera icon in participant state stack */\n cameraDisabledIconLabel: string;\n}\n\n/**\n * Props for {@link ParticipantItem}.\n *\n * @public\n */\nexport interface ParticipantItemProps {\n /** Unique User ID of the participant. This `userId` is available in the `onRenderAvatar` callback function */\n userId?: string;\n /** Name of participant. */\n displayName?: string;\n /** Optional indicator to show participant is the user. */\n me?: boolean;\n /** Optional callback returning a JSX element to override avatar. */\n onRenderAvatar?: OnRenderAvatarCallback;\n /** Optional array of IContextualMenuItem for contextual menu. */\n menuItems?: IContextualMenuItem[];\n /** Optional callback returning a JSX element rendered on the right portion of the ParticipantItem. Intended for adding icons. */\n onRenderIcon?: (props?: ParticipantItemProps) => JSX.Element | null;\n /** Optional PersonaPresence to show participant presence. This will not have an effect if property avatar is assigned. */\n presence?: PersonaPresence;\n /**\n * Allows users to pass in an object contains custom CSS styles.\n * @Example\n * ```\n * <ParticipantItem styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: ParticipantItemStyles;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<ParticipantItemStrings>;\n /**\n * Optional callback when component is clicked\n */\n onClick?: (props?: ParticipantItemProps) => void;\n /** Optional value to determine if the tooltip should be shown for participants or not */\n showParticipantOverflowTooltip?: boolean;\n /**\n * Optional value to determine and display a participants connection status.\n * For example, `Connecting`, `Ringing` etc.\n * The actual text that is displayed is determined by the localized string\n * corresponding to the provided participant state.\n * For example, `strings.participantStateConnecting` will be used if `participantState` is `Connecting`.\n */\n participantState?: ParticipantState;\n /**\n * Optional aria property that prefixes the ParticipantItems aria content\n * Takes in a unique id value of the element you would like to be read before the ParticipantItem.\n */\n ariaLabelledBy?: string;\n}\n\n/**\n * Component to render a calling or chat participant.\n *\n * Displays the participant's avatar, displayName and status as well as optional icons and context menu.\n *\n * @public\n */\nexport const ParticipantItem = (props: ParticipantItemProps): JSX.Element => {\n const {\n userId,\n displayName,\n onRenderAvatar,\n menuItems,\n onRenderIcon,\n presence,\n styles,\n me,\n onClick,\n showParticipantOverflowTooltip\n } = props;\n const [itemHovered, setItemHovered] = useState<boolean>(false);\n const [menuHidden, setMenuHidden] = useState<boolean>(true);\n const containerRef = useRef<HTMLDivElement>(null);\n const theme = useTheme();\n const localeStrings = useLocale().strings.participantItem;\n const ids = useIdentifiers();\n const participantItemId = useId();\n const participantItemFlyoutId = useId();\n const hasFlyout = !!(menuItems && menuItems?.length > 0);\n\n const strings = { ...localeStrings, ...props.strings };\n const participantStateString = formatParticipantStateString(props, strings);\n\n const showMenuIcon = !participantStateString && (itemHovered || !menuHidden) && hasFlyout;\n\n // For 'me' show empty name so avatar will get 'Person' icon, when there is no name\n const meAvatarText = displayName?.trim() || '';\n\n const avatarOptions = {\n text: me ? meAvatarText : displayName?.trim() || strings.displayNamePlaceholder,\n size: PersonaSize.size32,\n presence: presence,\n initialsTextColor: 'white',\n showOverflowTooltip: showParticipantOverflowTooltip,\n showUnknownPersonaCoin: !me && (!displayName?.trim() || displayName === strings.displayNamePlaceholder)\n };\n\n const avatar = onRenderAvatar ? (\n onRenderAvatar(userId ?? '', avatarOptions)\n ) : (\n <Persona\n className={mergeStyles(\n {\n // Prevents persona text from being vertically truncated if a global line height is less than 1.15.\n lineHeight: '1.15rem'\n },\n styles?.avatar\n )}\n {...avatarOptions}\n />\n );\n\n const meTextStyle = useMemo(\n () => mergeStyles(meContainerStyle, { color: theme.palette.neutralSecondary }, styles?.me),\n [theme.palette.neutralSecondary, styles?.me]\n );\n const contextualMenuStyle = useMemo(\n () => mergeStyles({ background: theme.palette.neutralLighterAlt }, styles?.menu),\n [theme.palette.neutralLighterAlt, styles?.menu]\n );\n const infoContainerStyle = useMemo(\n () =>\n mergeStyles(\n iconContainerStyle,\n { color: theme.palette.neutralSecondary, marginLeft: 'auto' },\n styles?.iconContainer\n ),\n [theme.palette.neutralSecondary, styles?.iconContainer]\n );\n\n const onDismissMenu = (): void => {\n setItemHovered(false);\n setMenuHidden(true);\n };\n\n const menuButton = useMemo(\n () => (\n <Stack\n horizontal={true}\n horizontalAlign=\"end\"\n className={mergeStyles(menuButtonContainerStyle, { color: theme.palette.neutralPrimary })}\n title={strings.menuTitle}\n aria-controls={participantItemFlyoutId}\n data-ui-id={ids.participantItemMenuButton}\n >\n <Icon\n iconName=\"ParticipantItemOptionsHovered\"\n className={mergeStyles(iconStyles, !showMenuIcon ? displayNoneStyle : {})}\n />\n </Stack>\n ),\n [\n theme.palette.neutralPrimary,\n strings.menuTitle,\n participantItemFlyoutId,\n ids.participantItemMenuButton,\n showMenuIcon\n ]\n );\n\n return (\n <div\n ref={containerRef}\n role={'menuitem'}\n id={participantItemId}\n aria-label={\n (hasFlyout ? props.strings?.participantItemWithMoreOptionsAriaLabel : undefined) ??\n props.strings?.participantItemAriaLabel\n }\n aria-labelledby={`${props.ariaLabelledBy} ${participantItemId}`}\n aria-expanded={menuHidden ? false : true}\n aria-disabled={hasFlyout || props.onClick ? false : true}\n aria-haspopup={hasFlyout ? true : undefined}\n aria-controls={participantItemFlyoutId}\n data-is-focusable={hasFlyout}\n data-ui-id=\"participant-item\"\n className={mergeStyles(participantItemContainerStyle({ clickable: hasFlyout }, theme), styles?.root)}\n onMouseEnter={() => setItemHovered(true)}\n onMouseLeave={() => setItemHovered(false)}\n onClick={() => {\n if (!participantStateString) {\n setItemHovered(true);\n setMenuHidden(false);\n onClick?.(props);\n }\n if (!menuHidden) {\n onDismissMenu();\n }\n }}\n onKeyDown={(event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Enter' || event.key === ' ') {\n setMenuHidden(false);\n }\n }}\n tabIndex={hasFlyout ? 0 : undefined}\n >\n <Stack\n horizontal\n className={mergeStyles({\n flexGrow: 1,\n maxWidth: '100%',\n alignItems: 'center'\n })}\n >\n {avatar}\n {me && <Text className={meTextStyle}>{strings.isMeText}</Text>}\n <Stack horizontal className={mergeStyles(infoContainerStyle)}>\n {!showMenuIcon && onRenderIcon && onRenderIcon(props)}\n {/* When the participantStateString has a value, we don't show the menu */}\n {!me && participantStateString ? (\n <Text data-ui-id=\"participant-item-state-string\" className={mergeStyles(participantStateStringStyles)}>\n {participantStateString}\n </Text>\n ) : (\n <>\n {hasFlyout && (\n <>\n {menuButton}\n <ContextualMenu\n id={participantItemFlyoutId}\n items={menuItems}\n hidden={menuHidden}\n target={containerRef}\n onItemClick={onDismissMenu}\n onDismiss={onDismissMenu}\n directionalHint={DirectionalHint.bottomRightEdge}\n className={contextualMenuStyle}\n calloutProps={{\n preventDismissOnEvent\n }}\n />\n </>\n )}\n </>\n )}\n </Stack>\n </Stack>\n </div>\n );\n};\n\n/** @private */\nexport const formatParticipantStateString = (\n props: ParticipantItemProps,\n strings: ParticipantItemStrings\n): string | undefined => {\n return props.participantState === 'EarlyMedia' || props.participantState === 'Ringing'\n ? strings?.participantStateRinging\n : props.participantState === 'Hold'\n ? strings?.participantStateHold\n : undefined;\n};\n"]}
|
@@ -83,7 +83,7 @@ export const TogetherModeOverlay = memo((props) => {
|
|
83
83
|
}, [hoveredParticipantID, updatedParticipantStatus]);
|
84
84
|
return (React.createElement("div", { style: { position: 'absolute', width: '100%', height: '100%' } }, Object.values(togetherModeParticipantStatus).map((participantStatus) => {
|
85
85
|
var _a, _b;
|
86
|
-
return participantStatus.id && (React.createElement("div", { key: participantStatus.id, style: Object.assign({}, getTogetherModeParticipantOverlayStyle(participantStatus.seatPositionStyle)), onMouseEnter: () => setHoveredParticipantID(participantStatus.id), onMouseLeave: () => setHoveredParticipantID('') },
|
86
|
+
return participantStatus.id && (React.createElement("div", { key: participantStatus.id, "data-ui-id": `together-mode-participant-${participantStatus.id}`, style: Object.assign({}, getTogetherModeParticipantOverlayStyle(participantStatus.seatPositionStyle)), onMouseEnter: () => setHoveredParticipantID(participantStatus.id), onMouseLeave: () => setHoveredParticipantID('') },
|
87
87
|
React.createElement("div", null,
|
88
88
|
participantStatus.showDisplayName && (React.createElement("div", { style: Object.assign({}, participantStatusTransitionStyle) },
|
89
89
|
React.createElement("div", { style: Object.assign({}, togetherModeParticipantStatusContainer(callingPalette.videoTileLabelBackgroundLight, theme.effects.roundedCorner4)) },
|
@@ -99,7 +99,7 @@ export const TogetherModeOverlay = memo((props) => {
|
|
99
99
|
// Third div - Play Animation as the other animation applies on the base play animation for the sprite
|
100
100
|
React.createElement("div", { style: moveAnimationStyles(parseFloat(participantStatus.seatPositionStyle.seatPosition.height) *
|
101
101
|
REACTION_MAX_TRAVEL_HEIGHT, parseFloat(participantStatus.seatPositionStyle.seatPosition.height) * REACTION_TRAVEL_HEIGHT) },
|
102
|
-
React.createElement("div", { style: Object.assign({}, togetherModeParticipantEmojiSpriteStyle(emojiSize, participantStatus.scaledSize || 1, participantStatus.seatPositionStyle.seatPosition.width)) },
|
102
|
+
React.createElement("div", { "data-ui-id": `together-mode-participant-reaction-${participantStatus.id}`, style: Object.assign({}, togetherModeParticipantEmojiSpriteStyle(emojiSize, participantStatus.scaledSize || 1, participantStatus.seatPositionStyle.seatPosition.width)) },
|
103
103
|
React.createElement("div", { style: spriteAnimationStyles(REACTION_NUMBER_OF_ANIMATION_FRAMES, participantStatus.scaledSize || 1, (_b = (participantStatus.reaction &&
|
104
104
|
getEmojiResource(participantStatus === null || participantStatus === void 0 ? void 0 : participantStatus.reaction.reactionType, reactionResources))) !== null && _b !== void 0 ? _b : '') })))))));
|
105
105
|
})));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TogetherModeOverlay.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/TogetherModeOverlay.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,gDAAgD;AAChD,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASlE,gDAAgD;AAChD,OAAO,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5F,gDAAgD;AAChD,OAAO,EAAE,mCAAmC,EAAE,MAAM,oCAAoC,CAAC;AACzF,gDAAgD;AAChD,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACjE,gDAAgD;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,gDAAgD;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,gDAAgD;AAChD,OAAO,EACL,mBAAmB,EACnB,sCAAsC,EACtC,gCAAgC,EAChC,0BAA0B,EAC1B,sBAAsB,EACtB,gCAAgC,EAChC,qBAAqB,EACrB,kCAAkC,EAClC,uCAAuC,EACvC,sCAAsC,EAEvC,MAAM,8BAA8B,CAAC;AACtC,gDAAgD;AAChD,OAAO,EAAgB,QAAQ,EAAE,MAAM,YAAY,CAAC;AACpD,gDAAgD;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAqBzD,gDAAgD;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BAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAE,QAAQ,CAAC,YAAY,EAAE,iBAAiB,CAAC,CAAC,mCAC9E,EAAE,CACL,GACD,CACE,CACF,CACP,CACG,CACF,CACP,CAAA;KAAA,CACJ,CACG,CACP,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(together-mode) */\nimport React, { useMemo, useState, memo, useEffect } from 'react';\n/* @conditional-compile-remove(together-mode) */\nimport {\n Reaction,\n ReactionResources,\n VideoGalleryTogetherModeParticipantPosition,\n VideoGalleryLocalParticipant,\n VideoGalleryRemoteParticipant\n} from '../types';\n/* @conditional-compile-remove(together-mode) */\nimport { moveAnimationStyles, spriteAnimationStyles } from './styles/ReactionOverlay.style';\n/* @conditional-compile-remove(together-mode) */\nimport { REACTION_NUMBER_OF_ANIMATION_FRAMES } from './VideoGallery/utils/reactionUtils';\n/* @conditional-compile-remove(together-mode) */\nimport { Icon, mergeStyles, Stack, Text } from '@fluentui/react';\n/* @conditional-compile-remove(together-mode) */\nimport { getEmojiResource } from './VideoGallery/utils/videoGalleryLayoutUtils';\n/* @conditional-compile-remove(together-mode) */\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(together-mode) */\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\n/* @conditional-compile-remove(together-mode) */\nimport {\n calculateScaledSize,\n getTogetherModeParticipantOverlayStyle,\n participantStatusTransitionStyle,\n REACTION_MAX_TRAVEL_HEIGHT,\n REACTION_TRAVEL_HEIGHT,\n setTogetherModeSeatPositionStyle,\n togetherModeIconStyle,\n togetherModeParticipantDisplayName,\n togetherModeParticipantEmojiSpriteStyle,\n togetherModeParticipantStatusContainer,\n TogetherModeSeatStyle\n} from './styles/TogetherMode.styles';\n/* @conditional-compile-remove(together-mode) */\nimport { CallingTheme, useTheme } from '../theming';\n/* @conditional-compile-remove(together-mode) */\nimport { RaisedHandIcon } from './assets/RaisedHandIcon';\n/* @conditional-compile-remove(together-mode) */\nimport { _pxToRem } from '@internal/acs-ui-common';\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Signaling action overlay component props\n * @internal\n */\ntype TogetherModeParticipantStatus = {\n reaction?: Reaction;\n scaledSize?: number;\n isHandRaised?: boolean;\n isSpotlighted?: boolean;\n isMuted?: boolean;\n id: string;\n seatPositionStyle: TogetherModeSeatStyle;\n displayName: string;\n showDisplayName: boolean;\n};\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * TogetherModeOverlay component renders an empty JSX element.\n *\n * @returns {JSX.Element} An empty JSX element.\n */\nexport const TogetherModeOverlay = memo(\n (props: {\n emojiSize: number;\n reactionResources: ReactionResources;\n localParticipant: VideoGalleryLocalParticipant;\n remoteParticipants: VideoGalleryRemoteParticipant[];\n togetherModeSeatPositions: VideoGalleryTogetherModeParticipantPosition;\n }) => {\n const locale = useLocale();\n const theme = useTheme();\n const callingPalette = (theme as unknown as CallingTheme).callingPalette;\n\n const { emojiSize, reactionResources, remoteParticipants, localParticipant, togetherModeSeatPositions } = props;\n const [togetherModeParticipantStatus, setTogetherModeParticipantStatus] = useState<{\n [key: string]: TogetherModeParticipantStatus;\n }>({});\n const [hoveredParticipantID, setHoveredParticipantID] = useState('');\n\n /*\n * The useMemo hook is used to calculate the participant status for the Together Mode overlay.\n * It updates the togetherModeParticipantStatus state when there's a change in the remoteParticipants, localParticipant,\n * raisedHand, spotlight, isMuted, displayName, or hoveredParticipantID.\n */\n const updatedParticipantStatus = useMemo(() => {\n const allParticipants = [...remoteParticipants, localParticipant];\n\n const participantsWithVideoAvailable = allParticipants.filter(\n (p) => p.videoStream?.isAvailable && togetherModeSeatPositions[p.userId]\n );\n\n const updatedSignals: { [key: string]: TogetherModeParticipantStatus } = {};\n for (const p of participantsWithVideoAvailable) {\n const { userId, reaction, raisedHand, spotlight, isMuted, displayName } = p;\n const seatingPosition = togetherModeSeatPositions[userId];\n if (seatingPosition) {\n updatedSignals[userId] = {\n id: userId,\n reaction: reactionResources && reaction,\n isHandRaised: !!raisedHand,\n isSpotlighted: !!spotlight,\n isMuted,\n displayName: displayName || locale.strings.videoGallery.displayNamePlaceholder,\n showDisplayName: !!(spotlight || raisedHand || hoveredParticipantID === userId),\n scaledSize: calculateScaledSize(seatingPosition.width, seatingPosition.height),\n seatPositionStyle: setTogetherModeSeatPositionStyle(seatingPosition)\n };\n }\n }\n\n // This is used to remove the participants bounding box from the DOM when they are no longer in the stream\n const participantsNotInTogetherModeStream = Object.keys(togetherModeParticipantStatus).filter(\n (id) => !updatedSignals[id]\n );\n\n const newSignals = { ...togetherModeParticipantStatus, ...updatedSignals };\n\n participantsNotInTogetherModeStream.forEach((id) => {\n delete newSignals[id];\n });\n\n const hasSignalingChange = Object.keys(newSignals).some(\n (key) => JSON.stringify(newSignals[key]) !== JSON.stringify(togetherModeParticipantStatus[key])\n );\n\n const updateTogetherModeParticipantStatusState =\n hasSignalingChange || Object.keys(newSignals).length !== Object.keys(togetherModeParticipantStatus).length;\n return updateTogetherModeParticipantStatusState ? newSignals : togetherModeParticipantStatus;\n }, [\n remoteParticipants,\n localParticipant,\n togetherModeParticipantStatus,\n togetherModeSeatPositions,\n reactionResources,\n locale.strings.videoGallery.displayNamePlaceholder,\n hoveredParticipantID\n ]);\n\n useEffect(() => {\n if (hoveredParticipantID && !updatedParticipantStatus[hoveredParticipantID]) {\n setHoveredParticipantID('');\n }\n\n setTogetherModeParticipantStatus(updatedParticipantStatus);\n }, [hoveredParticipantID, updatedParticipantStatus]);\n\n return (\n <div style={{ position: 'absolute', width: '100%', height: '100%' }}>\n {Object.values(togetherModeParticipantStatus).map(\n (participantStatus) =>\n participantStatus.id && (\n <div\n key={participantStatus.id}\n style={{\n ...getTogetherModeParticipantOverlayStyle(participantStatus.seatPositionStyle)\n }}\n onMouseEnter={() => setHoveredParticipantID(participantStatus.id)}\n onMouseLeave={() => setHoveredParticipantID('')}\n >\n <div>\n {participantStatus.showDisplayName && (\n <div style={{ ...participantStatusTransitionStyle }}>\n <div\n style={{\n ...togetherModeParticipantStatusContainer(\n callingPalette.videoTileLabelBackgroundLight,\n theme.effects.roundedCorner4\n )\n }}\n >\n {participantStatus.isHandRaised && <RaisedHandIcon />}\n {participantStatus.showDisplayName && (\n <Text\n style={{\n ...togetherModeParticipantDisplayName(\n hoveredParticipantID === participantStatus.id,\n parseFloat(participantStatus.seatPositionStyle.seatPosition.width),\n participantStatus.displayName ? theme.palette.neutralSecondary : 'inherit'\n )\n }}\n >\n {participantStatus.displayName}\n </Text>\n )}\n {participantStatus.isMuted && (\n <Stack className={mergeStyles(togetherModeIconStyle)}>\n <Icon iconName=\"VideoTileMicOff\" />\n </Stack>\n )}\n {participantStatus.isSpotlighted && (\n <Stack className={mergeStyles(togetherModeIconStyle)}>\n <Icon iconName=\"VideoTileSpotlighted\" />\n </Stack>\n )}\n </div>\n </div>\n )}\n\n {participantStatus.reaction?.reactionType && (\n // First div - Section that fixes the travel height and applies the movement animation\n // Second div - Responsible for ensuring the sprite emoji is always centered in the participant seat position\n // Third div - Play Animation as the other animation applies on the base play animation for the sprite\n <div\n style={moveAnimationStyles(\n parseFloat(participantStatus.seatPositionStyle.seatPosition.height) *\n REACTION_MAX_TRAVEL_HEIGHT,\n parseFloat(participantStatus.seatPositionStyle.seatPosition.height) * REACTION_TRAVEL_HEIGHT\n )}\n >\n <div\n style={{\n ...togetherModeParticipantEmojiSpriteStyle(\n emojiSize,\n participantStatus.scaledSize || 1,\n participantStatus.seatPositionStyle.seatPosition.width\n )\n }}\n >\n <div\n style={spriteAnimationStyles(\n REACTION_NUMBER_OF_ANIMATION_FRAMES,\n participantStatus.scaledSize || 1,\n (participantStatus.reaction &&\n getEmojiResource(participantStatus?.reaction.reactionType, reactionResources)) ??\n ''\n )}\n />\n </div>\n </div>\n )}\n </div>\n </div>\n )\n )}\n </div>\n );\n }\n);\n"]}
|
1
|
+
{"version":3,"file":"TogetherModeOverlay.js","sourceRoot":"","sources":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corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(together-mode) */\nimport React, { useMemo, useState, memo, useEffect } from 'react';\n/* @conditional-compile-remove(together-mode) */\nimport {\n Reaction,\n ReactionResources,\n VideoGalleryTogetherModeParticipantPosition,\n VideoGalleryLocalParticipant,\n VideoGalleryRemoteParticipant\n} from '../types';\n/* @conditional-compile-remove(together-mode) */\nimport { moveAnimationStyles, spriteAnimationStyles } from './styles/ReactionOverlay.style';\n/* @conditional-compile-remove(together-mode) */\nimport { REACTION_NUMBER_OF_ANIMATION_FRAMES } from './VideoGallery/utils/reactionUtils';\n/* @conditional-compile-remove(together-mode) */\nimport { Icon, mergeStyles, Stack, Text } from '@fluentui/react';\n/* @conditional-compile-remove(together-mode) */\nimport { getEmojiResource } from './VideoGallery/utils/videoGalleryLayoutUtils';\n/* @conditional-compile-remove(together-mode) */\nimport { useLocale } from '../localization';\n/* @conditional-compile-remove(together-mode) */\nimport { _HighContrastAwareIcon } from './HighContrastAwareIcon';\n/* @conditional-compile-remove(together-mode) */\nimport {\n calculateScaledSize,\n getTogetherModeParticipantOverlayStyle,\n participantStatusTransitionStyle,\n REACTION_MAX_TRAVEL_HEIGHT,\n REACTION_TRAVEL_HEIGHT,\n setTogetherModeSeatPositionStyle,\n togetherModeIconStyle,\n togetherModeParticipantDisplayName,\n togetherModeParticipantEmojiSpriteStyle,\n togetherModeParticipantStatusContainer,\n TogetherModeSeatStyle\n} from './styles/TogetherMode.styles';\n/* @conditional-compile-remove(together-mode) */\nimport { CallingTheme, useTheme } from '../theming';\n/* @conditional-compile-remove(together-mode) */\nimport { RaisedHandIcon } from './assets/RaisedHandIcon';\n/* @conditional-compile-remove(together-mode) */\nimport { _pxToRem } from '@internal/acs-ui-common';\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Signaling action overlay component props\n * @internal\n */\ntype TogetherModeParticipantStatus = {\n reaction?: Reaction;\n scaledSize?: number;\n isHandRaised?: boolean;\n isSpotlighted?: boolean;\n isMuted?: boolean;\n id: string;\n seatPositionStyle: TogetherModeSeatStyle;\n displayName: string;\n showDisplayName: boolean;\n};\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * TogetherModeOverlay component renders an empty JSX element.\n *\n * @returns {JSX.Element} An empty JSX element.\n */\nexport const TogetherModeOverlay = memo(\n (props: {\n emojiSize: number;\n reactionResources: ReactionResources;\n localParticipant: VideoGalleryLocalParticipant;\n remoteParticipants: VideoGalleryRemoteParticipant[];\n togetherModeSeatPositions: VideoGalleryTogetherModeParticipantPosition;\n }) => {\n const locale = useLocale();\n const theme = useTheme();\n const callingPalette = (theme as unknown as CallingTheme).callingPalette;\n\n const { emojiSize, reactionResources, remoteParticipants, localParticipant, togetherModeSeatPositions } = props;\n const [togetherModeParticipantStatus, setTogetherModeParticipantStatus] = useState<{\n [key: string]: TogetherModeParticipantStatus;\n }>({});\n const [hoveredParticipantID, setHoveredParticipantID] = useState('');\n\n /*\n * The useMemo hook is used to calculate the participant status for the Together Mode overlay.\n * It updates the togetherModeParticipantStatus state when there's a change in the remoteParticipants, localParticipant,\n * raisedHand, spotlight, isMuted, displayName, or hoveredParticipantID.\n */\n const updatedParticipantStatus = useMemo(() => {\n const allParticipants = [...remoteParticipants, localParticipant];\n\n const participantsWithVideoAvailable = allParticipants.filter(\n (p) => p.videoStream?.isAvailable && togetherModeSeatPositions[p.userId]\n );\n\n const updatedSignals: { [key: string]: TogetherModeParticipantStatus } = {};\n for (const p of participantsWithVideoAvailable) {\n const { userId, reaction, raisedHand, spotlight, isMuted, displayName } = p;\n const seatingPosition = togetherModeSeatPositions[userId];\n if (seatingPosition) {\n updatedSignals[userId] = {\n id: userId,\n reaction: reactionResources && reaction,\n isHandRaised: !!raisedHand,\n isSpotlighted: !!spotlight,\n isMuted,\n displayName: displayName || locale.strings.videoGallery.displayNamePlaceholder,\n showDisplayName: !!(spotlight || raisedHand || hoveredParticipantID === userId),\n scaledSize: calculateScaledSize(seatingPosition.width, seatingPosition.height),\n seatPositionStyle: setTogetherModeSeatPositionStyle(seatingPosition)\n };\n }\n }\n\n // This is used to remove the participants bounding box from the DOM when they are no longer in the stream\n const participantsNotInTogetherModeStream = Object.keys(togetherModeParticipantStatus).filter(\n (id) => !updatedSignals[id]\n );\n\n const newSignals = { ...togetherModeParticipantStatus, ...updatedSignals };\n\n participantsNotInTogetherModeStream.forEach((id) => {\n delete newSignals[id];\n });\n\n const hasSignalingChange = Object.keys(newSignals).some(\n (key) => JSON.stringify(newSignals[key]) !== JSON.stringify(togetherModeParticipantStatus[key])\n );\n\n const updateTogetherModeParticipantStatusState =\n hasSignalingChange || Object.keys(newSignals).length !== Object.keys(togetherModeParticipantStatus).length;\n return updateTogetherModeParticipantStatusState ? newSignals : togetherModeParticipantStatus;\n }, [\n remoteParticipants,\n localParticipant,\n togetherModeParticipantStatus,\n togetherModeSeatPositions,\n reactionResources,\n locale.strings.videoGallery.displayNamePlaceholder,\n hoveredParticipantID\n ]);\n\n useEffect(() => {\n if (hoveredParticipantID && !updatedParticipantStatus[hoveredParticipantID]) {\n setHoveredParticipantID('');\n }\n\n setTogetherModeParticipantStatus(updatedParticipantStatus);\n }, [hoveredParticipantID, updatedParticipantStatus]);\n\n return (\n <div style={{ position: 'absolute', width: '100%', height: '100%' }}>\n {Object.values(togetherModeParticipantStatus).map(\n (participantStatus) =>\n participantStatus.id && (\n <div\n key={participantStatus.id}\n data-ui-id={`together-mode-participant-${participantStatus.id}`}\n style={{\n ...getTogetherModeParticipantOverlayStyle(participantStatus.seatPositionStyle)\n }}\n onMouseEnter={() => setHoveredParticipantID(participantStatus.id)}\n onMouseLeave={() => setHoveredParticipantID('')}\n >\n <div>\n {participantStatus.showDisplayName && (\n <div style={{ ...participantStatusTransitionStyle }}>\n <div\n style={{\n ...togetherModeParticipantStatusContainer(\n callingPalette.videoTileLabelBackgroundLight,\n theme.effects.roundedCorner4\n )\n }}\n >\n {participantStatus.isHandRaised && <RaisedHandIcon />}\n {participantStatus.showDisplayName && (\n <Text\n style={{\n ...togetherModeParticipantDisplayName(\n hoveredParticipantID === participantStatus.id,\n parseFloat(participantStatus.seatPositionStyle.seatPosition.width),\n participantStatus.displayName ? theme.palette.neutralSecondary : 'inherit'\n )\n }}\n >\n {participantStatus.displayName}\n </Text>\n )}\n {participantStatus.isMuted && (\n <Stack className={mergeStyles(togetherModeIconStyle)}>\n <Icon iconName=\"VideoTileMicOff\" />\n </Stack>\n )}\n {participantStatus.isSpotlighted && (\n <Stack className={mergeStyles(togetherModeIconStyle)}>\n <Icon iconName=\"VideoTileSpotlighted\" />\n </Stack>\n )}\n </div>\n </div>\n )}\n\n {participantStatus.reaction?.reactionType && (\n // First div - Section that fixes the travel height and applies the movement animation\n // Second div - Responsible for ensuring the sprite emoji is always centered in the participant seat position\n // Third div - Play Animation as the other animation applies on the base play animation for the sprite\n <div\n style={moveAnimationStyles(\n parseFloat(participantStatus.seatPositionStyle.seatPosition.height) *\n REACTION_MAX_TRAVEL_HEIGHT,\n parseFloat(participantStatus.seatPositionStyle.seatPosition.height) * REACTION_TRAVEL_HEIGHT\n )}\n >\n <div\n data-ui-id={`together-mode-participant-reaction-${participantStatus.id}`}\n style={{\n ...togetherModeParticipantEmojiSpriteStyle(\n emojiSize,\n participantStatus.scaledSize || 1,\n participantStatus.seatPositionStyle.seatPosition.width\n )\n }}\n >\n <div\n style={spriteAnimationStyles(\n REACTION_NUMBER_OF_ANIMATION_FRAMES,\n participantStatus.scaledSize || 1,\n (participantStatus.reaction &&\n getEmojiResource(participantStatus?.reaction.reactionType, reactionResources)) ??\n ''\n )}\n />\n </div>\n </div>\n )}\n </div>\n </div>\n )\n )}\n </div>\n );\n }\n);\n"]}
|
@@ -46,7 +46,7 @@ export const TogetherModeStream = memo((props) => {
|
|
46
46
|
}, [onSetTogetherModeSceneSize, containerWidth, containerHeight]);
|
47
47
|
const stream = (_b = props.togetherModeStreams) === null || _b === void 0 ? void 0 : _b.mainVideoStream;
|
48
48
|
const showLoadingIndicator = !(stream && stream.isAvailable && stream.isReceiving);
|
49
|
-
return containerWidth && containerHeight ? (React.createElement(Stack, { styles: togetherModeStreamRootStyle, horizontalAlign: "center", verticalAlign: "center" },
|
49
|
+
return containerWidth && containerHeight ? (React.createElement(Stack, { styles: togetherModeStreamRootStyle, horizontalAlign: "center", verticalAlign: "center", "data-ui-id": "together-mode-layout" },
|
50
50
|
React.createElement(StreamMedia, { videoStreamElement: (stream === null || stream === void 0 ? void 0 : stream.renderElement) || null, isMirrored: true, loadingState: showLoadingIndicator ? 'loading' : 'none' }),
|
51
51
|
React.createElement(MeetingReactionOverlay, { reactionResources: props.reactionResources || {}, localParticipant: props.localParticipant, remoteParticipants: props.remoteParticipants, togetherModeSeatPositions: props.seatingCoordinates, overlayMode: "together-mode" }))) : (React.createElement(React.Fragment, null));
|
52
52
|
});
|
package/dist/dist-esm/react-components/src/components/VideoGallery/TogetherModeStream.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TogetherModeStream.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/TogetherModeStream.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,gDAAgD;AAChD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAaxD,gDAAgD;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,gDAAgD;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,gDAAgD;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,gDAAgD;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,gDAAgD;AAChD;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CACpC,CAAC,KAcA,EAAe,EAAE;;IAChB,MAAM,EACJ,wBAAwB,EACxB,oBAAoB,EACpB,8BAA8B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AAC,CAAC,MAAM,IAAI,MAAM,CAAC,WAAW,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC;IAEnF,OAAO,cAAc,IAAI,eAAe,CAAC,CAAC,CAAC,CACzC,oBAAC,KAAK,
|
1
|
+
{"version":3,"file":"TogetherModeStream.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/TogetherModeStream.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,gDAAgD;AAChD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAaxD,gDAAgD;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,gDAAgD;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACnE,gDAAgD;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,gDAAgD;AAChD,OAAO,EAAE,2BAA2B,EAAE,MAAM,+BAA+B,CAAC;AAC5E,gDAAgD;AAChD;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CACpC,CAAC,KAcA,EAAe,EAAE;;IAChB,MAAM,EACJ,wBAAwB,EACxB,oBAAoB,EACpB,8BAA8B,EAC9B,mBAAmB,EACnB,0BAA0B,EAC1B,+BAA+B,EAC/B,mBAAmB,EACnB,cAAc,EACd,eAAe,EAChB,GAAG,KAAK,CAAC;IAEV,SAAS,CAAC,GAAG,EAAE;QACb,OAAO,GAAG,EAAE;YACV,oEAAoE;YACpE,+BAA+B,IAAI,+BAA+B,EAAE,CAAC;QACvE,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,+BAA+B,CAAC,CAAC,CAAC;IAEtC,6CAA6C;IAC7C,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,wBAAwB,IAAI,CAAC,oBAAoB,EAAE,CAAC;YACtD,mBAAmB,aAAnB,mBAAmB,uBAAnB,m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,CAAC,MAAM,GACvD;QACF,oBAAC,sBAAsB,IACrB,iBAAiB,EAAE,KAAK,CAAC,iBAAiB,IAAK,EAAwB,EACvE,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,EACxC,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAC5C,yBAAyB,EAAE,KAAK,CAAC,kBAAkB,EACnD,WAAW,EAAC,eAAe,GAC3B,CACI,CACT,CAAC,CAAC,CAAC,CACF,yCAAK,CACN,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* @conditional-compile-remove(together-mode) */\nimport React, { useEffect, useMemo, memo } from 'react';\n/* @conditional-compile-remove(together-mode) */\nimport { _formatString, _pxToRem } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(together-mode) */\nimport {\n ReactionResources,\n VideoGalleryTogetherModeParticipantPosition,\n VideoGalleryTogetherModeStreams,\n TogetherModeStreamViewResult,\n VideoGalleryLocalParticipant,\n VideoGalleryRemoteParticipant,\n VideoStreamOptions\n} from '../../types';\n/* @conditional-compile-remove(together-mode) */\nimport { StreamMedia } from '../StreamMedia';\n/* @conditional-compile-remove(together-mode) */\nimport { MeetingReactionOverlay } from '../MeetingReactionOverlay';\n/* @conditional-compile-remove(together-mode) */\nimport { Stack } from '@fluentui/react';\n/* @conditional-compile-remove(together-mode) */\nimport { togetherModeStreamRootStyle } from '../styles/TogetherMode.styles';\n/* @conditional-compile-remove(together-mode) */\n/**\n * A memoized version of local screen share component. React.memo is used for a performance\n * boost by memoizing the same rendered component to avoid rerendering this when the parent component rerenders.\n * https://reactjs.org/docs/react-api.html#reactmemo\n */\nexport const TogetherModeStream = memo(\n (props: {\n startTogetherModeEnabled?: boolean;\n isTogetherModeActive?: boolean;\n onCreateTogetherModeStreamView?: (options?: VideoStreamOptions) => Promise<void | TogetherModeStreamViewResult>;\n onStartTogetherMode?: (options?: VideoStreamOptions) => Promise<void | TogetherModeStreamViewResult>;\n onDisposeTogetherModeStreamView?: () => Promise<void>;\n onSetTogetherModeSceneSize?: (width: number, height: number) => void;\n togetherModeStreams?: VideoGalleryTogetherModeStreams;\n seatingCoordinates?: VideoGalleryTogetherModeParticipantPosition;\n reactionResources?: ReactionResources;\n localParticipant?: VideoGalleryLocalParticipant;\n remoteParticipants?: VideoGalleryRemoteParticipant[];\n containerWidth?: number;\n containerHeight?: number;\n }): JSX.Element => {\n const {\n startTogetherModeEnabled,\n isTogetherModeActive,\n onCreateTogetherModeStreamView,\n onStartTogetherMode,\n onSetTogetherModeSceneSize,\n onDisposeTogetherModeStreamView,\n togetherModeStreams,\n containerWidth,\n containerHeight\n } = props;\n\n useEffect(() => {\n return () => {\n // TODO: Isolate disposing behaviors for screenShare and videoStream\n onDisposeTogetherModeStreamView && onDisposeTogetherModeStreamView();\n };\n }, [onDisposeTogetherModeStreamView]);\n\n // Trigger startTogetherMode only when needed\n useEffect(() => {\n if (startTogetherModeEnabled && !isTogetherModeActive) {\n onStartTogetherMode?.();\n }\n }, [startTogetherModeEnabled, isTogetherModeActive, onStartTogetherMode]);\n\n // Create stream view if not already created\n useEffect(() => {\n if (!togetherModeStreams?.mainVideoStream?.renderElement) {\n onCreateTogetherModeStreamView?.();\n }\n }, [togetherModeStreams?.mainVideoStream?.renderElement, onCreateTogetherModeStreamView]);\n\n // Update scene size only when container dimensions change\n useMemo(() => {\n if (onSetTogetherModeSceneSize && containerWidth && containerHeight) {\n onSetTogetherModeSceneSize(containerWidth, containerHeight);\n }\n }, [onSetTogetherModeSceneSize, containerWidth, containerHeight]);\n\n const stream = props.togetherModeStreams?.mainVideoStream;\n const showLoadingIndicator = !(stream && stream.isAvailable && stream.isReceiving);\n\n return containerWidth && containerHeight ? (\n <Stack\n styles={togetherModeStreamRootStyle}\n horizontalAlign=\"center\"\n verticalAlign=\"center\"\n data-ui-id=\"together-mode-layout\"\n >\n <StreamMedia\n videoStreamElement={stream?.renderElement || null}\n isMirrored={true}\n loadingState={showLoadingIndicator ? 'loading' : 'none'}\n />\n <MeetingReactionOverlay\n reactionResources={props.reactionResources || ({} as ReactionResources)}\n localParticipant={props.localParticipant}\n remoteParticipants={props.remoteParticipants}\n togetherModeSeatPositions={props.seatingCoordinates}\n overlayMode=\"together-mode\"\n />\n </Stack>\n ) : (\n <></>\n );\n }\n);\n"]}
|