@azure/communication-react 1.23.0-alpha-202501220016 → 1.23.0-alpha-202501240016
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/communication-react.d.ts +12 -0
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-Ce3IaY-J.js → ChatMessageComponentAsRichTextEditBox-BhrjFUxc.js} +2 -2
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-Ce3IaY-J.js.map → ChatMessageComponentAsRichTextEditBox-BhrjFUxc.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BOuoafBr.js → RichTextSendBoxWrapper-BDKhvEqz.js} +2 -2
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BOuoafBr.js.map → RichTextSendBoxWrapper-BDKhvEqz.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-BpZAIcz9.js → index-CkJB-dVG.js} +69 -39
- package/dist/dist-cjs/communication-react/index-CkJB-dVG.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +5 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +5 -0
- package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +2 -2
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js +2 -4
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +10 -0
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +13 -0
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.d.ts +5 -0
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +19 -4
- package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.js +20 -20
- package/dist/dist-esm/calling-stateful-client/src/TogetherModeSubscriber.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +4 -0
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +1 -1
- package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js +2 -0
- package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +1 -0
- package/package.json +1 -1
- package/dist/dist-cjs/communication-react/index-BpZAIcz9.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"notificationStackSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/notificationStackSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAEL,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,iDAAiD;AACjD,OAAO,EAAE,uBAAu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AAC;AAEF,MAAM,0BAA0B,GAAG,CACjC,mBAAyC,EACzC,YAAwB,EACxB,MAAuB,EACvB,eAAiC,EAC3B,EAAE;IACR,IAAI,YAAY,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE,CAAC;QACvC,OAAO;IACT,CAAC;IACD,mBAAmB,CAAC,IAAI,CAAC;QACvB,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,SAAS;KAC1C,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,wCAAwC,GAAG,CAC/C,mBAAyC,EACzC,YAAwB,EACxB,mBAAmG,EAC7F,EAAE;IACR,+CAA+C;IAC/C,IACE,mBAAmB;QACnB,CAAC,mBAAmB,CAAC,2BAA2B,CAAC;QACjD,CAAC,mBAAmB,CAAC,4BAA4B,CAAC,EAClD,CAAC;QACD,0BAA0B,CAAC,mBAAmB,EAAE,YAAY,EAAE,oBAAoB,EAAE,0BAA0B,CAAC,CAAC;IAClH,CAAC;IACD,+CAA+C;IAC/C,OAAO;IAEP,0BAA0B,CAAC,mBAAmB,EAAE,YAAY,EAAE,oBAAoB,EAAE,0BAA0B,CAAC,CAAC;AAClH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n CallingBaseSelectorProps,\n getDeviceManager,\n getDiagnostics,\n getLatestErrors,\n getEnvironmentInfo\n} from './baseSelectors';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { getAssignedBreakoutRoom } from './baseSelectors';\n/* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */\nimport { getLatestNotifications } from './baseSelectors';\n\nimport { getMeetingConferencePhones } from './baseSelectors';\n\nimport { ActiveNotification, NotificationType } from '@internal/react-components';\n\nimport { createSelector } from 'reselect';\n\nimport { CallClientState, CallErrors, CallErrorTarget } from '@internal/calling-stateful-client';\n\nimport { DiagnosticQuality } from '@azure/communication-calling';\n\n/* @conditional-compile-remove(media-access) */\nimport { CallNotifications } from '@internal/calling-stateful-client';\n\n/**\n * Selector type for {@link Notification} component.\n *\n * @public\n */\nexport type NotificationStackSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n activeErrorMessages: ActiveNotification[];\n activeNotifications: ActiveNotification[];\n};\n\n/**\n * Select the active errors from the state for the `Notification` component.\n *\n * Invariants:\n * - `ErrorType` is never repeated in the returned errors.\n * - Errors are returned in a fixed order by `ErrorType`.\n *\n * @public\n */\nexport const notificationStackSelector: NotificationStackSelector = createSelector(\n [\n getLatestErrors,\n /* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */ getLatestNotifications,\n getDiagnostics,\n getDeviceManager,\n getEnvironmentInfo,\n getMeetingConferencePhones,\n /* @conditional-compile-remove(breakout-rooms) */ getAssignedBreakoutRoom\n ],\n (\n latestErrors: CallErrors,\n /* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */ /* @conditional-compile-remove(together-mode) */ latestNotifications,\n diagnostics,\n deviceManager,\n environmentInfo,\n meetingConference,\n /* @conditional-compile-remove(breakout-rooms) */ assignedBreakoutRoom\n ): { activeErrorMessages: ActiveNotification[]; activeNotifications: ActiveNotification[] } => {\n // The order in which the errors are returned is significant: The `Notification` shows errors on the UI in that order.\n // There are several options for the ordering:\n // - Sorted by when the errors happened (latest first / oldest first).\n // - Stable sort by error type.\n //\n // We chose to stable sort by error type: We intend to show only a small number of errors on the UI and we do not\n // have timestamps for errors.\n const activeErrorMessages: ActiveNotification[] = [];\n\n const isSafari = (): boolean => {\n return environmentInfo?.environment.browser === 'safari';\n };\n\n const isMacOS = (): boolean => {\n return environmentInfo?.environment.platform === 'mac';\n };\n\n // Errors reported via diagnostics are more reliable than from API method failures, so process those first.\n let isTeamsMeetingWithPhones = false;\n\n if (meetingConference && meetingConference.length > 0) {\n isTeamsMeetingWithPhones = true;\n }\n if (\n diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Bad ||\n diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Poor\n ) {\n if (isTeamsMeetingWithPhones) {\n activeErrorMessages.push({ type: 'teamsMeetingCallNetworkQualityLow' });\n } else {\n activeErrorMessages.push({ type: 'callNetworkQualityLow' });\n }\n }\n if (diagnostics?.media.latest.noSpeakerDevicesEnumerated?.value === true) {\n activeErrorMessages.push({ type: 'callNoSpeakerFound' });\n }\n if (diagnostics?.media.latest.noMicrophoneDevicesEnumerated?.value === true) {\n activeErrorMessages.push({ type: 'callNoMicrophoneFound' });\n }\n if (deviceManager.deviceAccess?.audio === false && isSafari()) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDeniedSafari' });\n }\n if (deviceManager.deviceAccess?.audio === false && !isSafari()) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDenied' });\n }\n\n if (diagnostics?.media.latest.microphonePermissionDenied?.value === true && isMacOS()) {\n activeErrorMessages.push({ type: 'callMacOsMicrophoneAccessDenied' });\n } else if (diagnostics?.media.latest.microphonePermissionDenied?.value === true) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDenied' });\n }\n\n const microphoneMuteUnexpectedlyDiagnostic =\n diagnostics?.media.latest.microphoneMuteUnexpectedly || diagnostics?.media.latest.microphoneNotFunctioning;\n if (microphoneMuteUnexpectedlyDiagnostic) {\n if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that microphone stopped working and inform them to start microphone again\n activeErrorMessages.push({ type: 'callMicrophoneMutedBySystem' });\n } else if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that microphone recovered\n activeErrorMessages.push({ type: 'callMicrophoneUnmutedBySystem' });\n }\n }\n\n const cameraStoppedUnexpectedlyDiagnostic = diagnostics?.media.latest.cameraStoppedUnexpectedly;\n if (cameraStoppedUnexpectedlyDiagnostic) {\n if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that camera stopped working and inform them to start video again\n activeErrorMessages.push({ type: 'callVideoStoppedBySystem' });\n } else if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that camera recovered\n activeErrorMessages.push({ type: 'callVideoRecoveredBySystem' });\n }\n }\n if (deviceManager.deviceAccess?.video === false && isSafari()) {\n activeErrorMessages.push({ type: 'callCameraAccessDeniedSafari' });\n } else if (deviceManager.deviceAccess?.video === false) {\n activeErrorMessages.push({ type: 'callCameraAccessDenied' });\n } else {\n if (diagnostics?.media.latest.cameraFreeze?.value === true) {\n activeErrorMessages.push({ type: 'cameraFrozenForRemoteParticipants' });\n }\n }\n\n /**\n * show the Mac specific strings if the platform is detected as mac\n */\n if (diagnostics?.media.latest.cameraPermissionDenied?.value === true && isMacOS()) {\n activeErrorMessages.push({ type: 'callMacOsCameraAccessDenied' });\n }\n\n /**\n * This UFD only works on mac still so we should only see it fire on mac.\n */\n if (diagnostics?.media.latest.screenshareRecordingDisabled?.value === true && isMacOS()) {\n activeErrorMessages.push({ type: 'callMacOsScreenShareAccessDenied' });\n } else if (diagnostics?.media.latest.screenshareRecordingDisabled?.value === true) {\n activeErrorMessages.push({ type: 'startScreenShareGeneric' });\n }\n\n // Prefer to show errors with privacy implications.\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopVideo', 'stopVideoGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mute', 'muteGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopScreenSharing', 'stopScreenShareGeneric');\n\n if (\n latestErrors['Call.startVideo']?.message === 'Call.startVideo: Video operation failure SourceUnavailableError'\n ) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAlreadyInUse');\n } else if (\n latestErrors['Call.startVideo']?.message === 'Call.startVideo: Video operation failure permissionDeniedError'\n ) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAccessDenied');\n } else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'startVideoGeneric');\n }\n\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.unmute', 'unmuteGeneric');\n appendMuteByOthersNotificationTrampoline(\n activeErrorMessages,\n latestErrors,\n /* @conditional-compile-remove(media-access) */ latestNotifications\n );\n appendActiveErrorIfDefined(\n activeErrorMessages,\n latestErrors,\n 'VideoEffectsFeature.startEffects',\n 'unableToStartVideoEffect'\n );\n\n if (latestErrors['CallAgent.join']?.message === 'CallAgent.join: Invalid meeting link') {\n appendActiveErrorIfDefined(\n activeErrorMessages,\n latestErrors,\n 'CallAgent.join',\n 'failedToJoinCallInvalidMeetingLink'\n );\n } else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallGeneric');\n }\n\n if (\n latestErrors['Call.feature']?.message.match(\n /Call\\.feature: startSpotlight failed\\. \\d+ is the max number of participants that can be Spotlighted/g\n )\n ) {\n appendActiveErrorIfDefined(\n activeErrorMessages,\n latestErrors,\n 'Call.feature',\n 'startSpotlightWhileMaxParticipantsAreSpotlighted'\n );\n }\n\n //below is for active notifications\n const activeNotifications: ActiveNotification[] = [];\n if (diagnostics?.media.latest.speakingWhileMicrophoneIsMuted?.value) {\n activeNotifications.push({\n type: 'speakingWhileMuted',\n timestamp: new Date(Date.now()),\n autoDismiss: true,\n ariaLive: 'off' // \"You're muted\" is too noisy, so we don't want to announce it.\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['assignedBreakoutRoomOpened']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomOpened',\n timestamp: latestNotifications['assignedBreakoutRoomOpened'].timestamp\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['assignedBreakoutRoomOpenedPromptJoin'] && assignedBreakoutRoom) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomOpenedPromptJoin',\n timestamp: latestNotifications['assignedBreakoutRoomOpenedPromptJoin'].timestamp,\n onClickPrimaryButton: () => assignedBreakoutRoom.join()\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['assignedBreakoutRoomChanged']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomChanged',\n timestamp: latestNotifications['assignedBreakoutRoomChanged'].timestamp\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['breakoutRoomJoined']) {\n activeNotifications.push({\n type: 'breakoutRoomJoined',\n timestamp: latestNotifications['breakoutRoomJoined'].timestamp\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['breakoutRoomClosingSoon']) {\n activeNotifications.push({\n type: 'breakoutRoomClosingSoon',\n timestamp: latestNotifications['breakoutRoomClosingSoon'].timestamp\n });\n }\n\n /* @conditional-compile-remove(media-access) */\n if (latestNotifications['capabilityTurnVideoOnPresent']) {\n activeNotifications.push({\n type: 'capabilityTurnVideoOnPresent',\n timestamp: latestNotifications['capabilityTurnVideoOnPresent'].timestamp\n });\n }\n\n /* @conditional-compile-remove(media-access) */\n if (latestNotifications['capabilityTurnVideoOnAbsent']) {\n activeNotifications.push({\n type: 'capabilityTurnVideoOnAbsent',\n timestamp: latestNotifications['capabilityTurnVideoOnAbsent'].timestamp\n });\n }\n\n /* @conditional-compile-remove(media-access) */\n if (latestNotifications['capabilityUnmuteMicPresent']) {\n activeNotifications.push({\n type: 'capabilityUnmuteMicPresent',\n timestamp: latestNotifications['capabilityUnmuteMicPresent'].timestamp\n });\n }\n\n /* @conditional-compile-remove(media-access) */\n if (latestNotifications['capabilityUnmuteMicAbsent']) {\n activeNotifications.push({\n type: 'capabilityUnmuteMicAbsent',\n timestamp: latestNotifications['capabilityUnmuteMicAbsent'].timestamp\n });\n }\n\n /* @conditional-compile-remove(together-mode) */\n if (latestNotifications['togetherModeStarted']) {\n activeNotifications.push({\n type: 'togetherModeStarted',\n timestamp: latestNotifications['togetherModeStarted'].timestamp,\n autoDismiss: true\n });\n }\n\n /* @conditional-compile-remove(together-mode) */\n if (latestNotifications['togetherModeEnded']) {\n activeNotifications.push({\n type: 'togetherModeEnded',\n timestamp: latestNotifications['togetherModeEnded'].timestamp,\n autoDismiss: true\n });\n }\n\n return { activeErrorMessages: activeErrorMessages, activeNotifications: activeNotifications };\n }\n);\n\nconst appendActiveErrorIfDefined = (\n activeErrorMessages: ActiveNotification[],\n latestErrors: CallErrors,\n target: CallErrorTarget,\n activeErrorType: NotificationType\n): void => {\n if (latestErrors[target] === undefined) {\n return;\n }\n activeErrorMessages.push({\n type: activeErrorType,\n timestamp: latestErrors[target].timestamp\n });\n};\n\nconst appendMuteByOthersNotificationTrampoline = (\n activeErrorMessages: ActiveNotification[],\n latestErrors: CallErrors,\n latestNotifications?: undefined | /* @conditional-compile-remove(media-access) */ CallNotifications\n): void => {\n /* @conditional-compile-remove(media-access) */\n if (\n latestNotifications &&\n !latestNotifications['capabilityUnmuteMicAbsent'] &&\n !latestNotifications['capabilityUnmuteMicPresent']\n ) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');\n }\n /* @conditional-compile-remove(media-access) */\n return;\n\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');\n};\n"]}
|
1
|
+
{"version":3,"file":"notificationStackSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/notificationStackSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAEL,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,kBAAkB,EACnB,MAAM,iBAAiB,CAAC;AACzB,iDAAiD;AACjD,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,iDAAiD,CAAC,+CAA+C;AACjG,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,OAAO,EAAE,0BAA0B,EAAE,M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AAE,CAAC;QACvC,OAAO;IACT,CAAC;IACD,mBAAmB,CAAC,IAAI,CAAC;QACvB,IAAI,EAAE,eAAe;QACrB,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,SAAS;KAC1C,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,wCAAwC,GAAG,CAC/C,mBAAyC,EACzC,YAAwB,EACxB,mBAAmG,EAC7F,EAAE;IACR,+CAA+C;IAC/C,IACE,mBAAmB;QACnB,CAAC,mBAAmB,CAAC,2BAA2B,CAAC;QACjD,CAAC,mBAAmB,CAAC,4BAA4B,CAAC,EAClD,CAAC;QACD,0BAA0B,CAAC,mBAAmB,EAAE,YAAY,EAAE,oBAAoB,EAAE,0BAA0B,CAAC,CAAC;IAClH,CAAC;IACD,+CAA+C;IAC/C,OAAO;IAEP,0BAA0B,CAAC,mBAAmB,EAAE,YAAY,EAAE,oBAAoB,EAAE,0BAA0B,CAAC,CAAC;AAClH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n CallingBaseSelectorProps,\n getDeviceManager,\n getDiagnostics,\n getLatestErrors,\n getEnvironmentInfo\n} from './baseSelectors';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { getAssignedBreakoutRoom } from './baseSelectors';\n/* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */\nimport { getLatestNotifications } from './baseSelectors';\n\nimport { getMeetingConferencePhones } from './baseSelectors';\n\nimport { ActiveNotification, NotificationType } from '@internal/react-components';\n\nimport { createSelector } from 'reselect';\n\nimport { CallClientState, CallErrors, CallErrorTarget } from '@internal/calling-stateful-client';\n\nimport { DiagnosticQuality } from '@azure/communication-calling';\n\n/* @conditional-compile-remove(media-access) */\nimport { CallNotifications } from '@internal/calling-stateful-client';\n\n/**\n * Selector type for {@link Notification} component.\n *\n * @public\n */\nexport type NotificationStackSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n activeErrorMessages: ActiveNotification[];\n activeNotifications: ActiveNotification[];\n};\n\n/**\n * Select the active errors from the state for the `Notification` component.\n *\n * Invariants:\n * - `ErrorType` is never repeated in the returned errors.\n * - Errors are returned in a fixed order by `ErrorType`.\n *\n * @public\n */\nexport const notificationStackSelector: NotificationStackSelector = createSelector(\n [\n getLatestErrors,\n /* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */ getLatestNotifications,\n getDiagnostics,\n getDeviceManager,\n getEnvironmentInfo,\n getMeetingConferencePhones,\n /* @conditional-compile-remove(breakout-rooms) */ getAssignedBreakoutRoom\n ],\n (\n latestErrors: CallErrors,\n /* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */ /* @conditional-compile-remove(together-mode) */ latestNotifications,\n diagnostics,\n deviceManager,\n environmentInfo,\n meetingConference,\n /* @conditional-compile-remove(breakout-rooms) */ assignedBreakoutRoom\n ): { activeErrorMessages: ActiveNotification[]; activeNotifications: ActiveNotification[] } => {\n // The order in which the errors are returned is significant: The `Notification` shows errors on the UI in that order.\n // There are several options for the ordering:\n // - Sorted by when the errors happened (latest first / oldest first).\n // - Stable sort by error type.\n //\n // We chose to stable sort by error type: We intend to show only a small number of errors on the UI and we do not\n // have timestamps for errors.\n const activeErrorMessages: ActiveNotification[] = [];\n\n const isSafari = (): boolean => {\n return environmentInfo?.environment.browser === 'safari';\n };\n\n const isMacOS = (): boolean => {\n return environmentInfo?.environment.platform === 'mac';\n };\n\n // Errors reported via diagnostics are more reliable than from API method failures, so process those first.\n let isTeamsMeetingWithPhones = false;\n\n if (meetingConference && meetingConference.length > 0) {\n isTeamsMeetingWithPhones = true;\n }\n if (\n diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Bad ||\n diagnostics?.network.latest.networkReceiveQuality?.value === DiagnosticQuality.Poor\n ) {\n if (isTeamsMeetingWithPhones) {\n activeErrorMessages.push({ type: 'teamsMeetingCallNetworkQualityLow' });\n } else {\n activeErrorMessages.push({ type: 'callNetworkQualityLow' });\n }\n }\n if (diagnostics?.media.latest.noSpeakerDevicesEnumerated?.value === true) {\n activeErrorMessages.push({ type: 'callNoSpeakerFound' });\n }\n if (diagnostics?.media.latest.noMicrophoneDevicesEnumerated?.value === true) {\n activeErrorMessages.push({ type: 'callNoMicrophoneFound' });\n }\n if (deviceManager.deviceAccess?.audio === false && isSafari()) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDeniedSafari' });\n }\n if (deviceManager.deviceAccess?.audio === false && !isSafari()) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDenied' });\n }\n\n if (diagnostics?.media.latest.microphonePermissionDenied?.value === true && isMacOS()) {\n activeErrorMessages.push({ type: 'callMacOsMicrophoneAccessDenied' });\n } else if (diagnostics?.media.latest.microphonePermissionDenied?.value === true) {\n activeErrorMessages.push({ type: 'callMicrophoneAccessDenied' });\n }\n\n const microphoneMuteUnexpectedlyDiagnostic =\n diagnostics?.media.latest.microphoneMuteUnexpectedly || diagnostics?.media.latest.microphoneNotFunctioning;\n if (microphoneMuteUnexpectedlyDiagnostic) {\n if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that microphone stopped working and inform them to start microphone again\n activeErrorMessages.push({ type: 'callMicrophoneMutedBySystem' });\n } else if (microphoneMuteUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that microphone recovered\n activeErrorMessages.push({ type: 'callMicrophoneUnmutedBySystem' });\n }\n }\n\n const cameraStoppedUnexpectedlyDiagnostic = diagnostics?.media.latest.cameraStoppedUnexpectedly;\n if (cameraStoppedUnexpectedlyDiagnostic) {\n if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Bad) {\n // Inform the user that camera stopped working and inform them to start video again\n activeErrorMessages.push({ type: 'callVideoStoppedBySystem' });\n } else if (cameraStoppedUnexpectedlyDiagnostic.value === DiagnosticQuality.Good) {\n // Inform the user that camera recovered\n activeErrorMessages.push({ type: 'callVideoRecoveredBySystem' });\n }\n }\n if (deviceManager.deviceAccess?.video === false && isSafari()) {\n activeErrorMessages.push({ type: 'callCameraAccessDeniedSafari' });\n } else if (deviceManager.deviceAccess?.video === false) {\n activeErrorMessages.push({ type: 'callCameraAccessDenied' });\n } else {\n if (diagnostics?.media.latest.cameraFreeze?.value === true) {\n activeErrorMessages.push({ type: 'cameraFrozenForRemoteParticipants' });\n }\n }\n\n /**\n * show the Mac specific strings if the platform is detected as mac\n */\n if (diagnostics?.media.latest.cameraPermissionDenied?.value === true && isMacOS()) {\n activeErrorMessages.push({ type: 'callMacOsCameraAccessDenied' });\n }\n\n /**\n * This UFD only works on mac still so we should only see it fire on mac.\n */\n if (diagnostics?.media.latest.screenshareRecordingDisabled?.value === true && isMacOS()) {\n activeErrorMessages.push({ type: 'callMacOsScreenShareAccessDenied' });\n } else if (diagnostics?.media.latest.screenshareRecordingDisabled?.value === true) {\n activeErrorMessages.push({ type: 'startScreenShareGeneric' });\n }\n\n // Prefer to show errors with privacy implications.\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopVideo', 'stopVideoGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mute', 'muteGeneric');\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.stopScreenSharing', 'stopScreenShareGeneric');\n\n if (\n latestErrors['Call.startVideo']?.message === 'Call.startVideo: Video operation failure SourceUnavailableError'\n ) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAlreadyInUse');\n } else if (\n latestErrors['Call.startVideo']?.message === 'Call.startVideo: Video operation failure permissionDeniedError'\n ) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'callCameraAccessDenied');\n } else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.startVideo', 'startVideoGeneric');\n }\n\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.unmute', 'unmuteGeneric');\n appendMuteByOthersNotificationTrampoline(\n activeErrorMessages,\n latestErrors,\n /* @conditional-compile-remove(media-access) */ latestNotifications\n );\n appendActiveErrorIfDefined(\n activeErrorMessages,\n latestErrors,\n 'VideoEffectsFeature.startEffects',\n 'unableToStartVideoEffect'\n );\n\n if (latestErrors['CallAgent.join']?.message === 'CallAgent.join: Invalid meeting link') {\n appendActiveErrorIfDefined(\n activeErrorMessages,\n latestErrors,\n 'CallAgent.join',\n 'failedToJoinCallInvalidMeetingLink'\n );\n } else {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'CallAgent.join', 'failedToJoinCallGeneric');\n }\n\n if (\n latestErrors['Call.feature']?.message.match(\n /Call\\.feature: startSpotlight failed\\. \\d+ is the max number of participants that can be Spotlighted/g\n )\n ) {\n appendActiveErrorIfDefined(\n activeErrorMessages,\n latestErrors,\n 'Call.feature',\n 'startSpotlightWhileMaxParticipantsAreSpotlighted'\n );\n }\n\n //below is for active notifications\n const activeNotifications: ActiveNotification[] = [];\n if (diagnostics?.media.latest.speakingWhileMicrophoneIsMuted?.value) {\n activeNotifications.push({\n type: 'speakingWhileMuted',\n timestamp: new Date(Date.now()),\n autoDismiss: true,\n ariaLive: 'off' // \"You're muted\" is too noisy, so we don't want to announce it.\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['assignedBreakoutRoomOpened']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomOpened',\n timestamp: latestNotifications['assignedBreakoutRoomOpened'].timestamp\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['assignedBreakoutRoomOpenedPromptJoin'] && assignedBreakoutRoom) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomOpenedPromptJoin',\n timestamp: latestNotifications['assignedBreakoutRoomOpenedPromptJoin'].timestamp,\n onClickPrimaryButton: () => assignedBreakoutRoom.join()\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['assignedBreakoutRoomChanged']) {\n activeNotifications.push({\n type: 'assignedBreakoutRoomChanged',\n timestamp: latestNotifications['assignedBreakoutRoomChanged'].timestamp\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['breakoutRoomJoined']) {\n activeNotifications.push({\n type: 'breakoutRoomJoined',\n timestamp: latestNotifications['breakoutRoomJoined'].timestamp\n });\n }\n /* @conditional-compile-remove(breakout-rooms) */\n if (latestNotifications['breakoutRoomClosingSoon']) {\n activeNotifications.push({\n type: 'breakoutRoomClosingSoon',\n timestamp: latestNotifications['breakoutRoomClosingSoon'].timestamp\n });\n }\n\n /* @conditional-compile-remove(media-access) */\n if (latestNotifications['capabilityTurnVideoOnPresent']) {\n activeNotifications.push({\n type: 'capabilityTurnVideoOnPresent',\n timestamp: latestNotifications['capabilityTurnVideoOnPresent'].timestamp\n });\n }\n\n /* @conditional-compile-remove(media-access) */\n if (latestNotifications['capabilityTurnVideoOnAbsent']) {\n activeNotifications.push({\n type: 'capabilityTurnVideoOnAbsent',\n timestamp: latestNotifications['capabilityTurnVideoOnAbsent'].timestamp\n });\n }\n\n /* @conditional-compile-remove(media-access) */\n if (latestNotifications['capabilityUnmuteMicPresent']) {\n activeNotifications.push({\n type: 'capabilityUnmuteMicPresent',\n timestamp: latestNotifications['capabilityUnmuteMicPresent'].timestamp\n });\n }\n\n /* @conditional-compile-remove(media-access) */\n if (latestNotifications['capabilityUnmuteMicAbsent']) {\n activeNotifications.push({\n type: 'capabilityUnmuteMicAbsent',\n timestamp: latestNotifications['capabilityUnmuteMicAbsent'].timestamp\n });\n }\n\n /* @conditional-compile-remove(together-mode) */\n if (latestNotifications['togetherModeStarted']) {\n activeNotifications.push({\n type: 'togetherModeStarted',\n timestamp: latestNotifications['togetherModeStarted'].timestamp,\n autoDismiss: true\n });\n }\n /* @conditional-compile-remove(together-mode) */\n if (latestNotifications['togetherModeEnded']) {\n activeNotifications.push({\n type: 'togetherModeEnded',\n timestamp: latestNotifications['togetherModeEnded'].timestamp,\n autoDismiss: true\n });\n }\n\n return { activeErrorMessages: activeErrorMessages, activeNotifications: activeNotifications };\n }\n);\n\nconst appendActiveErrorIfDefined = (\n activeErrorMessages: ActiveNotification[],\n latestErrors: CallErrors,\n target: CallErrorTarget,\n activeErrorType: NotificationType\n): void => {\n if (latestErrors[target] === undefined) {\n return;\n }\n activeErrorMessages.push({\n type: activeErrorType,\n timestamp: latestErrors[target].timestamp\n });\n};\n\nconst appendMuteByOthersNotificationTrampoline = (\n activeErrorMessages: ActiveNotification[],\n latestErrors: CallErrors,\n latestNotifications?: undefined | /* @conditional-compile-remove(media-access) */ CallNotifications\n): void => {\n /* @conditional-compile-remove(media-access) */\n if (\n latestNotifications &&\n !latestNotifications['capabilityUnmuteMicAbsent'] &&\n !latestNotifications['capabilityUnmuteMicPresent']\n ) {\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');\n }\n /* @conditional-compile-remove(media-access) */\n return;\n\n appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');\n};\n"]}
|
@@ -43,4 +43,14 @@ export declare const memoizeLocalParticipant: (this: any, identifier: any, displ
|
|
43
43
|
};
|
44
44
|
/** @private */
|
45
45
|
export declare const memoizeSpotlightedParticipantIds: (this: any, spotlightedParticipants: any) => any;
|
46
|
+
/** @private */
|
47
|
+
export declare const memoizeTogetherModeStreams: (this: any, togetherModeStreams: any) => {
|
48
|
+
mainVideoStream: {
|
49
|
+
id: any;
|
50
|
+
isReceiving: any;
|
51
|
+
isAvailable: any;
|
52
|
+
renderElement: any;
|
53
|
+
streamSize: any;
|
54
|
+
};
|
55
|
+
};
|
46
56
|
//# sourceMappingURL=videoGalleryUtils.d.ts.map
|
@@ -144,4 +144,17 @@ export const memoizeLocalParticipant = memoizeOne((identifier, displayName, isMu
|
|
144
144
|
});
|
145
145
|
/** @private */
|
146
146
|
export const memoizeSpotlightedParticipantIds = memoizeOne((spotlightedParticipants) => spotlightedParticipants === null || spotlightedParticipants === void 0 ? void 0 : spotlightedParticipants.map((p) => toFlatCommunicationIdentifier(p.identifier)));
|
147
|
+
/** @private */
|
148
|
+
export const memoizeTogetherModeStreams = memoizeOne((togetherModeStreams) => {
|
149
|
+
var _a, _b, _c, _d, _e, _f;
|
150
|
+
return ({
|
151
|
+
mainVideoStream: {
|
152
|
+
id: (_a = togetherModeStreams === null || togetherModeStreams === void 0 ? void 0 : togetherModeStreams.mainVideoStream) === null || _a === void 0 ? void 0 : _a.id,
|
153
|
+
isReceiving: (_b = togetherModeStreams === null || togetherModeStreams === void 0 ? void 0 : togetherModeStreams.mainVideoStream) === null || _b === void 0 ? void 0 : _b.isReceiving,
|
154
|
+
isAvailable: (_c = togetherModeStreams === null || togetherModeStreams === void 0 ? void 0 : togetherModeStreams.mainVideoStream) === null || _c === void 0 ? void 0 : _c.isAvailable,
|
155
|
+
renderElement: (_e = (_d = togetherModeStreams === null || togetherModeStreams === void 0 ? void 0 : togetherModeStreams.mainVideoStream) === null || _d === void 0 ? void 0 : _d.view) === null || _e === void 0 ? void 0 : _e.target,
|
156
|
+
streamSize: (_f = togetherModeStreams === null || togetherModeStreams === void 0 ? void 0 : togetherModeStreams.mainVideoStream) === null || _f === void 0 ? void 0 : _f.streamSize
|
157
|
+
}
|
158
|
+
});
|
159
|
+
});
|
147
160
|
//# sourceMappingURL=videoGalleryUtils.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"videoGalleryUtils.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/utils/videoGalleryUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,YAAY,EAAE,6BAA6B,EAAE,mCAAgC;AAQtF,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,wBAAwB,EAA8B,MAAM,aAAa,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,E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,EAAE,OAAO;QAChB,iBAAiB,EAAE,iBAAiB;QACpC,WAAW,EAAE;YACX,WAAW,EAAE,CAAC,CAAC,gBAAgB;YAC/B,UAAU,EAAE,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,0CAAE,UAAU;YAC9C,aAAa,EAAE,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,0CAAE,MAAM;SAC9C;QACD,iBAAiB,EAAE;YACjB,WAAW,EAAE,CAAC,CAAC,wBAAwB;YACvC,aAAa,EAAE,MAAA,wBAAwB,aAAxB,wBAAwB,uBAAxB,wBAAwB,CAAE,IAAI,0CAAE,MAAM;SACtD;QACD,IAAI;QACJ,UAAU,EAAE,UAAU;QACtB,QAAQ;QACR,SAAS,EAAE,cAAc;QACzB,YAAY;QACZ,+CAA+C;QAC/C,WAAW,EAAE;YACX,gBAAgB,EAAE,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,EAAC,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;YACnF,gBAAgB,EAAE,CAAA,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,EAAC,CAAC,CAAC,YAAY,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI;SACxF;KACF,CAAC,CAAA;CAAA,CACH,CAAC;AAEF,eAAe;AACf,MAAM,CAAC,MAAM,gCAAgC,GAAG,UAAU,CAAC,CAAC,uBAAuB,EAAE,EAAE,CACrF,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,GAAG,CAAC,CAAC,CAAyB,EAAE,EAAE,CAAC,6BAA6B,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CACzG,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DominantSpeakersInfo } from '@azure/communication-calling';\nimport { SpotlightedParticipant } from '@azure/communication-calling';\nimport { ParticipantRole } from '@azure/communication-calling';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { RemoteParticipantState, RemoteVideoStreamState } from '@internal/calling-stateful-client';\nimport {\n VideoGalleryRemoteParticipant,\n VideoGalleryStream,\n /* @conditional-compile-remove(media-access) */\n MediaAccess\n} from '@internal/react-components';\nimport memoizeOne from 'memoize-one';\nimport { _convertParticipantState, ParticipantConnectionState } from './callUtils';\nimport { maskDisplayNameWithRole } from './callUtils';\nimport { checkIsSpeaking } from './SelectorUtils';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { RaisedHandState } from '@internal/calling-stateful-client';\nimport { Reaction } from '@internal/react-components';\nimport { memoizedConvertToVideoTileReaction } from './participantListSelectorUtils';\nimport { Spotlight } from '@internal/react-components';\n\n/** @internal */\nexport const _dominantSpeakersWithFlatId = (dominantSpeakers?: DominantSpeakersInfo): undefined | string[] => {\n return dominantSpeakers?.speakersList?.map(toFlatCommunicationIdentifier);\n};\n\n/** @internal */\nexport type _VideoGalleryRemoteParticipantsMemoFn = (\n remoteParticipants: RemoteParticipantState[] | undefined,\n isHideAttendeeNamesEnabled?: boolean,\n localUserRole?: ParticipantRole\n) => VideoGalleryRemoteParticipant[];\n\n/** @internal */\nexport const _videoGalleryRemoteParticipantsMemo: _VideoGalleryRemoteParticipantsMemoFn = (\n remoteParticipants: RemoteParticipantState[] | undefined,\n isHideAttendeeNamesEnabled?: boolean,\n localUserRole?\n): VideoGalleryRemoteParticipant[] => {\n if (!remoteParticipants) {\n return [];\n }\n\n return memoizedAllConvertRemoteParticipant((memoizedFn) => {\n return (\n Object.values(remoteParticipants)\n /**\n * hiding participants who are inLobby, idle, or connecting in ACS clients till we can admit users through ACS clients.\n * phone users will be in the connecting state until they are connected to the call.\n */\n .filter((participant: RemoteParticipantState) => {\n return (\n !['InLobby', 'Idle', 'Connecting', 'Disconnected'].includes(participant.state) ||\n isPhoneNumberIdentifier(participant.identifier)\n );\n })\n .map((participant: RemoteParticipantState) => {\n const state = _convertParticipantState(participant);\n const displayName = maskDisplayNameWithRole(\n participant.displayName,\n localUserRole,\n participant.role,\n isHideAttendeeNamesEnabled\n );\n const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);\n const spotlight = participant.spotlight;\n return memoizedFn(\n toFlatCommunicationIdentifier(participant.identifier),\n participant.isMuted,\n checkIsSpeaking(participant),\n participant.videoStreams,\n state,\n displayName,\n participant.raisedHand,\n participant.contentSharingStream,\n remoteParticipantReaction,\n spotlight,\n /* @conditional-compile-remove(media-access) */\n participant.mediaAccess,\n /* @conditional-compile-remove(media-access) */\n participant.role,\n /* @conditional-compile-remove(remote-ufd) */\n Math.max(\n (participant.diagnostics?.networkReceiveQuality?.value ?? 0) as number,\n (participant.diagnostics?.networkSendQuality?.value ?? 0) as number\n )\n );\n })\n );\n });\n};\n\nconst memoizedAllConvertRemoteParticipant = memoizeFnAll(\n (\n userId: string,\n isMuted: boolean,\n isSpeaking: boolean,\n videoStreams: { [key: number]: RemoteVideoStreamState },\n state: ParticipantConnectionState,\n displayName?: string,\n raisedHand?: RaisedHandState,\n contentSharingStream?: HTMLElement,\n reaction?: Reaction,\n spotlight?: Spotlight,\n mediaAccess?: undefined | /* @conditional-compile-remove(media-access) */ MediaAccess,\n role?: undefined | /* @conditional-compile-remove(media-access) */ ParticipantRole,\n signalStrength?: undefined | /* @conditional-compile-remove(remote-ufd) */ number\n ): VideoGalleryRemoteParticipant => {\n return convertRemoteParticipantToVideoGalleryRemoteParticipant(\n userId,\n isMuted,\n isSpeaking,\n videoStreams,\n state,\n displayName,\n raisedHand,\n contentSharingStream,\n reaction,\n spotlight,\n signalStrength,\n mediaAccess,\n role\n );\n }\n);\n\n/** @private */\nexport const convertRemoteParticipantToVideoGalleryRemoteParticipant = (\n userId: string,\n isMuted: boolean,\n isSpeaking: boolean,\n videoStreams: { [key: number]: RemoteVideoStreamState },\n state: ParticipantConnectionState,\n displayName?: string,\n raisedHand?: RaisedHandState,\n contentSharingStream?: HTMLElement,\n reaction?: Reaction,\n spotlight?: Spotlight,\n signalStrength?: undefined | /* @conditional-compile-remove(remote-ufd) */ number,\n mediaAccess?: undefined | /* @conditional-compile-remove(media-access) */ MediaAccess,\n role?: undefined | /* @conditional-compile-remove(media-access) */ ParticipantRole\n): VideoGalleryRemoteParticipant => {\n const rawVideoStreamsArray = Object.values(videoStreams);\n let videoStream: VideoGalleryStream | undefined = undefined;\n let screenShareStream: VideoGalleryStream | undefined = undefined;\n\n /**\n * There is a bug from the calling sdk where if a user leaves and rejoins immediately\n * it adds 2 more potential streams this remote participant can use. The old 2 streams\n * still show as available and that is how we got a frozen stream in this case. The stopgap\n * until streams accurately reflect their availability is to always prioritize the latest streams of a certain type\n * e.g findLast instead of find\n */\n const sdkRemoteVideoStream =\n Object.values(rawVideoStreamsArray).findLast((i) => i.mediaStreamType === 'Video' && i.isAvailable) ||\n Object.values(rawVideoStreamsArray).findLast((i) => i.mediaStreamType === 'Video');\n\n const sdkScreenShareStream =\n Object.values(rawVideoStreamsArray).findLast((i) => i.mediaStreamType === 'ScreenSharing' && i.isAvailable) ||\n Object.values(rawVideoStreamsArray).findLast((i) => i.mediaStreamType === 'ScreenSharing');\n\n if (sdkRemoteVideoStream) {\n videoStream = convertRemoteVideoStreamToVideoGalleryStream(sdkRemoteVideoStream);\n }\n if (sdkScreenShareStream) {\n screenShareStream = convertRemoteVideoStreamToVideoGalleryStream(sdkScreenShareStream);\n }\n\n if (contentSharingStream) {\n screenShareStream = convertRemoteContentSharingStreamToVideoGalleryStream(contentSharingStream);\n }\n\n return {\n userId,\n displayName,\n isMuted,\n isSpeaking,\n videoStream,\n screenShareStream,\n isScreenSharingOn: screenShareStream !== undefined && screenShareStream.isAvailable,\n state,\n raisedHand,\n reaction,\n spotlight,\n /* @conditional-compile-remove(media-access) */\n mediaAccess,\n /* @conditional-compile-remove(media-access) */\n canAudioBeForbidden: role === 'Attendee',\n /* @conditional-compile-remove(media-access) */\n canVideoBeForbidden: role === 'Attendee',\n /* @conditional-compile-remove(remote-ufd) */\n signalStrength\n };\n};\n\nconst convertRemoteVideoStreamToVideoGalleryStream = (stream: RemoteVideoStreamState): VideoGalleryStream => {\n return {\n id: stream.id,\n isAvailable: stream.isAvailable,\n isReceiving: stream.isReceiving,\n isMirrored: stream.view?.isMirrored,\n renderElement: stream.view?.target,\n scalingMode: stream.view?.scalingMode,\n streamSize: stream.streamSize\n };\n};\n\nconst convertRemoteContentSharingStreamToVideoGalleryStream = (stream: HTMLElement): VideoGalleryStream => {\n return {\n isAvailable: !!stream,\n isReceiving: true,\n isMirrored: false,\n renderElement: stream\n };\n};\n\n/** @private */\nexport const memoizeLocalParticipant = memoizeOne(\n (\n identifier,\n displayName,\n isMuted,\n isScreenSharingOn,\n localVideoStream,\n localScreenSharingStream,\n role,\n raisedHand,\n reaction,\n localSpotlight,\n capabilities\n ) => ({\n userId: identifier,\n displayName: displayName ?? '',\n isMuted: isMuted,\n isScreenSharingOn: isScreenSharingOn,\n videoStream: {\n isAvailable: !!localVideoStream,\n isMirrored: localVideoStream?.view?.isMirrored,\n renderElement: localVideoStream?.view?.target\n },\n screenShareStream: {\n isAvailable: !!localScreenSharingStream,\n renderElement: localScreenSharingStream?.view?.target\n },\n role,\n raisedHand: raisedHand,\n reaction,\n spotlight: localSpotlight,\n capabilities,\n /* @conditional-compile-remove(media-access) */\n mediaAccess: {\n isAudioPermitted: capabilities?.unmuteMic ? capabilities.unmuteMic.isPresent : true,\n isVideoPermitted: capabilities?.turnVideoOn ? capabilities.turnVideoOn.isPresent : true\n }\n })\n);\n\n/** @private */\nexport const memoizeSpotlightedParticipantIds = memoizeOne((spotlightedParticipants) =>\n spotlightedParticipants?.map((p: SpotlightedParticipant) => toFlatCommunicationIdentifier(p.identifier))\n);\n"]}
|
1
|
+
{"version":3,"file":"videoGalleryUtils.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/utils/videoGalleryUtils.ts"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AAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,GAAG,CAAC,CAAC,CAAyB,EAAE,EAAE,CAAC,6BAA6B,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CACzG,CAAC;AAEF,eAAe;AACf,MAAM,CAAC,MAAM,0BAA0B,GAAG,UAAU,CAAC,CAAC,mBAAmB,EAAE,EAAE;;IAAC,OAAA,CAAC;QAC7E,eAAe,EAAE;YACf,EAAE,EAAE,MAAA,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,eAAe,0CAAE,EAAE;YAC5C,WAAW,EAAE,MAAA,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,eAAe,0CAAE,WAAW;YAC9D,WAAW,EAAE,MAAA,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,eAAe,0CAAE,WAAW;YAC9D,aAAa,EAAE,MAAA,MAAA,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,eAAe,0CAAE,IAAI,0CAAE,MAAM;YACjE,UAAU,EAAE,MAAA,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,CAAE,eAAe,0CAAE,UAAU;SAC7D;KACF,CAAC,CAAA;CAAA,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { DominantSpeakersInfo } from '@azure/communication-calling';\nimport { SpotlightedParticipant } from '@azure/communication-calling';\nimport { ParticipantRole } from '@azure/communication-calling';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { RemoteParticipantState, RemoteVideoStreamState } from '@internal/calling-stateful-client';\nimport {\n VideoGalleryRemoteParticipant,\n VideoGalleryStream,\n /* @conditional-compile-remove(media-access) */\n MediaAccess\n} from '@internal/react-components';\nimport memoizeOne from 'memoize-one';\nimport { _convertParticipantState, ParticipantConnectionState } from './callUtils';\nimport { maskDisplayNameWithRole } from './callUtils';\nimport { checkIsSpeaking } from './SelectorUtils';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { RaisedHandState } from '@internal/calling-stateful-client';\nimport { Reaction } from '@internal/react-components';\nimport { memoizedConvertToVideoTileReaction } from './participantListSelectorUtils';\nimport { Spotlight } from '@internal/react-components';\n\n/** @internal */\nexport const _dominantSpeakersWithFlatId = (dominantSpeakers?: DominantSpeakersInfo): undefined | string[] => {\n return dominantSpeakers?.speakersList?.map(toFlatCommunicationIdentifier);\n};\n\n/** @internal */\nexport type _VideoGalleryRemoteParticipantsMemoFn = (\n remoteParticipants: RemoteParticipantState[] | undefined,\n isHideAttendeeNamesEnabled?: boolean,\n localUserRole?: ParticipantRole\n) => VideoGalleryRemoteParticipant[];\n\n/** @internal */\nexport const _videoGalleryRemoteParticipantsMemo: _VideoGalleryRemoteParticipantsMemoFn = (\n remoteParticipants: RemoteParticipantState[] | undefined,\n isHideAttendeeNamesEnabled?: boolean,\n localUserRole?\n): VideoGalleryRemoteParticipant[] => {\n if (!remoteParticipants) {\n return [];\n }\n\n return memoizedAllConvertRemoteParticipant((memoizedFn) => {\n return (\n Object.values(remoteParticipants)\n /**\n * hiding participants who are inLobby, idle, or connecting in ACS clients till we can admit users through ACS clients.\n * phone users will be in the connecting state until they are connected to the call.\n */\n .filter((participant: RemoteParticipantState) => {\n return (\n !['InLobby', 'Idle', 'Connecting', 'Disconnected'].includes(participant.state) ||\n isPhoneNumberIdentifier(participant.identifier)\n );\n })\n .map((participant: RemoteParticipantState) => {\n const state = _convertParticipantState(participant);\n const displayName = maskDisplayNameWithRole(\n participant.displayName,\n localUserRole,\n participant.role,\n isHideAttendeeNamesEnabled\n );\n const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);\n const spotlight = participant.spotlight;\n return memoizedFn(\n toFlatCommunicationIdentifier(participant.identifier),\n participant.isMuted,\n checkIsSpeaking(participant),\n participant.videoStreams,\n state,\n displayName,\n participant.raisedHand,\n participant.contentSharingStream,\n remoteParticipantReaction,\n spotlight,\n /* @conditional-compile-remove(media-access) */\n participant.mediaAccess,\n /* @conditional-compile-remove(media-access) */\n participant.role,\n /* @conditional-compile-remove(remote-ufd) */\n Math.max(\n (participant.diagnostics?.networkReceiveQuality?.value ?? 0) as number,\n (participant.diagnostics?.networkSendQuality?.value ?? 0) as number\n )\n );\n })\n );\n });\n};\n\nconst memoizedAllConvertRemoteParticipant = memoizeFnAll(\n (\n userId: string,\n isMuted: boolean,\n isSpeaking: boolean,\n videoStreams: { [key: number]: RemoteVideoStreamState },\n state: ParticipantConnectionState,\n displayName?: string,\n raisedHand?: RaisedHandState,\n contentSharingStream?: HTMLElement,\n reaction?: Reaction,\n spotlight?: Spotlight,\n mediaAccess?: undefined | /* @conditional-compile-remove(media-access) */ MediaAccess,\n role?: undefined | /* @conditional-compile-remove(media-access) */ ParticipantRole,\n signalStrength?: undefined | /* @conditional-compile-remove(remote-ufd) */ number\n ): VideoGalleryRemoteParticipant => {\n return convertRemoteParticipantToVideoGalleryRemoteParticipant(\n userId,\n isMuted,\n isSpeaking,\n videoStreams,\n state,\n displayName,\n raisedHand,\n contentSharingStream,\n reaction,\n spotlight,\n signalStrength,\n mediaAccess,\n role\n );\n }\n);\n\n/** @private */\nexport const convertRemoteParticipantToVideoGalleryRemoteParticipant = (\n userId: string,\n isMuted: boolean,\n isSpeaking: boolean,\n videoStreams: { [key: number]: RemoteVideoStreamState },\n state: ParticipantConnectionState,\n displayName?: string,\n raisedHand?: RaisedHandState,\n contentSharingStream?: HTMLElement,\n reaction?: Reaction,\n spotlight?: Spotlight,\n signalStrength?: undefined | /* @conditional-compile-remove(remote-ufd) */ number,\n mediaAccess?: undefined | /* @conditional-compile-remove(media-access) */ MediaAccess,\n role?: undefined | /* @conditional-compile-remove(media-access) */ ParticipantRole\n): VideoGalleryRemoteParticipant => {\n const rawVideoStreamsArray = Object.values(videoStreams);\n let videoStream: VideoGalleryStream | undefined = undefined;\n let screenShareStream: VideoGalleryStream | undefined = undefined;\n\n /**\n * There is a bug from the calling sdk where if a user leaves and rejoins immediately\n * it adds 2 more potential streams this remote participant can use. The old 2 streams\n * still show as available and that is how we got a frozen stream in this case. The stopgap\n * until streams accurately reflect their availability is to always prioritize the latest streams of a certain type\n * e.g findLast instead of find\n */\n const sdkRemoteVideoStream =\n Object.values(rawVideoStreamsArray).findLast((i) => i.mediaStreamType === 'Video' && i.isAvailable) ||\n Object.values(rawVideoStreamsArray).findLast((i) => i.mediaStreamType === 'Video');\n\n const sdkScreenShareStream =\n Object.values(rawVideoStreamsArray).findLast((i) => i.mediaStreamType === 'ScreenSharing' && i.isAvailable) ||\n Object.values(rawVideoStreamsArray).findLast((i) => i.mediaStreamType === 'ScreenSharing');\n\n if (sdkRemoteVideoStream) {\n videoStream = convertRemoteVideoStreamToVideoGalleryStream(sdkRemoteVideoStream);\n }\n if (sdkScreenShareStream) {\n screenShareStream = convertRemoteVideoStreamToVideoGalleryStream(sdkScreenShareStream);\n }\n\n if (contentSharingStream) {\n screenShareStream = convertRemoteContentSharingStreamToVideoGalleryStream(contentSharingStream);\n }\n\n return {\n userId,\n displayName,\n isMuted,\n isSpeaking,\n videoStream,\n screenShareStream,\n isScreenSharingOn: screenShareStream !== undefined && screenShareStream.isAvailable,\n state,\n raisedHand,\n reaction,\n spotlight,\n /* @conditional-compile-remove(media-access) */\n mediaAccess,\n /* @conditional-compile-remove(media-access) */\n canAudioBeForbidden: role === 'Attendee',\n /* @conditional-compile-remove(media-access) */\n canVideoBeForbidden: role === 'Attendee',\n /* @conditional-compile-remove(remote-ufd) */\n signalStrength\n };\n};\n\nconst convertRemoteVideoStreamToVideoGalleryStream = (stream: RemoteVideoStreamState): VideoGalleryStream => {\n return {\n id: stream.id,\n isAvailable: stream.isAvailable,\n isReceiving: stream.isReceiving,\n isMirrored: stream.view?.isMirrored,\n renderElement: stream.view?.target,\n scalingMode: stream.view?.scalingMode,\n streamSize: stream.streamSize\n };\n};\n\nconst convertRemoteContentSharingStreamToVideoGalleryStream = (stream: HTMLElement): VideoGalleryStream => {\n return {\n isAvailable: !!stream,\n isReceiving: true,\n isMirrored: false,\n renderElement: stream\n };\n};\n\n/** @private */\nexport const memoizeLocalParticipant = memoizeOne(\n (\n identifier,\n displayName,\n isMuted,\n isScreenSharingOn,\n localVideoStream,\n localScreenSharingStream,\n role,\n raisedHand,\n reaction,\n localSpotlight,\n capabilities\n ) => ({\n userId: identifier,\n displayName: displayName ?? '',\n isMuted: isMuted,\n isScreenSharingOn: isScreenSharingOn,\n videoStream: {\n isAvailable: !!localVideoStream,\n isMirrored: localVideoStream?.view?.isMirrored,\n renderElement: localVideoStream?.view?.target\n },\n screenShareStream: {\n isAvailable: !!localScreenSharingStream,\n renderElement: localScreenSharingStream?.view?.target\n },\n role,\n raisedHand: raisedHand,\n reaction,\n spotlight: localSpotlight,\n capabilities,\n /* @conditional-compile-remove(media-access) */\n mediaAccess: {\n isAudioPermitted: capabilities?.unmuteMic ? capabilities.unmuteMic.isPresent : true,\n isVideoPermitted: capabilities?.turnVideoOn ? capabilities.turnVideoOn.isPresent : true\n }\n })\n);\n\n/** @private */\nexport const memoizeSpotlightedParticipantIds = memoizeOne((spotlightedParticipants) =>\n spotlightedParticipants?.map((p: SpotlightedParticipant) => toFlatCommunicationIdentifier(p.identifier))\n);\n\n/** @private */\nexport const memoizeTogetherModeStreams = memoizeOne((togetherModeStreams) => ({\n mainVideoStream: {\n id: togetherModeStreams?.mainVideoStream?.id,\n isReceiving: togetherModeStreams?.mainVideoStream?.isReceiving,\n isAvailable: togetherModeStreams?.mainVideoStream?.isAvailable,\n renderElement: togetherModeStreams?.mainVideoStream?.view?.target,\n streamSize: togetherModeStreams?.mainVideoStream?.streamSize\n }\n}));\n"]}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { CallClientState } from "../../calling-stateful-client/src";
|
2
2
|
import { VideoGalleryRemoteParticipant, VideoGalleryLocalParticipant } from "../../react-components/src";
|
3
|
+
import { VideoGalleryTogetherModeStreams, VideoGalleryTogetherModeParticipantPosition } from "../../react-components/src";
|
3
4
|
import { CallingBaseSelectorProps } from './baseSelectors';
|
4
5
|
/**
|
5
6
|
* Selector type for {@link VideoGallery} component.
|
@@ -14,6 +15,10 @@ export type VideoGallerySelector = (state: CallClientState, props: CallingBaseSe
|
|
14
15
|
optimalVideoCount?: number;
|
15
16
|
spotlightedParticipants?: string[];
|
16
17
|
maxParticipantsToSpotlight?: number;
|
18
|
+
isTogetherModeActive?: boolean;
|
19
|
+
startTogetherModeEnabled?: boolean;
|
20
|
+
togetherModeStreams?: VideoGalleryTogetherModeStreams;
|
21
|
+
togetherModeSeatingCoordinates?: VideoGalleryTogetherModeParticipantPosition;
|
17
22
|
};
|
18
23
|
/**
|
19
24
|
* Provides data attributes to {@link VideoGallery} component.
|
@@ -3,11 +3,14 @@
|
|
3
3
|
import { toFlatCommunicationIdentifier } from "../../acs-ui-common/src";
|
4
4
|
import { createSelector } from 'reselect';
|
5
5
|
import { getDisplayName, getDominantSpeakers, getIdentifier, getIsMuted, getIsScreenSharingOn, getLocalVideoStreams, getRole, getScreenShareRemoteParticipant } from './baseSelectors';
|
6
|
+
/* @conditional-compile-remove(together-mode) */
|
7
|
+
import { getTogetherModeCallFeature } from './baseSelectors';
|
6
8
|
import { isHideAttendeeNamesEnabled } from './baseSelectors';
|
7
9
|
import { getOptimalVideoCount } from './baseSelectors';
|
8
10
|
import { _updateUserDisplayNames } from './utils/callUtils';
|
9
11
|
import { checkIsSpeaking } from './utils/SelectorUtils';
|
10
|
-
import { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId, convertRemoteParticipantToVideoGalleryRemoteParticipant, memoizeLocalParticipant
|
12
|
+
import { _videoGalleryRemoteParticipantsMemo, _dominantSpeakersWithFlatId, convertRemoteParticipantToVideoGalleryRemoteParticipant, memoizeLocalParticipant,
|
13
|
+
/* @conditional-compile-remove(together-mode) */ memoizeTogetherModeStreams } from './utils/videoGalleryUtils';
|
11
14
|
import { memoizeSpotlightedParticipantIds } from './utils/videoGalleryUtils';
|
12
15
|
import { getLocalParticipantRaisedHand } from './baseSelectors';
|
13
16
|
import { getLocalParticipantReactionState } from './baseSelectors';
|
@@ -33,8 +36,12 @@ export const videoGallerySelector = createSelector([
|
|
33
36
|
isHideAttendeeNamesEnabled,
|
34
37
|
getLocalParticipantReactionState,
|
35
38
|
getSpotlightCallFeature,
|
36
|
-
getCapabilities
|
37
|
-
|
39
|
+
getCapabilities,
|
40
|
+
/* @conditional-compile-remove(together-mode) */
|
41
|
+
getTogetherModeCallFeature
|
42
|
+
], (screenShareRemoteParticipantId, remoteParticipants, localVideoStreams, isMuted, isScreenSharingOn, displayName, identifier, dominantSpeakers, optimalVideoCount, role, raisedHand, isHideAttendeeNamesEnabled, localParticipantReaction, spotlightCallFeature, capabilities,
|
43
|
+
/* @conditional-compile-remove(together-mode) */
|
44
|
+
togetherModeCallFeature) => {
|
38
45
|
const screenShareRemoteParticipant = screenShareRemoteParticipantId && remoteParticipants
|
39
46
|
? remoteParticipants[screenShareRemoteParticipantId]
|
40
47
|
: undefined;
|
@@ -61,7 +68,15 @@ export const videoGallerySelector = createSelector([
|
|
61
68
|
dominantSpeakers: dominantSpeakerIds,
|
62
69
|
maxRemoteVideoStreams: optimalVideoCount,
|
63
70
|
spotlightedParticipants: spotlightedParticipantIds,
|
64
|
-
maxParticipantsToSpotlight: spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.maxParticipantsToSpotlight
|
71
|
+
maxParticipantsToSpotlight: spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.maxParticipantsToSpotlight,
|
72
|
+
/* @conditional-compile-remove(together-mode) */
|
73
|
+
togetherModeStreams: memoizeTogetherModeStreams(togetherModeCallFeature === null || togetherModeCallFeature === void 0 ? void 0 : togetherModeCallFeature.streams),
|
74
|
+
/* @conditional-compile-remove(together-mode) */
|
75
|
+
togetherModeSeatingCoordinates: togetherModeCallFeature === null || togetherModeCallFeature === void 0 ? void 0 : togetherModeCallFeature.seatingPositions,
|
76
|
+
/* @conditional-compile-remove(together-mode) */
|
77
|
+
isTogetherModeActive: togetherModeCallFeature === null || togetherModeCallFeature === void 0 ? void 0 : togetherModeCallFeature.isActive,
|
78
|
+
/* @conditional-compile-remove(together-mode) */
|
79
|
+
startTogetherModeEnabled: capabilities === null || capabilities === void 0 ? void 0 : capabilities.startTogetherMode.isPresent
|
65
80
|
};
|
66
81
|
});
|
67
82
|
//# sourceMappingURL=videoGallerySelector.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"videoGallerySelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/videoGallerySelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAGxE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAEL,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,OAAO,EACP,+BAA+B,EAChC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,mCAAmC,EACnC,2BAA2B,EAC3B,uDAAuD,EACvD,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE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AyB;QAClD,0BAA0B,EAAE,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,0BAA0B;KAC7E,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CallClientState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { VideoGalleryRemoteParticipant, VideoGalleryLocalParticipant } from '@internal/react-components';\nimport { createSelector } from 'reselect';\nimport {\n CallingBaseSelectorProps,\n getDisplayName,\n getDominantSpeakers,\n getIdentifier,\n getIsMuted,\n getIsScreenSharingOn,\n getLocalVideoStreams,\n getRole,\n getScreenShareRemoteParticipant\n} from './baseSelectors';\nimport { isHideAttendeeNamesEnabled } from './baseSelectors';\nimport { getOptimalVideoCount } from './baseSelectors';\nimport { _updateUserDisplayNames } from './utils/callUtils';\nimport { checkIsSpeaking } from './utils/SelectorUtils';\nimport {\n _videoGalleryRemoteParticipantsMemo,\n _dominantSpeakersWithFlatId,\n convertRemoteParticipantToVideoGalleryRemoteParticipant,\n memoizeLocalParticipant\n} from './utils/videoGalleryUtils';\nimport { memoizeSpotlightedParticipantIds } from './utils/videoGalleryUtils';\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\nimport { getLocalParticipantReactionState } from './baseSelectors';\nimport { memoizedConvertToVideoTileReaction } from './utils/participantListSelectorUtils';\nimport { getRemoteParticipantsExcludingConsumers } from './getRemoteParticipantsExcludingConsumers';\nimport { getSpotlightCallFeature, getCapabilities } from './baseSelectors';\n\n/**\n * Selector type for {@link VideoGallery} component.\n *\n * @public\n */\nexport type VideoGallerySelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n screenShareParticipant?: VideoGalleryRemoteParticipant;\n localParticipant: VideoGalleryLocalParticipant;\n remoteParticipants: VideoGalleryRemoteParticipant[];\n dominantSpeakers?: string[];\n optimalVideoCount?: number;\n spotlightedParticipants?: string[];\n maxParticipantsToSpotlight?: number;\n};\n\n/**\n * Provides data attributes to {@link VideoGallery} component.\n * @public\n */\nexport const videoGallerySelector: VideoGallerySelector = createSelector(\n [\n getScreenShareRemoteParticipant,\n getRemoteParticipantsExcludingConsumers,\n getLocalVideoStreams,\n getIsMuted,\n getIsScreenSharingOn,\n getDisplayName,\n getIdentifier,\n getDominantSpeakers,\n getOptimalVideoCount,\n getRole,\n getLocalParticipantRaisedHand,\n isHideAttendeeNamesEnabled,\n getLocalParticipantReactionState,\n getSpotlightCallFeature,\n getCapabilities\n ],\n (\n screenShareRemoteParticipantId,\n remoteParticipants,\n localVideoStreams,\n isMuted,\n isScreenSharingOn,\n displayName: string | undefined,\n identifier: string,\n dominantSpeakers,\n optimalVideoCount,\n role,\n raisedHand,\n isHideAttendeeNamesEnabled,\n localParticipantReaction,\n spotlightCallFeature,\n capabilities\n ) => {\n const screenShareRemoteParticipant =\n screenShareRemoteParticipantId && remoteParticipants\n ? remoteParticipants[screenShareRemoteParticipantId]\n : undefined;\n const localVideoStream = localVideoStreams?.find((i) => i.mediaStreamType === 'Video');\n const localScreenSharingStream = localVideoStreams?.find((i) => i.mediaStreamType === 'ScreenSharing');\n const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);\n const dominantSpeakersMap: Record<string, number> = {};\n dominantSpeakerIds?.forEach((speaker, idx) => (dominantSpeakersMap[speaker] = idx));\n const noRemoteParticipants: RemoteParticipantState[] = [];\n const localParticipantReactionState = memoizedConvertToVideoTileReaction(localParticipantReaction);\n const spotlightedParticipantIds = memoizeSpotlightedParticipantIds(spotlightCallFeature?.spotlightedParticipants);\n\n return {\n screenShareParticipant: screenShareRemoteParticipant\n ? convertRemoteParticipantToVideoGalleryRemoteParticipant(\n toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier),\n screenShareRemoteParticipant.isMuted,\n checkIsSpeaking(screenShareRemoteParticipant),\n screenShareRemoteParticipant.videoStreams,\n screenShareRemoteParticipant.state,\n screenShareRemoteParticipant.displayName,\n screenShareRemoteParticipant.raisedHand,\n screenShareRemoteParticipant.contentSharingStream,\n undefined,\n screenShareRemoteParticipant.spotlight,\n /* @conditional-compile-remove(media-access) */\n undefined,\n /* @conditional-compile-remove(media-access) */\n screenShareRemoteParticipant.mediaAccess,\n /* @conditional-compile-remove(media-access) */\n role\n )\n : undefined,\n localParticipant: memoizeLocalParticipant(\n identifier,\n displayName,\n isMuted,\n isScreenSharingOn,\n localVideoStream,\n localScreenSharingStream,\n role,\n raisedHand,\n localParticipantReactionState,\n spotlightCallFeature?.localParticipantSpotlight,\n capabilities\n ),\n remoteParticipants: _videoGalleryRemoteParticipantsMemo(\n _updateUserDisplayNames(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants),\n isHideAttendeeNamesEnabled,\n role\n ),\n dominantSpeakers: dominantSpeakerIds,\n maxRemoteVideoStreams: optimalVideoCount,\n spotlightedParticipants: spotlightedParticipantIds,\n maxParticipantsToSpotlight: spotlightCallFeature?.maxParticipantsToSpotlight\n };\n }\n);\n"]}
|
1
|
+
{"version":3,"file":"videoGallerySelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/videoGallerySelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAQxE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAEL,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,OAAO,EACP,+BAA+B,EAChC,MAAM,iBAAiB,CAAC;AACzB,gDAAgD;AAChD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAA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AgB,EAAE,uBAAuB,CACvC,UAAU,EACV,WAAW,EACX,OAAO,EACP,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,IAAI,EACJ,UAAU,EACV,6BAA6B,EAC7B,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,yBAAyB,EAC/C,YAAY,CACb;QACD,kBAAkB,EAAE,mCAAmC,CACrD,uBAAuB,CAAC,kBAAkB,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,EACtG,0BAA0B,EAC1B,IAAI,CACL;QACD,gBAAgB,EAAE,kBAAkB;QACpC,qBAAqB,EAAE,iBAAiB;QACxC,uBAAuB,EAAE,yBAAyB;QAClD,0BAA0B,EAAE,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,0BAA0B;QAC5E,gDAAgD;QAChD,mBAAmB,EAAE,0BAA0B,CAAC,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,OAAO,CAAC;QACjF,gDAAgD;QAChD,8BAA8B,EAAE,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,gBAAgB;QACzE,gDAAgD;QAChD,oBAAoB,EAAE,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,QAAQ;QACvD,gDAAgD;QAChD,wBAAwB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,iBAAiB,CAAC,SAAS;KACpE,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CallClientState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { VideoGalleryRemoteParticipant, VideoGalleryLocalParticipant } from '@internal/react-components';\n/* @conditional-compile-remove(together-mode) */\nimport {\n VideoGalleryTogetherModeStreams,\n VideoGalleryTogetherModeParticipantPosition\n} from '@internal/react-components';\nimport { createSelector } from 'reselect';\nimport {\n CallingBaseSelectorProps,\n getDisplayName,\n getDominantSpeakers,\n getIdentifier,\n getIsMuted,\n getIsScreenSharingOn,\n getLocalVideoStreams,\n getRole,\n getScreenShareRemoteParticipant\n} from './baseSelectors';\n/* @conditional-compile-remove(together-mode) */\nimport { getTogetherModeCallFeature } from './baseSelectors';\nimport { isHideAttendeeNamesEnabled } from './baseSelectors';\nimport { getOptimalVideoCount } from './baseSelectors';\nimport { _updateUserDisplayNames } from './utils/callUtils';\nimport { checkIsSpeaking } from './utils/SelectorUtils';\nimport {\n _videoGalleryRemoteParticipantsMemo,\n _dominantSpeakersWithFlatId,\n convertRemoteParticipantToVideoGalleryRemoteParticipant,\n memoizeLocalParticipant,\n /* @conditional-compile-remove(together-mode) */ memoizeTogetherModeStreams\n} from './utils/videoGalleryUtils';\nimport { memoizeSpotlightedParticipantIds } from './utils/videoGalleryUtils';\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\nimport { getLocalParticipantReactionState } from './baseSelectors';\nimport { memoizedConvertToVideoTileReaction } from './utils/participantListSelectorUtils';\nimport { getRemoteParticipantsExcludingConsumers } from './getRemoteParticipantsExcludingConsumers';\nimport { getSpotlightCallFeature, getCapabilities } from './baseSelectors';\n\n/**\n * Selector type for {@link VideoGallery} component.\n *\n * @public\n */\nexport type VideoGallerySelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n screenShareParticipant?: VideoGalleryRemoteParticipant;\n localParticipant: VideoGalleryLocalParticipant;\n remoteParticipants: VideoGalleryRemoteParticipant[];\n dominantSpeakers?: string[];\n optimalVideoCount?: number;\n spotlightedParticipants?: string[];\n maxParticipantsToSpotlight?: number;\n /* @conditional-compile-remove(together-mode) */\n isTogetherModeActive?: boolean;\n /* @conditional-compile-remove(together-mode) */\n startTogetherModeEnabled?: boolean;\n /* @conditional-compile-remove(together-mode) */\n togetherModeStreams?: VideoGalleryTogetherModeStreams;\n /* @conditional-compile-remove(together-mode) */\n togetherModeSeatingCoordinates?: VideoGalleryTogetherModeParticipantPosition;\n};\n\n/**\n * Provides data attributes to {@link VideoGallery} component.\n * @public\n */\nexport const videoGallerySelector: VideoGallerySelector = createSelector(\n [\n getScreenShareRemoteParticipant,\n getRemoteParticipantsExcludingConsumers,\n getLocalVideoStreams,\n getIsMuted,\n getIsScreenSharingOn,\n getDisplayName,\n getIdentifier,\n getDominantSpeakers,\n getOptimalVideoCount,\n getRole,\n getLocalParticipantRaisedHand,\n isHideAttendeeNamesEnabled,\n getLocalParticipantReactionState,\n getSpotlightCallFeature,\n getCapabilities,\n /* @conditional-compile-remove(together-mode) */\n getTogetherModeCallFeature\n ],\n (\n screenShareRemoteParticipantId,\n remoteParticipants,\n localVideoStreams,\n isMuted,\n isScreenSharingOn,\n displayName: string | undefined,\n identifier: string,\n dominantSpeakers,\n optimalVideoCount,\n role,\n raisedHand,\n isHideAttendeeNamesEnabled,\n localParticipantReaction,\n spotlightCallFeature,\n capabilities,\n /* @conditional-compile-remove(together-mode) */\n togetherModeCallFeature\n ) => {\n const screenShareRemoteParticipant =\n screenShareRemoteParticipantId && remoteParticipants\n ? remoteParticipants[screenShareRemoteParticipantId]\n : undefined;\n const localVideoStream = localVideoStreams?.find((i) => i.mediaStreamType === 'Video');\n const localScreenSharingStream = localVideoStreams?.find((i) => i.mediaStreamType === 'ScreenSharing');\n const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);\n const dominantSpeakersMap: Record<string, number> = {};\n dominantSpeakerIds?.forEach((speaker, idx) => (dominantSpeakersMap[speaker] = idx));\n const noRemoteParticipants: RemoteParticipantState[] = [];\n const localParticipantReactionState = memoizedConvertToVideoTileReaction(localParticipantReaction);\n const spotlightedParticipantIds = memoizeSpotlightedParticipantIds(spotlightCallFeature?.spotlightedParticipants);\n return {\n screenShareParticipant: screenShareRemoteParticipant\n ? convertRemoteParticipantToVideoGalleryRemoteParticipant(\n toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier),\n screenShareRemoteParticipant.isMuted,\n checkIsSpeaking(screenShareRemoteParticipant),\n screenShareRemoteParticipant.videoStreams,\n screenShareRemoteParticipant.state,\n screenShareRemoteParticipant.displayName,\n screenShareRemoteParticipant.raisedHand,\n screenShareRemoteParticipant.contentSharingStream,\n undefined,\n screenShareRemoteParticipant.spotlight,\n /* @conditional-compile-remove(media-access) */\n undefined,\n /* @conditional-compile-remove(media-access) */\n screenShareRemoteParticipant.mediaAccess,\n /* @conditional-compile-remove(media-access) */\n role\n )\n : undefined,\n localParticipant: memoizeLocalParticipant(\n identifier,\n displayName,\n isMuted,\n isScreenSharingOn,\n localVideoStream,\n localScreenSharingStream,\n role,\n raisedHand,\n localParticipantReactionState,\n spotlightCallFeature?.localParticipantSpotlight,\n capabilities\n ),\n remoteParticipants: _videoGalleryRemoteParticipantsMemo(\n _updateUserDisplayNames(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants),\n isHideAttendeeNamesEnabled,\n role\n ),\n dominantSpeakers: dominantSpeakerIds,\n maxRemoteVideoStreams: optimalVideoCount,\n spotlightedParticipants: spotlightedParticipantIds,\n maxParticipantsToSpotlight: spotlightCallFeature?.maxParticipantsToSpotlight,\n /* @conditional-compile-remove(together-mode) */\n togetherModeStreams: memoizeTogetherModeStreams(togetherModeCallFeature?.streams),\n /* @conditional-compile-remove(together-mode) */\n togetherModeSeatingCoordinates: togetherModeCallFeature?.seatingPositions,\n /* @conditional-compile-remove(together-mode) */\n isTogetherModeActive: togetherModeCallFeature?.isActive,\n /* @conditional-compile-remove(together-mode) */\n startTogetherModeEnabled: capabilities?.startTogetherMode.isPresent\n };\n }\n);\n"]}
|
@@ -405,7 +405,7 @@ export class CallContext {
|
|
405
405
|
if (call) {
|
406
406
|
const stream = call.togetherMode.streams.mainVideoStream;
|
407
407
|
if (stream && (stream === null || stream === void 0 ? void 0 : stream.id) === streamId) {
|
408
|
-
stream.
|
408
|
+
stream.isAvailable = isAvailable;
|
409
409
|
}
|
410
410
|
}
|
411
411
|
});
|