@azure/communication-react 1.22.0-alpha-202412040017 → 1.22.0-alpha-202412100018

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/dist/communication-react.d.ts +145 -12
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DtCoVNyP.js → ChatMessageComponentAsRichTextEditBox-Bpez2mhK.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-DtCoVNyP.js.map → ChatMessageComponentAsRichTextEditBox-Bpez2mhK.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-7qJEM1bW.js → RichTextSendBoxWrapper-CrmMCuXY.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-7qJEM1bW.js.map → RichTextSendBoxWrapper-CrmMCuXY.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-BO9Ei_hI.js → index-DIxf34Zj.js} +231 -102
  7. package/dist/dist-cjs/communication-react/index-DIxf34Zj.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +2 -1
  9. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  11. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +5 -0
  13. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +8 -0
  14. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  15. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +6 -6
  16. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +2 -2
  17. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
  18. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +48 -8
  19. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +20 -20
  20. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  21. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.d.ts +2 -2
  22. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +4 -1
  23. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  24. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +2 -2
  25. package/dist/dist-esm/calling-component-bindings/src/index.js +1 -1
  26. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  27. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +45 -3
  28. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
  29. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +1 -1
  30. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +11 -5
  31. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  32. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +7 -1
  33. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  34. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +5 -1
  35. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  36. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -1
  37. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +15 -0
  38. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.d.ts +1 -0
  40. package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js +62 -0
  41. package/dist/dist-esm/calling-stateful-client/src/CapabilitiesSubscriber.js.map +1 -1
  42. package/dist/dist-esm/calling-stateful-client/src/MediaAccessSubscriber.d.ts +1 -0
  43. package/dist/dist-esm/calling-stateful-client/src/MediaAccessSubscriber.js +7 -4
  44. package/dist/dist-esm/calling-stateful-client/src/MediaAccessSubscriber.js.map +1 -1
  45. package/dist/dist-esm/communication-react/src/index.d.ts +2 -0
  46. package/dist/dist-esm/communication-react/src/index.js +1 -0
  47. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  48. package/dist/dist-esm/react-components/src/components/Caption.d.ts +2 -2
  49. package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
  50. package/dist/dist-esm/react-components/src/components/CaptionsBanner.d.ts +42 -11
  51. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js +6 -3
  52. package/dist/dist-esm/react-components/src/components/CaptionsBanner.js.map +1 -1
  53. package/dist/dist-esm/react-components/src/components/NotificationStack.d.ts +4 -0
  54. package/dist/dist-esm/react-components/src/components/NotificationStack.js.map +1 -1
  55. package/dist/dist-esm/react-components/src/components/RealTimeText.js.map +1 -1
  56. package/dist/dist-esm/react-components/src/components/SystemMessage.js +15 -4
  57. package/dist/dist-esm/react-components/src/components/SystemMessage.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +4 -4
  59. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js +4 -2
  61. package/dist/dist-esm/react-components/src/components/styles/CaptionsSettingsModal.styles.js.map +1 -1
  62. package/dist/dist-esm/react-components/src/components/styles/Common.style.d.ts +0 -13
  63. package/dist/dist-esm/react-components/src/components/styles/Common.style.js +0 -13
  64. package/dist/dist-esm/react-components/src/components/styles/Common.style.js.map +1 -1
  65. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +3 -3
  66. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
  67. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +3 -1
  68. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  69. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +3 -0
  70. package/dist/dist-esm/react-components/src/types/TogetherModeTypes.d.ts +7 -31
  71. package/dist/dist-esm/react-components/src/types/TogetherModeTypes.js.map +1 -1
  72. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +3 -1
  73. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  74. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +2 -2
  75. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  76. package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js +1 -13
  77. package/dist/dist-esm/react-composites/src/composites/ChatComposite/styles/Chat.styles.js.map +1 -1
  78. package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.d.ts +1 -1
  79. package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js +8 -3
  80. package/dist/dist-esm/react-composites/src/composites/common/AudioProvider.js.map +1 -1
  81. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.d.ts +1 -1
  82. package/dist/dist-esm/react-composites/src/composites/common/AvatarPersona.js.map +1 -1
  83. package/dist/dist-esm/react-composites/src/composites/common/{CaptionsBanner.d.ts → CallingCaptionsBanner.d.ts} +2 -2
  84. package/dist/dist-esm/react-composites/src/composites/common/{CaptionsBanner.js → CallingCaptionsBanner.js} +7 -10
  85. package/dist/dist-esm/react-composites/src/composites/common/CallingCaptionsBanner.js.map +1 -0
  86. package/package.json +2 -2
  87. package/dist/dist-cjs/communication-react/index-BO9Ei_hI.js.map +0 -1
  88. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.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,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AAS,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","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 { getLatestNotifications, getAssignedBreakoutRoom } 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/**\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) */ 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) */ 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 appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');\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 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"]}
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,MAAM,iBAAiB,CAAC;AAI7D,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAI1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAkBjE;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA8B,cAAc,CAChF;IACE,eAAe;IACf,iDAAiD,CAAC,sBAAsB;IACxE,cAAc;IACd,gBAAgB;IAChB,kBAAkB;IAClB,0BAA0B;IAC1B,iDAAiD,CAAC,uBAAuB;CAC1E,EACD,CACE,YAAwB;AACxB,iDAAiD,CAAC,+CAA+C,CAAC,mBAAmB,EACrH,WAAW,EACX,aAAa,EACb,eAAe,EACf,iBAAiB;AACjB,iDAAiD,CAAC,oBAAoB,EACoB,EAAE;;IAC5F,sHAAsH;IACtH,8CAA8C;IAC9C,wEAAwE;IACxE,iCAAiC;IACjC,EAAE;IACF,iHAAiH;IACjH,8BAA8B;IAC9B,MAAM,mBAAmB,GAAyB,EAAE,CAAC;IAErD,MAAM,QAAQ,GAAG,GAAY,EAAE;QAC7B,OAAO,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,WAAW,CAAC,OAAO,MAAK,QAAQ,CAAC;IAC3D,CAAC,CAAC;IAEF,MAAM,OAAO,GAAG,GAAY,EAAE;QAC5B,OAAO,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CA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AAC,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) */ 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) */ 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 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"]}
@@ -15,7 +15,7 @@ export declare const _videoGalleryRemoteParticipantsMemo: _VideoGalleryRemotePar
15
15
  /** @private */
16
16
  export declare const convertRemoteParticipantToVideoGalleryRemoteParticipant: (userId: string, isMuted: boolean, isSpeaking: boolean, videoStreams: {
17
17
  [key: number]: RemoteVideoStreamState;
18
- }, state: ParticipantConnectionState, displayName?: string, raisedHand?: RaisedHandState, contentSharingStream?: HTMLElement, reaction?: Reaction, spotlight?: Spotlight, signalStrength?: number, mediaAccess?: undefined | /* @conditional-compile-remove(media-access) */ MediaAccess) => VideoGalleryRemoteParticipant;
18
+ }, state: ParticipantConnectionState, displayName?: string, raisedHand?: RaisedHandState, contentSharingStream?: HTMLElement, reaction?: Reaction, spotlight?: Spotlight, signalStrength?: number, mediaAccess?: undefined | /* @conditional-compile-remove(media-access) */ MediaAccess, role?: undefined | /* @conditional-compile-remove(media-access) */ ParticipantRole) => VideoGalleryRemoteParticipant;
19
19
  /** @private */
20
20
  export declare const memoizeLocalParticipant: (this: any, identifier: any, displayName: any, isMuted: any, isScreenSharingOn: any, localVideoStream: any, localScreenSharingStream: any, role: any, raisedHand: any, reaction: any, localSpotlight: any, capabilities: any) => {
21
21
  userId: any;
@@ -37,23 +37,27 @@ export const _videoGalleryRemoteParticipantsMemo = (remoteParticipants, isHideAt
37
37
  /* @conditional-compile-remove(remote-ufd) */
38
38
  Math.max(((_c = (_b = (_a = participant.diagnostics) === null || _a === void 0 ? void 0 : _a.networkReceiveQuality) === null || _b === void 0 ? void 0 : _b.value) !== null && _c !== void 0 ? _c : 0), ((_f = (_e = (_d = participant.diagnostics) === null || _d === void 0 ? void 0 : _d.networkSendQuality) === null || _e === void 0 ? void 0 : _e.value) !== null && _f !== void 0 ? _f : 0)),
39
39
  /* @conditional-compile-remove(media-access) */
40
- participant.mediaAccess);
40
+ participant.mediaAccess,
41
+ /* @conditional-compile-remove(media-access) */
42
+ participant.role);
41
43
  }));
42
44
  });
43
45
  };
44
46
  const memoizedAllConvertRemoteParticipant = memoizeFnAll((userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, spotlight,
45
47
  /* @conditional-compile-remove(remote-ufd) */
46
- signalStrength, mediaAccess) => {
48
+ signalStrength, mediaAccess, role) => {
47
49
  return convertRemoteParticipantToVideoGalleryRemoteParticipant(userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, spotlight,
48
50
  /* @conditional-compile-remove(remote-ufd) */
49
51
  signalStrength,
50
52
  /* @conditional-compile-remove(media-access) */
51
- mediaAccess);
53
+ mediaAccess,
54
+ /* @conditional-compile-remove(media-access) */
55
+ role);
52
56
  });
53
57
  /** @private */
54
58
  export const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, spotlight,
55
59
  /* @conditional-compile-remove(remote-ufd) */
56
- signalStrength, mediaAccess) => {
60
+ signalStrength, mediaAccess, role) => {
57
61
  const rawVideoStreamsArray = Object.values(videoStreams);
58
62
  let videoStream = undefined;
59
63
  let screenShareStream = undefined;
@@ -92,7 +96,9 @@ signalStrength, mediaAccess) => {
92
96
  /* @conditional-compile-remove(remote-ufd) */
93
97
  signalStrength,
94
98
  /* @conditional-compile-remove(media-access) */
95
- mediaAccess
99
+ mediaAccess,
100
+ /* @conditional-compile-remove(media-access) */
101
+ role
96
102
  };
97
103
  };
98
104
  const convertRemoteVideoStreamToVideoGalleryStream = (stream) => {
@@ -1 +1 @@
1
- {"version":3,"file":"videoGalleryUtils.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/utils/videoGalle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,EACd,YAAY,EACZ,EAAE;;IAAC,OAAA,CAAC;QACJ,MAAM,EAAE,UAAU;QAClB,WAAW,EAAE,WAAW,aAAX,WAAW,cAAX,WAAW,GAAI,EAAE;QAC9B,OAAO,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,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC,SAAS;YACnD,gBAAgB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,CAAC,SAAS;SACtD;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(remote-ufd) */\n Math.max(\n (participant.diagnostics?.networkReceiveQuality?.value ?? 0) as number,\n (participant.diagnostics?.networkSendQuality?.value ?? 0) as number\n ),\n /* @conditional-compile-remove(media-access) */\n participant.mediaAccess\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 /* @conditional-compile-remove(remote-ufd) */\n signalStrength?: number,\n mediaAccess?: undefined | /* @conditional-compile-remove(media-access) */ MediaAccess\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 /* @conditional-compile-remove(remote-ufd) */\n signalStrength,\n /* @conditional-compile-remove(media-access) */\n mediaAccess\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 /* @conditional-compile-remove(remote-ufd) */\n signalStrength?: number,\n mediaAccess?: undefined | /* @conditional-compile-remove(media-access) */ MediaAccess\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(remote-ufd) */\n signalStrength,\n /* @conditional-compile-remove(media-access) */\n mediaAccess\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.isPresent,\n isVideoPermitted: capabilities?.turnVideoOn.isPresent\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"],"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,EA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,WAAW,GAAI,EAAE;QAC9B,OAAO,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,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC,SAAS;YACnD,gBAAgB,EAAE,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,WAAW,CAAC,SAAS;SACtD;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(remote-ufd) */\n Math.max(\n (participant.diagnostics?.networkReceiveQuality?.value ?? 0) as number,\n (participant.diagnostics?.networkSendQuality?.value ?? 0) as number\n ),\n /* @conditional-compile-remove(media-access) */\n participant.mediaAccess,\n /* @conditional-compile-remove(media-access) */\n participant.role\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 /* @conditional-compile-remove(remote-ufd) */\n signalStrength?: number,\n mediaAccess?: undefined | /* @conditional-compile-remove(media-access) */ MediaAccess,\n role?: undefined | /* @conditional-compile-remove(media-access) */ ParticipantRole\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 /* @conditional-compile-remove(remote-ufd) */\n signalStrength,\n /* @conditional-compile-remove(media-access) */\n mediaAccess,\n /* @conditional-compile-remove(media-access) */\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 /* @conditional-compile-remove(remote-ufd) */\n signalStrength?: 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(remote-ufd) */\n signalStrength,\n /* @conditional-compile-remove(media-access) */\n mediaAccess,\n /* @conditional-compile-remove(media-access) */\n role\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.isPresent,\n isVideoPermitted: capabilities?.turnVideoOn.isPresent\n }\n })\n);\n\n/** @private */\nexport const memoizeSpotlightedParticipantIds = memoizeOne((spotlightedParticipants) =>\n spotlightedParticipants?.map((p: SpotlightedParticipant) => toFlatCommunicationIdentifier(p.identifier))\n);\n"]}
@@ -48,7 +48,13 @@ export const videoGallerySelector = createSelector([
48
48
  const spotlightedParticipantIds = memoizeSpotlightedParticipantIds(spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.spotlightedParticipants);
49
49
  return {
50
50
  screenShareParticipant: screenShareRemoteParticipant
51
- ? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName, screenShareRemoteParticipant.raisedHand, screenShareRemoteParticipant.contentSharingStream, undefined, screenShareRemoteParticipant.spotlight)
51
+ ? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName, screenShareRemoteParticipant.raisedHand, screenShareRemoteParticipant.contentSharingStream, undefined, screenShareRemoteParticipant.spotlight,
52
+ /* @conditional-compile-remove(media-access) */
53
+ undefined,
54
+ /* @conditional-compile-remove(media-access) */
55
+ screenShareRemoteParticipant.mediaAccess,
56
+ /* @conditional-compile-remove(media-access) */
57
+ role)
52
58
  : undefined,
53
59
  localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, localScreenSharingStream, role, raisedHand, localParticipantReactionState, spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.localParticipantSpotlight, capabilities),
54
60
  remoteParticipants: _videoGalleryRemoteParticipantsMemo(_updateUserDisplayNames(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants), isHideAttendeeNamesEnabled, role),
@@ -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,E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AAC,CAAC,SAAS;QACb,gBAAgB,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;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 )\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;AAGxE,OAAO,EAAE,cAAc,EAAE,MAAM,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xC,4BAA4B,CAAC,UAAU,EACvC,4BAA4B,CAAC,oBAAoB,EACjD,SAAS,EACT,4BAA4B,CAAC,SAAS;YACtC,+CAA+C;YAC/C,SAAS;YACT,+CAA+C;YAC/C,4BAA4B,CAAC,WAAW;YACxC,+CAA+C;YAC/C,IAAI,CACL;YACH,CAAC,CAAC,SAAS;QACb,gBAAgB,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;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"]}
@@ -684,6 +684,10 @@ export interface CallState {
684
684
  * Proxy of {@link @azure/communication-calling#BreakoutRoomsFeature}.
685
685
  */
686
686
  breakoutRooms?: BreakoutRoomsState;
687
+ /**
688
+ * Proxy of {@link @azure/communication-calling#MediaAccessFeature}.
689
+ */
690
+ mediaAccess?: MediaAccessState;
687
691
  }
688
692
  /**
689
693
  * Transfer feature state
@@ -993,7 +997,7 @@ export interface CallNotification {
993
997
  timestamp: Date;
994
998
  }
995
999
  /** @public */
996
- export type NotificationTarget = 'assignedBreakoutRoomOpened' | 'assignedBreakoutRoomOpenedPromptJoin' | 'assignedBreakoutRoomChanged' | 'breakoutRoomJoined' | 'breakoutRoomClosingSoon';
1000
+ export type NotificationTarget = 'assignedBreakoutRoomOpened' | 'assignedBreakoutRoomOpenedPromptJoin' | 'assignedBreakoutRoomChanged' | 'breakoutRoomJoined' | 'breakoutRoomClosingSoon' | /* @conditional-compile-remove(media-access) */ 'capabilityTurnVideoOnPresent' | /* @conditional-compile-remove(media-access) */ 'capabilityTurnVideoOnAbsent' | /* @conditional-compile-remove(media-access) */ 'capabilityUnmuteMicPresent' | /* @conditional-compile-remove(media-access) */ 'capabilityUnmuteMicAbsent';
997
1001
  /**
998
1002
  * State only proxy for {@link @azure/communication-calling#DiagnosticsCallFeature}.
999
1003
  *
@@ -1 +1 @@
1
- {"version":3,"file":"CallClientState.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/CallClientState.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAwgClC;;;;GAIG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK;IAclC,YAAY,MAAuB,EAAE,UAAiB,EAAE,SAAgB;QACtE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,8EAA8E;QAC9E,IAAI,CAAC,SAAS,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IAC9D,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n AudioDeviceInfo,\n CallDirection,\n CallEndReason,\n CallerInfo,\n CallState as CallStatus,\n DeviceAccess,\n DominantSpeakersInfo,\n IncomingCallKind,\n LatestMediaDiagnostics,\n LatestNetworkDiagnostics,\n MediaStreamType,\n ParticipantRole,\n RemoteParticipantState as RemoteParticipantStatus,\n ScalingMode,\n VideoDeviceInfo\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { BreakoutRoom, BreakoutRoomsSettings } from '@azure/communication-calling';\n/* @conditional-compile-remove(remote-ufd) */\nimport type {\n ServerDiagnosticType,\n MediaDiagnosticType,\n NetworkDiagnosticType,\n DiagnosticValueType,\n DiagnosticQuality,\n DiagnosticFlag\n} from '@azure/communication-calling';\nimport { TeamsCallInfo } from '@azure/communication-calling';\nimport { CallInfo } from '@azure/communication-calling';\nimport { CapabilitiesChangeInfo, ParticipantCapabilities } from '@azure/communication-calling';\nimport { CaptionsResultType } from '@azure/communication-calling';\nimport { CaptionsKind } from '@azure/communication-calling';\nimport { VideoEffectName } from '@azure/communication-calling';\nimport { CallKind } from '@azure/communication-calling';\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\nimport { ReactionMessage } from '@azure/communication-calling';\nimport { SpotlightedParticipant } from '@azure/communication-calling';\n/* @conditional-compile-remove(local-recording-notification) */\nimport { LocalRecordingInfo, RecordingInfo } from '@azure/communication-calling';\n\n/**\n * State only version of {@link @azure/communication-calling#CallAgent} except calls is moved to be a child directly of\n * {@link CallClientState} and not included here. The reason to have CallAgent's state proxied is to provide access to\n * displayName. We don't flatten CallAgent.displayName and put it in CallClientState because it would be ambiguious that\n * displayName is actually reliant on the creation/existence of CallAgent to be available.\n *\n * @public\n */\nexport interface CallAgentState {\n /**\n * Proxy of {@link @azure/communication-calling#CallAgent.displayName}.\n */\n displayName?: string;\n}\n\n/**\n * @public\n */\nexport interface CaptionsInfo {\n /**\n * The state in which this caption data can be classified.\n */\n resultType: CaptionsResultType;\n /**\n * The information of the call participant who spoke the captioned text.\n */\n speaker: CallerInfo;\n /**\n * The language that the spoken words were interpretted as. Corresponds to the language specified in startCaptions / setSpokenLanguage.\n */\n spokenLanguage: string;\n /**\n * The caption text.\n */\n captionText: string;\n /**\n * Timestamp of when the captioned words were initially spoken.\n */\n timestamp: Date;\n /**\n * The language that the captions are presented in. Corresponds to the captionLanguage specified in startCaptions / setCaptionLanguage.\n */\n captionLanguage?: string;\n /**\n * The original spoken caption text prior to translating to subtitle language\n */\n spokenText?: string;\n}\n\n/**\n * @public\n */\nexport interface CaptionsCallFeatureState {\n /**\n * supported spoken languages\n */\n supportedSpokenLanguages: string[];\n /**\n * array of received captions\n */\n captions: CaptionsInfo[];\n /**\n * whether captions is on/off\n */\n isCaptionsFeatureActive: boolean;\n /**\n * whether start captions button is clicked or now\n */\n startCaptionsInProgress: boolean;\n /**\n * supported caption languages\n */\n supportedCaptionLanguages: string[];\n /**\n * current spoken language\n */\n currentSpokenLanguage: string;\n /**\n * current caption language\n */\n currentCaptionLanguage: string;\n\n /**\n * current caption kind: teams or acs captions\n */\n captionsKind: CaptionsKind;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#TranscriptionCallFeature}. {@link StatefulCallClient} will\n * automatically listen for transcription state of the call and update the state exposed by {@link StatefulCallClient}\n * accordingly.\n *\n * @public\n */\nexport interface TranscriptionCallFeatureState {\n /**\n * Proxy of {@link @azure/communication-calling#TranscriptionCallFeature.isTranscriptionActive}.\n */\n isTranscriptionActive: boolean;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#CapabilitiesFeature}\n *\n * @public\n */\nexport interface CapabilitiesFeatureState {\n /**\n * Proxy of {@link @azure/communication-calling#CapabilitiesFeature.capabilities}.\n */\n capabilities: ParticipantCapabilities;\n /**\n * Proxy of the latest {@link @azure/communication-calling#CapabilitiesChangeInfo}\n */\n latestCapabilitiesChangeInfo: CapabilitiesChangeInfo;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#SpotlightCallFeature}\n *\n * @public\n */\nexport interface SpotlightCallFeatureState {\n /**\n * Ordered array of spotlighted participants in call\n */\n spotlightedParticipants: SpotlightedParticipant[];\n /**\n * Local participant spotlight\n */\n localParticipantSpotlight?: SpotlightState;\n /**\n * Proxy of {@link @azure/communication-calling#SpotlightCallFeature.maxParticipantsToSpotlight}.\n */\n maxParticipantsToSpotlight: number;\n}\n\n/**\n * Spotlight state with order\n *\n * @public\n */\nexport interface SpotlightState {\n /**\n * Order position of spotlight in call\n */\n spotlightedOrderPosition?: number;\n}\n\n/* @conditional-compile-remove(breakout-rooms) */\n/**\n * Breakout rooms state\n *\n * @public\n */\nexport interface BreakoutRoomsState {\n assignedBreakoutRoom?: BreakoutRoom;\n breakoutRoomSettings?: BreakoutRoomsSettings;\n breakoutRoomOriginCallId?: string;\n breakoutRoomDisplayName?: string;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#RecordingCallFeature}. {@link StatefulCallClient} will\n * automatically listen for recording state of the call and update the state exposed by {@link StatefulCallClient} accordingly.\n *\n * @public\n */\nexport interface RecordingCallFeatureState {\n /**\n * Proxy of {@link @azure/communication-calling#RecordingCallFeature.isRecordingActive}.\n */\n isRecordingActive: boolean;\n /* @conditional-compile-remove(local-recording-notification) */\n /**\n * Contains list of information of started recordings\n * Proxy of {@link @azure/communication-calling#RecordingCallFeature.recordings}.\n */\n activeRecordings?: RecordingInfo[];\n /* @conditional-compile-remove(local-recording-notification) */\n /**\n * Contains list of information of stopped recordings\n */\n lastStoppedRecording?: RecordingInfo[];\n}\n\n/* @conditional-compile-remove(local-recording-notification) */\n/**\n * State only version of {@link @azure/communication-calling#LocalRecordingCallFeature}. {@link StatefulCallClient} will\n * automatically listen for local recording state of the call and update the state exposed by {@link StatefulCallClient} accordingly.\n *\n * @beta\n */\nexport interface LocalRecordingCallFeatureState {\n /**\n * Proxy of {@link @azure/communication-calling#LocalRecordingCallFeature.isRecordingActive}.\n */\n isLocalRecordingActive: boolean;\n /**\n * Contains list of information of started recordings\n * Proxy of {@link @azure/communication-calling#LocalRecordingCallFeature.recordings}.\n */\n activeLocalRecordings?: LocalRecordingInfo[];\n /**\n * Contains list of information of stopped recordings\n */\n lastStoppedLocalRecording?: LocalRecordingInfo[];\n}\n\n/**\n * State only version of {@link @azure/communication-calling#RaiseHandCallFeature}. {@link StatefulCallClient} will\n * automatically listen for raised hands on the call and update the state exposed by {@link StatefulCallClient} accordingly.\n *\n * @public\n */\nexport interface RaiseHandCallFeatureState {\n /**\n * Proxy of {@link @azure/communication-calling#RaiseHandCallFeature.raisedHands}.\n */\n raisedHands: RaisedHandState[];\n /**\n * Contains information for local participant from list {@link @azure/communication-calling#RaiseHandCallFeature.raisedHands}.\n */\n localParticipantRaisedHand?: RaisedHandState;\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Represents the name of the call feature stream\n * @beta\n */\nexport type CallFeatureStreamName = 'togetherMode';\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * State only version of {@link @azure/communication-calling#CallFeatureStream}.\n * Represents call feature stream state.\n * @beta\n */\nexport interface CallFeatureStreamState extends RemoteVideoStreamState {\n feature?: CallFeatureStreamName;\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * State only version of {@link @azure/communication-calling#TogetherModeSeatingMap}.\n * @beta\n *\n * Represents the seating position of a participant in Together Mode.\n */\nexport interface TogetherModeSeatingPositionState {\n /* The top left offset from the top of the together mode view.*/\n top: number;\n /* The left offset position from the left of the together mode view. */\n left: number;\n /* The width of the seating area */\n width: number;\n /* The height of the seating area. */\n height: number;\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Represents the seating positions of participants in Together Mode.\n *\n * @beta\n */\nexport type TogetherModeParticipantSeatingState = Record<string, TogetherModeSeatingPositionState>;\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Represents the streams in Together Mode.\n *\n * @beta\n */\nexport interface TogetherModeStreamsState {\n mainVideoStream?: CallFeatureStreamState;\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * State only version of {@link @azure/communication-calling#TogetherModeCallFeature}. {@link StatefulCallClient}.\n * Represents the state of the Together Mode feature.\n * @beta\n */\nexport interface TogetherModeCallFeatureState {\n isActive: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#TogetherModeCallFeature.togetherModeStream}.\n */\n streams: TogetherModeStreamsState;\n /**\n * Proxy of {@link @azure/communication-calling#TogetherModeCallFeature.TogetherModeSeatingMap}.\n */\n seatingPositions: TogetherModeParticipantSeatingState;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#PPTLiveCallFeature}. {@link StatefulCallClient} will\n * automatically listen for pptLive on the call and update the state exposed by {@link StatefulCallClient} accordingly.\n *\n * @public\n */\nexport interface PPTLiveCallFeatureState {\n /**\n * Proxy of {@link @azure/communication-calling#PPTLiveCallFeature.isActive}.\n */\n isActive: boolean;\n}\n/**\n * Raised hand state with order\n *\n * @public\n */\nexport type RaisedHandState = {\n raisedHandOrderPosition: number;\n};\n\n/**\n * State only version of {@link @azure/communication-calling#Call.ReactionMessage} with UI helper props receivedOn.\n * Reaction state with a timestamp which helps UI to decide to render the reaction accordingly.\n *\n * @public\n */\nexport type ReactionState = {\n /**\n * Reaction message from the meeting {@link @azure/communication-calling#Call.ReactionMessage}\n */\n reactionMessage: ReactionMessage;\n /**\n * Received timestamp of the reaction message in a meeting.\n */\n receivedOn: Date;\n};\n\n/**\n * State only version of {@link @azure/communication-calling#LocalVideoStream}.\n *\n * @public\n */\nexport interface LocalVideoStreamState {\n /**\n * Proxy of {@link @azure/communication-calling#LocalVideoStream.source}.\n */\n source: VideoDeviceInfo;\n /**\n * Proxy of {@link @azure/communication-calling#LocalVideoStream.mediaStreamType}.\n */\n mediaStreamType: MediaStreamType;\n /**\n * {@link VideoStreamRendererView} that is managed by createView/disposeView in {@link StatefulCallClient}\n * API. This can be undefined if the stream has not yet been rendered and defined after createView creates the view.\n */\n view?: VideoStreamRendererViewState;\n\n /**\n * Stores the state of the video effects.\n * @public\n */\n videoEffects?: LocalVideoStreamVideoEffectsState;\n}\n\n/**\n * State only version of a LocalVideoStream's {@link @azure/communication-calling#VideoEffectsFeature}.\n *\n * @public\n */\nexport interface LocalVideoStreamVideoEffectsState {\n /**\n * List of effects if any are active.\n */\n activeEffects?: VideoEffectName[];\n}\n\n/**\n * State only version of Optimal Video Count Feature {@link @azure/communication-calling#OptimalVideoCountCallFeature}.\n *\n * @public\n */\nexport interface OptimalVideoCountFeatureState {\n /**\n * State of the current optimal video count.\n */\n maxRemoteVideoStreams: number;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#RemoteVideoStream}.\n *\n * @public\n */\nexport interface RemoteVideoStreamState {\n /**\n * Proxy of {@link @azure/communication-calling#RemoteVideoStream.id}.\n */\n id: number;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteVideoStream.mediaStreamType}.\n */\n mediaStreamType: MediaStreamType;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteVideoStream.isAvailable}.\n */\n isAvailable: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteVideoStream.isReceiving}.\n * @public\n */\n isReceiving: boolean;\n /**\n * {@link VideoStreamRendererView} that is managed by createView/disposeView in {@link StatefulCallClient}\n * API. This can be undefined if the stream has not yet been rendered and defined after createView creates the view.\n */\n view?: VideoStreamRendererViewState;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteVideoStream.size}.\n */\n streamSize?: { width: number; height: number };\n}\n\n/**\n * State only version of {@link @azure/communication-calling#VideoStreamRendererView}. This property is added to the state exposed\n * by {@link StatefulCallClient} by {@link StatefulCallClient.createView} and removed by {@link StatefulCallClient.disposeView}.\n *\n * @public\n */\nexport interface VideoStreamRendererViewState {\n /**\n * Proxy of {@link @azure/communication-calling#VideoStreamRendererView.scalingMode}.\n */\n scalingMode: ScalingMode;\n /**\n * Proxy of {@link @azure/communication-calling#VideoStreamRendererView.isMirrored}.\n */\n isMirrored: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#VideoStreamRendererView.target}.\n */\n target: HTMLElement;\n}\n\n/* @conditional-compile-remove(media-access) */\n/**\n * Media access state\n * @alpha\n */\nexport interface MediaAccessState {\n /**\n * Whether the audio is forcibly muted\n */\n isAudioPermitted: boolean;\n /**\n * Whether the video is forcibly muted\n */\n isVideoPermitted: boolean;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#RemoteParticipant}. {@link StatefulCallClient} will\n * automatically retrieve RemoteParticipants and add their state to the state exposed by {@link StatefulCallClient}.\n *\n * @public\n */\nexport interface RemoteParticipantState {\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.identifier}.\n */\n identifier: CommunicationIdentifierKind;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.displayName}.\n */\n displayName?: string;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.state}.\n */\n state: RemoteParticipantStatus;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.callEndReason}.\n */\n callEndReason?: CallEndReason;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.videoStreams} as an object with\n * {@link RemoteVideoStream} fields keyed by {@link @azure/communication-calling#RemoteVideoStream.id}.\n */\n videoStreams: { [key: number]: RemoteVideoStreamState };\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.isMuted}.\n */\n isMuted: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.isSpeaking}.\n */\n isSpeaking: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.role}.\n */\n role?: ParticipantRole;\n /**\n * Proxy of {@link @azure/communication-calling#Call.RaisedHand.raisedHands}.\n */\n raisedHand?: RaisedHandState;\n /**\n * Proxy of {@link @azure/communication-calling#Call.PPTLive.target}.\n *\n * @public\n */\n contentSharingStream?: HTMLElement;\n /**\n * Proxy of {@link @azure/communication-calling#Call.ReactionMessage} with\n * UI helper props receivedOn which indicates the timestamp when the message was received.\n *\n * @public\n */\n reactionState?: ReactionState;\n /**\n * Proxy of {@link @azure/communication-calling#SpotlightCallFeature.spotlightedParticipants}.\n */\n spotlight?: SpotlightState;\n /* @conditional-compile-remove(media-access) */\n /**\n * Proxy of {@link @azure/communication-calling#Call.MediaAccessCallFeature.MediaAccess}.\n */\n mediaAccess?: MediaAccessState;\n /* @conditional-compile-remove(remote-ufd) */\n /**\n * The diagnostic status of RemoteParticipant{@link @azure/communication-calling#RemoteDiagnostics}.\n */\n diagnostics?: Partial<Record<RemoteDiagnosticType, RemoteDiagnosticState>>;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#Call}. {@link StatefulCallClient} will automatically\n * retrieve Call's state and add it to the state exposed by {@link StatefulCallClient}.\n *\n * @public\n */\nexport interface CallState {\n /**\n * Proxy of {@link @azure/communication-calling#Call.id}.\n */\n id: string;\n\n /**\n * Type of the call.\n */\n kind: CallKind;\n /**\n * Proxy of {@link @azure/communication-calling#Call.callerInfo}.\n */\n callerInfo: CallerInfo;\n /**\n * Proxy of {@link @azure/communication-calling#Call.state}.\n */\n state: CallStatus;\n /**\n * Proxy of {@link @azure/communication-calling#Call.callEndReason}.\n */\n callEndReason?: CallEndReason;\n /**\n * Proxy of {@link @azure/communication-calling#Call.direction}.\n */\n direction: CallDirection;\n /**\n * Proxy of {@link @azure/communication-calling#Call.isMuted}.\n */\n isMuted: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#Call.isScreenSharingOn}.\n */\n isScreenSharingOn: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#DominantSpeakersInfo }.\n */\n dominantSpeakers?: DominantSpeakersInfo;\n /**\n * Proxy of {@link @azure/communication-calling#Call.localVideoStreams}.\n */\n localVideoStreams: LocalVideoStreamState[];\n /**\n * Proxy of {@link @azure/communication-calling#Call.remoteParticipants}.\n * Object with {@link RemoteParticipant} fields keyed by flattened {@link RemoteParticipantState.identifier}.\n * To obtain a flattened {@link RemoteParticipantState.identifier}, use\n * {@link @azure/communication-react#toFlatCommunicationIdentifier}.\n */\n remoteParticipants: { [keys: string]: RemoteParticipantState };\n /**\n * Stores remote participants that have left the call so that the callEndReason could be retrieved.\n * Object with {@link RemoteParticipant} fields keyed by flattened {@link RemoteParticipantState.identifier}.\n * To obtain a flattened {@link RemoteParticipantState.identifier}, use\n * {@link @azure/communication-react#toFlatCommunicationIdentifier}.\n */\n remoteParticipantsEnded: { [keys: string]: RemoteParticipantState };\n /**\n * Proxy of {@link @azure/communication-calling#TranscriptionCallFeature}.\n */\n transcription: TranscriptionCallFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#TranscriptionCallFeature}.\n */\n captionsFeature: CaptionsCallFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#OptimalVideoCountCallFeature}.\n */\n optimalVideoCount: OptimalVideoCountFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#RecordingCallFeature}.\n */\n recording: RecordingCallFeatureState;\n /* @conditional-compile-remove(local-recording-notification) */\n /**\n * Proxy of {@link @azure/communication-calling#LocalRecordingCallFeature}.\n */\n localRecording: LocalRecordingCallFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#PPTLiveCallFeature}.\n *\n *@public\n */\n pptLive: PPTLiveCallFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#RaiseHandCallFeature}.\n */\n raiseHand: RaiseHandCallFeatureState;\n /* @conditional-compile-remove(together-mode) */\n /**\n * Proxy of {@link @azure/communication-calling#TogetherModeCallFeature}.\n * @beta\n */\n togetherMode: TogetherModeCallFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#Call.ReactionMessage} with\n * UI helper props receivedOn which indicates the timestamp when the message was received.\n *\n * @public\n */\n localParticipantReaction?: ReactionState;\n /**\n * Stores the currently active screenshare participant's key. If there is no screenshare active, then this will be\n * undefined. You can use this key to access the remoteParticipant data in {@link CallState.remoteParticipants} object.\n *\n * Note this only applies to ScreenShare in RemoteParticipant. A local ScreenShare being active will not affect this\n * property.\n *\n * This property is added by the stateful layer and is not a proxy of SDK state\n */\n screenShareRemoteParticipant?: string;\n /**\n * Stores the currently active pptlive participant's key. Will be reused by White board etc. If there is no screenshare active, then this will be\n * undefined. You can use this key to access the remoteParticipant data in {@link CallState.remoteParticipants} object.\n *\n * Note this only applies to PPTLive in RemoteParticipant.\n *\n * This property is added by the stateful layer and is not a proxy of SDK state\n *\n * @public\n */\n contentSharingRemoteParticipant?: string;\n /**\n * Stores the local date when the call started on the client. This property is added by the stateful layer and is not\n * a proxy of SDK state.\n */\n startTime: Date;\n /**\n * Stores the local date when the call ended on the client. This property is added by the stateful layer and is not\n * a proxy of SDK state.\n */\n endTime: Date | undefined;\n\n /**\n * Stores the latest call diagnostics.\n */\n diagnostics: DiagnosticsCallFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#Call.role}.\n */\n role?: ParticipantRole;\n\n /* @conditional-compile-remove(total-participant-count) */\n /**\n * Proxy of {@link @azure/communication-calling#Call.totalParticipantCount}.\n */\n totalParticipantCount?: number;\n /**\n * Transfer state of call\n */\n transfer: TransferFeatureState;\n\n /**\n * Proxy of {@link @azure/communication-calling#CapabilitiesFeature}.\n */\n capabilitiesFeature?: CapabilitiesFeatureState;\n /**\n * Hide attendee names in teams meeting\n */\n hideAttendeeNames?: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#SpotlightCallFeature}.\n */\n spotlight?: SpotlightCallFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#Call.info}.\n */\n info?: TeamsCallInfo | /* @conditional-compile-remove(calling-beta-sdk) */ CallInfo;\n\n /**\n * Proxy of {@link @azure/communication-calling#TeamsMeetingAudioConferencingCallFeature}.\n */\n meetingConference?: { conferencePhones: ConferencePhoneInfo[] };\n\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Proxy of {@link @azure/communication-calling#BreakoutRoomsFeature}.\n */\n breakoutRooms?: BreakoutRoomsState;\n}\n\n/**\n * Transfer feature state\n *\n * @public\n */\nexport interface TransferFeatureState {\n /**\n * Accepted transfer requests\n */\n acceptedTransfers: { [key: string]: AcceptedTransfer };\n}\n\n/**\n * Transfer feature state\n *\n * @public\n */\nexport interface AcceptedTransfer {\n /**\n * Stores call id of accepted transfer\n */\n callId: string;\n /**\n * Stores timestamp when transfer was accepted\n */\n timestamp: Date;\n}\n\n/**\n * State to track the types {@link CallInfo} and {@link TeamsCallInfo}\n * @public\n */\nexport interface CallInfoState {\n /**\n * GroupId of the call that you joined\n */\n groupId?: string;\n /**\n * The teams meeting thread id\n */\n threadId?: string;\n /**\n * participant id of the local user\n */\n participantId: string;\n /**\n * Differentiator between the Call and TeamsCall types\n */\n kind: IncomingCallKind;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#IncomingCall}. {@link StatefulCallClient} will\n * automatically detect incoming calls and add their state to the state exposed by {@link StatefulCallClient}.\n *\n * @public\n */\nexport interface IncomingCallState {\n /**\n * Proxy of {@link @azure/communication-calling#IncomingCall.id}.\n */\n id: string;\n /**\n * Proxy of {@link @azure/communication-calling#IncomingCall.callInfo}.\n */\n info: CallInfoState;\n /**\n * Proxy of {@link @azure/communication-calling#IncomingCall.callerInfo}.\n */\n callerInfo: CallerInfo;\n /**\n * Set to the state returned by 'callEnded' event on {@link @azure/communication-calling#IncomingCall} when received.\n * This property is added by the stateful layer and is not a proxy of SDK state.\n */\n callEndReason?: CallEndReason;\n /**\n * Stores the local date when the call started on the client. This property is added by the stateful layer and is not\n * a proxy of SDK state.\n */\n startTime: Date;\n /**\n * Stores the local date when the call ended on the client. This property is added by the stateful layer and is not a\n * proxy of SDK state. It is undefined if the call is not ended yet.\n */\n endTime?: Date;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#TeamsIncomingCall}\n * @public\n */\nexport interface TeamsIncomingCallState {\n /**\n * Proxy of {@link @azure/communication-calling#TeamsIncomingCall.id}.\n */\n id: string;\n /**\n * Proxy of {@link @azure/communication-calling#TeamsIncomingCall.teamsCallInfo}.\n */\n info: CallInfoState;\n /**\n * Proxy of {@link @azure/communication-calling#TeamsIncomingCall.callerInfo}.\n */\n callerInfo: CallerInfo;\n /**\n * Set to the state returned by 'callEnded' event on {@link @azure/communication-calling#IncomingCall} when received.\n * This property is added by the stateful layer and is not a proxy of SDK state.\n */\n callEndReason?: CallEndReason;\n /**\n * Stores the local date when the call started on the client. This property is added by the stateful layer and is not\n * a proxy of SDK state.\n */\n startTime: Date;\n /**\n * Stores the local date when the call ended on the client. This property is added by the stateful layer and is not a\n * proxy of SDK state. It is undefined if the call is not ended yet.\n */\n endTime?: Date;\n}\n\n/**\n * This type is meant to encapsulate all the state inside {@link @azure/communication-calling#DeviceManager}. For\n * optional parameters they may not be available until permission is granted by the user. The cameras, microphones,\n * speakers, and deviceAccess states will be empty until the corresponding\n * {@link @azure/communication-calling#DeviceManager}'s getCameras, getMicrophones, getSpeakers, and askDevicePermission\n * APIs are called and completed.\n *\n * @public\n */\nexport type DeviceManagerState = {\n /**\n * Proxy of {@link @azure/communication-calling#DeviceManager.isSpeakerSelectionAvailable}.\n */\n isSpeakerSelectionAvailable: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#DeviceManager.selectedMicrophone}.\n */\n selectedMicrophone?: AudioDeviceInfo;\n /**\n * Proxy of {@link @azure/communication-calling#DeviceManager.selectedSpeaker}.\n */\n selectedSpeaker?: AudioDeviceInfo;\n /**\n * Stores the selected camera device info. This is added by the stateful layer and does not exist in the Calling SDK.\n * It is meant as a convenience to the developer. It must be explicitly set before it has any value and does not\n * persist across instances of the {@link StatefulCallClient}. The developer controls entirely what this value holds\n * at any time.\n */\n selectedCamera?: VideoDeviceInfo;\n /**\n * Stores any cameras data returned from {@link @azure/communication-calling#DeviceManager.getCameras}.\n */\n cameras: VideoDeviceInfo[];\n /**\n * Stores any microphones data returned from {@link @azure/communication-calling#DeviceManager.getMicrophones}.\n */\n microphones: AudioDeviceInfo[];\n /**\n * Stores any speakers data returned from {@link @azure/communication-calling#DeviceManager.getSpeakers}.\n */\n speakers: AudioDeviceInfo[];\n /**\n * Stores deviceAccess data returned from {@link @azure/communication-calling#DeviceManager.askDevicePermission}.\n */\n deviceAccess?: DeviceAccess;\n /**\n * Stores created views that are not associated with any CallState (when {@link StatefulCallClient.createView} is\n * called with undefined callId, undefined participantId, and defined LocalVideoStream).\n *\n * The values in this array are generated internally when {@link StatefulCallClient.createView} is called and are\n * considered immutable.\n */\n unparentedViews: LocalVideoStreamState[];\n};\n\n/**\n * Container for all of the state data proxied by {@link StatefulCallClient}. The calls, callsEnded, incomingCalls, and\n * incomingCallsEnded states will be automatically provided if a callAgent has been created. The deviceManager will be\n * empty initially until populated see {@link DeviceManagerState}. The userId state is provided as a convenience for the\n * developer and is completely controled and set by the developer.\n *\n * @public\n */\nexport interface CallClientState {\n /**\n * Proxy of {@link @azure/communication-calling#CallAgent.calls} as an object with CallState {@link CallState} fields.\n * It is keyed by {@link @azure/communication-calling#Call.id}. Please note that\n * {@link @azure/communication-calling#Call.id} could change. You should not cache the id itself but the entire\n * {@link @azure/communication-calling#Call} and then use the id contained to look up data in this map.\n */\n calls: { [key: string]: CallState };\n /**\n * Calls that have ended are stored here so the callEndReason could be checked.\n * It is an object with {@link @azure/communication-calling#Call.id} keys and {@link CallState} values.\n *\n * Only {@link MAX_CALL_HISTORY_LENGTH} Calls are kept in the history. Oldest calls are evicted if required.\n */\n callsEnded: { [key: string]: CallState };\n /**\n * Proxy of {@link @azure/communication-calling#IncomingCall} as an object with {@link IncomingCall} fields.\n * It is keyed by {@link @azure/communication-calling#IncomingCall.id}.\n */\n incomingCalls: {\n [key: string]: IncomingCallState | TeamsIncomingCallState;\n };\n /**\n * Incoming Calls that have ended are stored here so the callEndReason could be checked.\n * It is an as an object with {@link @azure/communication-calling#Call.id} keys and {@link IncomingCall} values.\n *\n * Only {@link MAX_CALL_HISTORY_LENGTH} Calls are kept in the history. Oldest calls are evicted if required.\n */\n incomingCallsEnded: {\n [key: string]: IncomingCallState | TeamsIncomingCallState;\n };\n /**\n * Proxy of {@link @azure/communication-calling#DeviceManager}. Please review {@link DeviceManagerState}.\n */\n deviceManager: DeviceManagerState;\n /**\n * Proxy of {@link @azure/communication-calling#CallAgent}. Please review {@link CallAgentState}.\n */\n callAgent?: CallAgentState;\n /**\n * Stores a userId. This is not used by the {@link StatefulCallClient} and is provided here as a convenience for the\n * developer for easier access to userId. Must be passed in at initialization of the {@link StatefulCallClient}.\n * Completely controlled by the developer.\n */\n userId: CommunicationIdentifierKind;\n /**\n * Stores the latest error for each API method.\n *\n * See documentation of {@Link CallErrors} for details.\n */\n latestErrors: CallErrors;\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Stores the latest notifications.\n *\n * See documentation of {@Link CallNotifications} for details.\n */\n latestNotifications: CallNotifications;\n /**\n * A phone number in E.164 format that will be used to represent callers identity.\n * For example, using the alternateCallerId to add a participant using PSTN, this number will\n * be used as the caller id in the PSTN call.\n */\n alternateCallerId?: string;\n /**\n * state to track the environment that the stateful client was made in is supported\n */\n environmentInfo?: EnvironmentInfo;\n}\n\n/**\n * Errors teed from API calls to the Calling SDK.\n *\n * Each property in the object stores the latest error for a particular SDK API method.\n *\n * Errors from this object can be cleared using the {@link newClearCallErrorsModifier}.\n * Additionally, errors are automatically cleared when:\n * - The state is cleared.\n * - Subsequent calls to related API methods succeed.\n * See documentation of individual stateful client methods for details on when errors may be automatically cleared.\n *\n * @public\n */\nexport type CallErrors = {\n [target in CallErrorTarget]: CallError;\n};\n\n/**\n * Error thrown from failed stateful API methods.\n *\n * @public\n */\nexport class CallError extends Error {\n /**\n * The API method target that failed.\n */\n public target: CallErrorTarget;\n /**\n * Error thrown by the failed SDK method.\n */\n public innerError: Error;\n /**\n * Timestamp added to the error by the stateful layer.\n */\n public timestamp: Date;\n\n constructor(target: CallErrorTarget, innerError: Error, timestamp?: Date) {\n super();\n this.target = target;\n this.innerError = innerError;\n // Testing note: It is easier to mock Date::now() than the Date() constructor.\n this.timestamp = timestamp ?? new Date(Date.now());\n this.name = 'CallError';\n this.message = `${this.target}: ${this.innerError.message}`;\n }\n}\n\n/**\n * String literal type for all permissible keys in {@Link CallErrors}.\n *\n * @public\n */\nexport type CallErrorTarget =\n | 'Call.addParticipant'\n | 'Call.dispose'\n | 'Call.feature'\n | 'Call.hangUp'\n | 'Call.hold'\n | 'Call.mute'\n | 'Call.muteIncomingAudio'\n | 'Call.off'\n | 'Call.on'\n | 'Call.removeParticipant'\n | 'Call.resume'\n | 'Call.sendDtmf'\n | 'Call.startAudio'\n | 'Call.startScreenSharing'\n | 'Call.startVideo'\n | 'Call.stopScreenSharing'\n | 'Call.stopAudio'\n | 'Call.stopVideo'\n | 'Call.unmute'\n | 'Call.unmuteIncomingAudio'\n | 'CallAgent.dispose'\n | 'CallAgent.feature'\n | 'CallAgent.join'\n | 'CallAgent.off'\n | 'CallAgent.on'\n | 'CallAgent.startCall'\n | 'CallClient.createCallAgent'\n | 'CallClient.createTeamsCallAgent'\n | 'CallClient.feature'\n | 'CallClient.getDeviceManager'\n | 'CallClient.getEnvironmentInfo'\n | 'DeviceManager.askDevicePermission'\n | 'DeviceManager.getCameras'\n | 'DeviceManager.getMicrophones'\n | 'DeviceManager.getSpeakers'\n | 'DeviceManager.off'\n | 'DeviceManager.on'\n | 'DeviceManager.selectMicrophone'\n | 'DeviceManager.selectSpeaker'\n | 'IncomingCall.accept'\n | 'IncomingCall.reject'\n | 'TeamsCall.addParticipant'\n | 'VideoEffectsFeature.startEffects'\n | /* @conditional-compile-remove(calling-beta-sdk) */ 'CallAgent.handlePushNotification'\n | /* @conditional-compile-remove(calling-beta-sdk) */ 'Call.admit'\n | /* @conditional-compile-remove(calling-beta-sdk) */ 'Call.rejectParticipant'\n | /* @conditional-compile-remove(calling-beta-sdk) */ 'Call.admitAll'\n | 'Call.mutedByOthers'\n | 'Call.muteAllRemoteParticipants'\n | 'Call.setConstraints';\n\n/* @conditional-compile-remove(breakout-rooms) */\n/**\n * @public\n */\nexport type CallNotifications = {\n [target in NotificationTarget]: CallNotification;\n};\n\n/* @conditional-compile-remove(breakout-rooms) */\n/**\n * @public\n */\nexport interface CallNotification {\n target: NotificationTarget;\n\n timestamp: Date;\n}\n\n/* @conditional-compile-remove(breakout-rooms) */\n/** @public */\nexport type NotificationTarget =\n | 'assignedBreakoutRoomOpened'\n | 'assignedBreakoutRoomOpenedPromptJoin'\n | 'assignedBreakoutRoomChanged'\n | 'breakoutRoomJoined'\n | 'breakoutRoomClosingSoon';\n\n/**\n * State only proxy for {@link @azure/communication-calling#DiagnosticsCallFeature}.\n *\n * @public\n */\nexport interface DiagnosticsCallFeatureState {\n /**\n * Stores diagnostics related to network conditions.\n */\n network: NetworkDiagnosticsState;\n\n /**\n * Stores diagnostics related to media quality.\n */\n media: MediaDiagnosticsState;\n}\n\n/* @conditional-compile-remove(remote-ufd) */\n/**\n * All type names for {@link @azure/communication-calling#RemoteDiagnosticState}.\n *\n * @beta\n */\nexport type RemoteDiagnosticType = NetworkDiagnosticType | MediaDiagnosticType | ServerDiagnosticType;\n\n/* @conditional-compile-remove(remote-ufd) */\n/**\n * State only proxy for {@link @azure/communication-calling#DiagnosticsCallFeature}.\n *\n * @beta\n */\nexport declare type RemoteDiagnosticState = {\n readonly diagnostic: RemoteDiagnosticType;\n readonly value: DiagnosticQuality | DiagnosticFlag;\n readonly valueType: DiagnosticValueType;\n};\n\n/**\n * State only proxy for {@link @azure/communication-calling#NetworkDiagnostics}.\n *\n * @public\n */\nexport interface NetworkDiagnosticsState {\n latest: LatestNetworkDiagnostics;\n}\n\n/**\n * State only proxy for {@link @azure/communication-calling#MediaDiagnostics}.\n *\n * @public\n */\nexport interface MediaDiagnosticsState {\n latest: LatestMediaDiagnostics;\n}\n\n/**\n * @public\n * Information for conference phone info\n */\nexport interface ConferencePhoneInfo {\n /**\n * Phone number for the conference\n */\n phoneNumber: string;\n /**\n * Conference id for the conference\n */\n conferenceId: string;\n /**\n * Is toll free phone number\n */\n isTollFree: boolean;\n /**\n * phone number country\n */\n country?: string;\n /**\n * phone number city\n */\n city?: string;\n}\n"]}
1
+ {"version":3,"file":"CallClientState.js","sourceRoot":"","sources":["../../../../../calling-stateful-client/src/CallClientState.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AA8gClC;;;;GAIG;AACH,MAAM,OAAO,SAAU,SAAQ,KAAK;IAclC,YAAY,MAAuB,EAAE,UAAiB,EAAE,SAAgB;QACtE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,8EAA8E;QAC9E,IAAI,CAAC,SAAS,GAAG,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;QACnD,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,GAAG,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;IAC9D,CAAC;CACF","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n AudioDeviceInfo,\n CallDirection,\n CallEndReason,\n CallerInfo,\n CallState as CallStatus,\n DeviceAccess,\n DominantSpeakersInfo,\n IncomingCallKind,\n LatestMediaDiagnostics,\n LatestNetworkDiagnostics,\n MediaStreamType,\n ParticipantRole,\n RemoteParticipantState as RemoteParticipantStatus,\n ScalingMode,\n VideoDeviceInfo\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(breakout-rooms) */\nimport { BreakoutRoom, BreakoutRoomsSettings } from '@azure/communication-calling';\n/* @conditional-compile-remove(remote-ufd) */\nimport type {\n ServerDiagnosticType,\n MediaDiagnosticType,\n NetworkDiagnosticType,\n DiagnosticValueType,\n DiagnosticQuality,\n DiagnosticFlag\n} from '@azure/communication-calling';\nimport { TeamsCallInfo } from '@azure/communication-calling';\nimport { CallInfo } from '@azure/communication-calling';\nimport { CapabilitiesChangeInfo, ParticipantCapabilities } from '@azure/communication-calling';\nimport { CaptionsResultType } from '@azure/communication-calling';\nimport { CaptionsKind } from '@azure/communication-calling';\nimport { VideoEffectName } from '@azure/communication-calling';\nimport { CallKind } from '@azure/communication-calling';\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport { CommunicationIdentifierKind } from '@azure/communication-common';\nimport { ReactionMessage } from '@azure/communication-calling';\nimport { SpotlightedParticipant } from '@azure/communication-calling';\n/* @conditional-compile-remove(local-recording-notification) */\nimport { LocalRecordingInfo, RecordingInfo } from '@azure/communication-calling';\n\n/**\n * State only version of {@link @azure/communication-calling#CallAgent} except calls is moved to be a child directly of\n * {@link CallClientState} and not included here. The reason to have CallAgent's state proxied is to provide access to\n * displayName. We don't flatten CallAgent.displayName and put it in CallClientState because it would be ambiguious that\n * displayName is actually reliant on the creation/existence of CallAgent to be available.\n *\n * @public\n */\nexport interface CallAgentState {\n /**\n * Proxy of {@link @azure/communication-calling#CallAgent.displayName}.\n */\n displayName?: string;\n}\n\n/**\n * @public\n */\nexport interface CaptionsInfo {\n /**\n * The state in which this caption data can be classified.\n */\n resultType: CaptionsResultType;\n /**\n * The information of the call participant who spoke the captioned text.\n */\n speaker: CallerInfo;\n /**\n * The language that the spoken words were interpretted as. Corresponds to the language specified in startCaptions / setSpokenLanguage.\n */\n spokenLanguage: string;\n /**\n * The caption text.\n */\n captionText: string;\n /**\n * Timestamp of when the captioned words were initially spoken.\n */\n timestamp: Date;\n /**\n * The language that the captions are presented in. Corresponds to the captionLanguage specified in startCaptions / setCaptionLanguage.\n */\n captionLanguage?: string;\n /**\n * The original spoken caption text prior to translating to subtitle language\n */\n spokenText?: string;\n}\n\n/**\n * @public\n */\nexport interface CaptionsCallFeatureState {\n /**\n * supported spoken languages\n */\n supportedSpokenLanguages: string[];\n /**\n * array of received captions\n */\n captions: CaptionsInfo[];\n /**\n * whether captions is on/off\n */\n isCaptionsFeatureActive: boolean;\n /**\n * whether start captions button is clicked or now\n */\n startCaptionsInProgress: boolean;\n /**\n * supported caption languages\n */\n supportedCaptionLanguages: string[];\n /**\n * current spoken language\n */\n currentSpokenLanguage: string;\n /**\n * current caption language\n */\n currentCaptionLanguage: string;\n\n /**\n * current caption kind: teams or acs captions\n */\n captionsKind: CaptionsKind;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#TranscriptionCallFeature}. {@link StatefulCallClient} will\n * automatically listen for transcription state of the call and update the state exposed by {@link StatefulCallClient}\n * accordingly.\n *\n * @public\n */\nexport interface TranscriptionCallFeatureState {\n /**\n * Proxy of {@link @azure/communication-calling#TranscriptionCallFeature.isTranscriptionActive}.\n */\n isTranscriptionActive: boolean;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#CapabilitiesFeature}\n *\n * @public\n */\nexport interface CapabilitiesFeatureState {\n /**\n * Proxy of {@link @azure/communication-calling#CapabilitiesFeature.capabilities}.\n */\n capabilities: ParticipantCapabilities;\n /**\n * Proxy of the latest {@link @azure/communication-calling#CapabilitiesChangeInfo}\n */\n latestCapabilitiesChangeInfo: CapabilitiesChangeInfo;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#SpotlightCallFeature}\n *\n * @public\n */\nexport interface SpotlightCallFeatureState {\n /**\n * Ordered array of spotlighted participants in call\n */\n spotlightedParticipants: SpotlightedParticipant[];\n /**\n * Local participant spotlight\n */\n localParticipantSpotlight?: SpotlightState;\n /**\n * Proxy of {@link @azure/communication-calling#SpotlightCallFeature.maxParticipantsToSpotlight}.\n */\n maxParticipantsToSpotlight: number;\n}\n\n/**\n * Spotlight state with order\n *\n * @public\n */\nexport interface SpotlightState {\n /**\n * Order position of spotlight in call\n */\n spotlightedOrderPosition?: number;\n}\n\n/* @conditional-compile-remove(breakout-rooms) */\n/**\n * Breakout rooms state\n *\n * @public\n */\nexport interface BreakoutRoomsState {\n assignedBreakoutRoom?: BreakoutRoom;\n breakoutRoomSettings?: BreakoutRoomsSettings;\n breakoutRoomOriginCallId?: string;\n breakoutRoomDisplayName?: string;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#RecordingCallFeature}. {@link StatefulCallClient} will\n * automatically listen for recording state of the call and update the state exposed by {@link StatefulCallClient} accordingly.\n *\n * @public\n */\nexport interface RecordingCallFeatureState {\n /**\n * Proxy of {@link @azure/communication-calling#RecordingCallFeature.isRecordingActive}.\n */\n isRecordingActive: boolean;\n /* @conditional-compile-remove(local-recording-notification) */\n /**\n * Contains list of information of started recordings\n * Proxy of {@link @azure/communication-calling#RecordingCallFeature.recordings}.\n */\n activeRecordings?: RecordingInfo[];\n /* @conditional-compile-remove(local-recording-notification) */\n /**\n * Contains list of information of stopped recordings\n */\n lastStoppedRecording?: RecordingInfo[];\n}\n\n/* @conditional-compile-remove(local-recording-notification) */\n/**\n * State only version of {@link @azure/communication-calling#LocalRecordingCallFeature}. {@link StatefulCallClient} will\n * automatically listen for local recording state of the call and update the state exposed by {@link StatefulCallClient} accordingly.\n *\n * @beta\n */\nexport interface LocalRecordingCallFeatureState {\n /**\n * Proxy of {@link @azure/communication-calling#LocalRecordingCallFeature.isRecordingActive}.\n */\n isLocalRecordingActive: boolean;\n /**\n * Contains list of information of started recordings\n * Proxy of {@link @azure/communication-calling#LocalRecordingCallFeature.recordings}.\n */\n activeLocalRecordings?: LocalRecordingInfo[];\n /**\n * Contains list of information of stopped recordings\n */\n lastStoppedLocalRecording?: LocalRecordingInfo[];\n}\n\n/**\n * State only version of {@link @azure/communication-calling#RaiseHandCallFeature}. {@link StatefulCallClient} will\n * automatically listen for raised hands on the call and update the state exposed by {@link StatefulCallClient} accordingly.\n *\n * @public\n */\nexport interface RaiseHandCallFeatureState {\n /**\n * Proxy of {@link @azure/communication-calling#RaiseHandCallFeature.raisedHands}.\n */\n raisedHands: RaisedHandState[];\n /**\n * Contains information for local participant from list {@link @azure/communication-calling#RaiseHandCallFeature.raisedHands}.\n */\n localParticipantRaisedHand?: RaisedHandState;\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Represents the name of the call feature stream\n * @beta\n */\nexport type CallFeatureStreamName = 'togetherMode';\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * State only version of {@link @azure/communication-calling#CallFeatureStream}.\n * Represents call feature stream state.\n * @beta\n */\nexport interface CallFeatureStreamState extends RemoteVideoStreamState {\n feature?: CallFeatureStreamName;\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * State only version of {@link @azure/communication-calling#TogetherModeSeatingMap}.\n * @beta\n *\n * Represents the seating position of a participant in Together Mode.\n */\nexport interface TogetherModeSeatingPositionState {\n /* The top left offset from the top of the together mode view.*/\n top: number;\n /* The left offset position from the left of the together mode view. */\n left: number;\n /* The width of the seating area */\n width: number;\n /* The height of the seating area. */\n height: number;\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Represents the seating positions of participants in Together Mode.\n *\n * @beta\n */\nexport type TogetherModeParticipantSeatingState = Record<string, TogetherModeSeatingPositionState>;\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * Represents the streams in Together Mode.\n *\n * @beta\n */\nexport interface TogetherModeStreamsState {\n mainVideoStream?: CallFeatureStreamState;\n}\n\n/* @conditional-compile-remove(together-mode) */\n/**\n * State only version of {@link @azure/communication-calling#TogetherModeCallFeature}. {@link StatefulCallClient}.\n * Represents the state of the Together Mode feature.\n * @beta\n */\nexport interface TogetherModeCallFeatureState {\n isActive: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#TogetherModeCallFeature.togetherModeStream}.\n */\n streams: TogetherModeStreamsState;\n /**\n * Proxy of {@link @azure/communication-calling#TogetherModeCallFeature.TogetherModeSeatingMap}.\n */\n seatingPositions: TogetherModeParticipantSeatingState;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#PPTLiveCallFeature}. {@link StatefulCallClient} will\n * automatically listen for pptLive on the call and update the state exposed by {@link StatefulCallClient} accordingly.\n *\n * @public\n */\nexport interface PPTLiveCallFeatureState {\n /**\n * Proxy of {@link @azure/communication-calling#PPTLiveCallFeature.isActive}.\n */\n isActive: boolean;\n}\n/**\n * Raised hand state with order\n *\n * @public\n */\nexport type RaisedHandState = {\n raisedHandOrderPosition: number;\n};\n\n/**\n * State only version of {@link @azure/communication-calling#Call.ReactionMessage} with UI helper props receivedOn.\n * Reaction state with a timestamp which helps UI to decide to render the reaction accordingly.\n *\n * @public\n */\nexport type ReactionState = {\n /**\n * Reaction message from the meeting {@link @azure/communication-calling#Call.ReactionMessage}\n */\n reactionMessage: ReactionMessage;\n /**\n * Received timestamp of the reaction message in a meeting.\n */\n receivedOn: Date;\n};\n\n/**\n * State only version of {@link @azure/communication-calling#LocalVideoStream}.\n *\n * @public\n */\nexport interface LocalVideoStreamState {\n /**\n * Proxy of {@link @azure/communication-calling#LocalVideoStream.source}.\n */\n source: VideoDeviceInfo;\n /**\n * Proxy of {@link @azure/communication-calling#LocalVideoStream.mediaStreamType}.\n */\n mediaStreamType: MediaStreamType;\n /**\n * {@link VideoStreamRendererView} that is managed by createView/disposeView in {@link StatefulCallClient}\n * API. This can be undefined if the stream has not yet been rendered and defined after createView creates the view.\n */\n view?: VideoStreamRendererViewState;\n\n /**\n * Stores the state of the video effects.\n * @public\n */\n videoEffects?: LocalVideoStreamVideoEffectsState;\n}\n\n/**\n * State only version of a LocalVideoStream's {@link @azure/communication-calling#VideoEffectsFeature}.\n *\n * @public\n */\nexport interface LocalVideoStreamVideoEffectsState {\n /**\n * List of effects if any are active.\n */\n activeEffects?: VideoEffectName[];\n}\n\n/**\n * State only version of Optimal Video Count Feature {@link @azure/communication-calling#OptimalVideoCountCallFeature}.\n *\n * @public\n */\nexport interface OptimalVideoCountFeatureState {\n /**\n * State of the current optimal video count.\n */\n maxRemoteVideoStreams: number;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#RemoteVideoStream}.\n *\n * @public\n */\nexport interface RemoteVideoStreamState {\n /**\n * Proxy of {@link @azure/communication-calling#RemoteVideoStream.id}.\n */\n id: number;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteVideoStream.mediaStreamType}.\n */\n mediaStreamType: MediaStreamType;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteVideoStream.isAvailable}.\n */\n isAvailable: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteVideoStream.isReceiving}.\n * @public\n */\n isReceiving: boolean;\n /**\n * {@link VideoStreamRendererView} that is managed by createView/disposeView in {@link StatefulCallClient}\n * API. This can be undefined if the stream has not yet been rendered and defined after createView creates the view.\n */\n view?: VideoStreamRendererViewState;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteVideoStream.size}.\n */\n streamSize?: { width: number; height: number };\n}\n\n/**\n * State only version of {@link @azure/communication-calling#VideoStreamRendererView}. This property is added to the state exposed\n * by {@link StatefulCallClient} by {@link StatefulCallClient.createView} and removed by {@link StatefulCallClient.disposeView}.\n *\n * @public\n */\nexport interface VideoStreamRendererViewState {\n /**\n * Proxy of {@link @azure/communication-calling#VideoStreamRendererView.scalingMode}.\n */\n scalingMode: ScalingMode;\n /**\n * Proxy of {@link @azure/communication-calling#VideoStreamRendererView.isMirrored}.\n */\n isMirrored: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#VideoStreamRendererView.target}.\n */\n target: HTMLElement;\n}\n\n/* @conditional-compile-remove(media-access) */\n/**\n * Media access state\n * @alpha\n */\nexport interface MediaAccessState {\n /**\n * Whether the audio is forcibly muted\n */\n isAudioPermitted: boolean;\n /**\n * Whether the video is forcibly muted\n */\n isVideoPermitted: boolean;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#RemoteParticipant}. {@link StatefulCallClient} will\n * automatically retrieve RemoteParticipants and add their state to the state exposed by {@link StatefulCallClient}.\n *\n * @public\n */\nexport interface RemoteParticipantState {\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.identifier}.\n */\n identifier: CommunicationIdentifierKind;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.displayName}.\n */\n displayName?: string;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.state}.\n */\n state: RemoteParticipantStatus;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.callEndReason}.\n */\n callEndReason?: CallEndReason;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.videoStreams} as an object with\n * {@link RemoteVideoStream} fields keyed by {@link @azure/communication-calling#RemoteVideoStream.id}.\n */\n videoStreams: { [key: number]: RemoteVideoStreamState };\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.isMuted}.\n */\n isMuted: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.isSpeaking}.\n */\n isSpeaking: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#RemoteParticipant.role}.\n */\n role?: ParticipantRole;\n /**\n * Proxy of {@link @azure/communication-calling#Call.RaisedHand.raisedHands}.\n */\n raisedHand?: RaisedHandState;\n /**\n * Proxy of {@link @azure/communication-calling#Call.PPTLive.target}.\n *\n * @public\n */\n contentSharingStream?: HTMLElement;\n /**\n * Proxy of {@link @azure/communication-calling#Call.ReactionMessage} with\n * UI helper props receivedOn which indicates the timestamp when the message was received.\n *\n * @public\n */\n reactionState?: ReactionState;\n /**\n * Proxy of {@link @azure/communication-calling#SpotlightCallFeature.spotlightedParticipants}.\n */\n spotlight?: SpotlightState;\n /* @conditional-compile-remove(media-access) */\n /**\n * Proxy of {@link @azure/communication-calling#Call.MediaAccessCallFeature.MediaAccess}.\n */\n mediaAccess?: MediaAccessState;\n /* @conditional-compile-remove(remote-ufd) */\n /**\n * The diagnostic status of RemoteParticipant{@link @azure/communication-calling#RemoteDiagnostics}.\n */\n diagnostics?: Partial<Record<RemoteDiagnosticType, RemoteDiagnosticState>>;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#Call}. {@link StatefulCallClient} will automatically\n * retrieve Call's state and add it to the state exposed by {@link StatefulCallClient}.\n *\n * @public\n */\nexport interface CallState {\n /**\n * Proxy of {@link @azure/communication-calling#Call.id}.\n */\n id: string;\n\n /**\n * Type of the call.\n */\n kind: CallKind;\n /**\n * Proxy of {@link @azure/communication-calling#Call.callerInfo}.\n */\n callerInfo: CallerInfo;\n /**\n * Proxy of {@link @azure/communication-calling#Call.state}.\n */\n state: CallStatus;\n /**\n * Proxy of {@link @azure/communication-calling#Call.callEndReason}.\n */\n callEndReason?: CallEndReason;\n /**\n * Proxy of {@link @azure/communication-calling#Call.direction}.\n */\n direction: CallDirection;\n /**\n * Proxy of {@link @azure/communication-calling#Call.isMuted}.\n */\n isMuted: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#Call.isScreenSharingOn}.\n */\n isScreenSharingOn: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#DominantSpeakersInfo }.\n */\n dominantSpeakers?: DominantSpeakersInfo;\n /**\n * Proxy of {@link @azure/communication-calling#Call.localVideoStreams}.\n */\n localVideoStreams: LocalVideoStreamState[];\n /**\n * Proxy of {@link @azure/communication-calling#Call.remoteParticipants}.\n * Object with {@link RemoteParticipant} fields keyed by flattened {@link RemoteParticipantState.identifier}.\n * To obtain a flattened {@link RemoteParticipantState.identifier}, use\n * {@link @azure/communication-react#toFlatCommunicationIdentifier}.\n */\n remoteParticipants: { [keys: string]: RemoteParticipantState };\n /**\n * Stores remote participants that have left the call so that the callEndReason could be retrieved.\n * Object with {@link RemoteParticipant} fields keyed by flattened {@link RemoteParticipantState.identifier}.\n * To obtain a flattened {@link RemoteParticipantState.identifier}, use\n * {@link @azure/communication-react#toFlatCommunicationIdentifier}.\n */\n remoteParticipantsEnded: { [keys: string]: RemoteParticipantState };\n /**\n * Proxy of {@link @azure/communication-calling#TranscriptionCallFeature}.\n */\n transcription: TranscriptionCallFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#TranscriptionCallFeature}.\n */\n captionsFeature: CaptionsCallFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#OptimalVideoCountCallFeature}.\n */\n optimalVideoCount: OptimalVideoCountFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#RecordingCallFeature}.\n */\n recording: RecordingCallFeatureState;\n /* @conditional-compile-remove(local-recording-notification) */\n /**\n * Proxy of {@link @azure/communication-calling#LocalRecordingCallFeature}.\n */\n localRecording: LocalRecordingCallFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#PPTLiveCallFeature}.\n *\n *@public\n */\n pptLive: PPTLiveCallFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#RaiseHandCallFeature}.\n */\n raiseHand: RaiseHandCallFeatureState;\n /* @conditional-compile-remove(together-mode) */\n /**\n * Proxy of {@link @azure/communication-calling#TogetherModeCallFeature}.\n * @beta\n */\n togetherMode: TogetherModeCallFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#Call.ReactionMessage} with\n * UI helper props receivedOn which indicates the timestamp when the message was received.\n *\n * @public\n */\n localParticipantReaction?: ReactionState;\n /**\n * Stores the currently active screenshare participant's key. If there is no screenshare active, then this will be\n * undefined. You can use this key to access the remoteParticipant data in {@link CallState.remoteParticipants} object.\n *\n * Note this only applies to ScreenShare in RemoteParticipant. A local ScreenShare being active will not affect this\n * property.\n *\n * This property is added by the stateful layer and is not a proxy of SDK state\n */\n screenShareRemoteParticipant?: string;\n /**\n * Stores the currently active pptlive participant's key. Will be reused by White board etc. If there is no screenshare active, then this will be\n * undefined. You can use this key to access the remoteParticipant data in {@link CallState.remoteParticipants} object.\n *\n * Note this only applies to PPTLive in RemoteParticipant.\n *\n * This property is added by the stateful layer and is not a proxy of SDK state\n *\n * @public\n */\n contentSharingRemoteParticipant?: string;\n /**\n * Stores the local date when the call started on the client. This property is added by the stateful layer and is not\n * a proxy of SDK state.\n */\n startTime: Date;\n /**\n * Stores the local date when the call ended on the client. This property is added by the stateful layer and is not\n * a proxy of SDK state.\n */\n endTime: Date | undefined;\n\n /**\n * Stores the latest call diagnostics.\n */\n diagnostics: DiagnosticsCallFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#Call.role}.\n */\n role?: ParticipantRole;\n\n /* @conditional-compile-remove(total-participant-count) */\n /**\n * Proxy of {@link @azure/communication-calling#Call.totalParticipantCount}.\n */\n totalParticipantCount?: number;\n /**\n * Transfer state of call\n */\n transfer: TransferFeatureState;\n\n /**\n * Proxy of {@link @azure/communication-calling#CapabilitiesFeature}.\n */\n capabilitiesFeature?: CapabilitiesFeatureState;\n /**\n * Hide attendee names in teams meeting\n */\n hideAttendeeNames?: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#SpotlightCallFeature}.\n */\n spotlight?: SpotlightCallFeatureState;\n /**\n * Proxy of {@link @azure/communication-calling#Call.info}.\n */\n info?: TeamsCallInfo | /* @conditional-compile-remove(calling-beta-sdk) */ CallInfo;\n\n /**\n * Proxy of {@link @azure/communication-calling#TeamsMeetingAudioConferencingCallFeature}.\n */\n meetingConference?: { conferencePhones: ConferencePhoneInfo[] };\n\n /* @conditional-compile-remove(breakout-rooms) */\n /**\n * Proxy of {@link @azure/communication-calling#BreakoutRoomsFeature}.\n */\n breakoutRooms?: BreakoutRoomsState;\n\n /* @conditional-compile-remove(media-access) */\n /**\n * Proxy of {@link @azure/communication-calling#MediaAccessFeature}.\n */\n mediaAccess?: MediaAccessState;\n}\n\n/**\n * Transfer feature state\n *\n * @public\n */\nexport interface TransferFeatureState {\n /**\n * Accepted transfer requests\n */\n acceptedTransfers: { [key: string]: AcceptedTransfer };\n}\n\n/**\n * Transfer feature state\n *\n * @public\n */\nexport interface AcceptedTransfer {\n /**\n * Stores call id of accepted transfer\n */\n callId: string;\n /**\n * Stores timestamp when transfer was accepted\n */\n timestamp: Date;\n}\n\n/**\n * State to track the types {@link CallInfo} and {@link TeamsCallInfo}\n * @public\n */\nexport interface CallInfoState {\n /**\n * GroupId of the call that you joined\n */\n groupId?: string;\n /**\n * The teams meeting thread id\n */\n threadId?: string;\n /**\n * participant id of the local user\n */\n participantId: string;\n /**\n * Differentiator between the Call and TeamsCall types\n */\n kind: IncomingCallKind;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#IncomingCall}. {@link StatefulCallClient} will\n * automatically detect incoming calls and add their state to the state exposed by {@link StatefulCallClient}.\n *\n * @public\n */\nexport interface IncomingCallState {\n /**\n * Proxy of {@link @azure/communication-calling#IncomingCall.id}.\n */\n id: string;\n /**\n * Proxy of {@link @azure/communication-calling#IncomingCall.callInfo}.\n */\n info: CallInfoState;\n /**\n * Proxy of {@link @azure/communication-calling#IncomingCall.callerInfo}.\n */\n callerInfo: CallerInfo;\n /**\n * Set to the state returned by 'callEnded' event on {@link @azure/communication-calling#IncomingCall} when received.\n * This property is added by the stateful layer and is not a proxy of SDK state.\n */\n callEndReason?: CallEndReason;\n /**\n * Stores the local date when the call started on the client. This property is added by the stateful layer and is not\n * a proxy of SDK state.\n */\n startTime: Date;\n /**\n * Stores the local date when the call ended on the client. This property is added by the stateful layer and is not a\n * proxy of SDK state. It is undefined if the call is not ended yet.\n */\n endTime?: Date;\n}\n\n/**\n * State only version of {@link @azure/communication-calling#TeamsIncomingCall}\n * @public\n */\nexport interface TeamsIncomingCallState {\n /**\n * Proxy of {@link @azure/communication-calling#TeamsIncomingCall.id}.\n */\n id: string;\n /**\n * Proxy of {@link @azure/communication-calling#TeamsIncomingCall.teamsCallInfo}.\n */\n info: CallInfoState;\n /**\n * Proxy of {@link @azure/communication-calling#TeamsIncomingCall.callerInfo}.\n */\n callerInfo: CallerInfo;\n /**\n * Set to the state returned by 'callEnded' event on {@link @azure/communication-calling#IncomingCall} when received.\n * This property is added by the stateful layer and is not a proxy of SDK state.\n */\n callEndReason?: CallEndReason;\n /**\n * Stores the local date when the call started on the client. This property is added by the stateful layer and is not\n * a proxy of SDK state.\n */\n startTime: Date;\n /**\n * Stores the local date when the call ended on the client. This property is added by the stateful layer and is not a\n * proxy of SDK state. It is undefined if the call is not ended yet.\n */\n endTime?: Date;\n}\n\n/**\n * This type is meant to encapsulate all the state inside {@link @azure/communication-calling#DeviceManager}. For\n * optional parameters they may not be available until permission is granted by the user. The cameras, microphones,\n * speakers, and deviceAccess states will be empty until the corresponding\n * {@link @azure/communication-calling#DeviceManager}'s getCameras, getMicrophones, getSpeakers, and askDevicePermission\n * APIs are called and completed.\n *\n * @public\n */\nexport type DeviceManagerState = {\n /**\n * Proxy of {@link @azure/communication-calling#DeviceManager.isSpeakerSelectionAvailable}.\n */\n isSpeakerSelectionAvailable: boolean;\n /**\n * Proxy of {@link @azure/communication-calling#DeviceManager.selectedMicrophone}.\n */\n selectedMicrophone?: AudioDeviceInfo;\n /**\n * Proxy of {@link @azure/communication-calling#DeviceManager.selectedSpeaker}.\n */\n selectedSpeaker?: AudioDeviceInfo;\n /**\n * Stores the selected camera device info. This is added by the stateful layer and does not exist in the Calling SDK.\n * It is meant as a convenience to the developer. It must be explicitly set before it has any value and does not\n * persist across instances of the {@link StatefulCallClient}. The developer controls entirely what this value holds\n * at any time.\n */\n selectedCamera?: VideoDeviceInfo;\n /**\n * Stores any cameras data returned from {@link @azure/communication-calling#DeviceManager.getCameras}.\n */\n cameras: VideoDeviceInfo[];\n /**\n * Stores any microphones data returned from {@link @azure/communication-calling#DeviceManager.getMicrophones}.\n */\n microphones: AudioDeviceInfo[];\n /**\n * Stores any speakers data returned from {@link @azure/communication-calling#DeviceManager.getSpeakers}.\n */\n speakers: AudioDeviceInfo[];\n /**\n * Stores deviceAccess data returned from {@link @azure/communication-calling#DeviceManager.askDevicePermission}.\n */\n deviceAccess?: DeviceAccess;\n /**\n * Stores created views that are not associated with any CallState (when {@link StatefulCallClient.createView} is\n * called with undefined callId, undefined participantId, and defined LocalVideoStream).\n *\n * The values in this array are generated internally when {@link StatefulCallClient.createView} is called and are\n * considered immutable.\n */\n unparentedViews: LocalVideoStreamState[];\n};\n\n/**\n * Container for all of the state data proxied by {@link StatefulCallClient}. The calls, callsEnded, incomingCalls, and\n * incomingCallsEnded states will be automatically provided if a callAgent has been created. The deviceManager will be\n * empty initially until populated see {@link DeviceManagerState}. The userId state is provided as a convenience for the\n * developer and is completely controled and set by the developer.\n *\n * @public\n */\nexport interface CallClientState {\n /**\n * Proxy of {@link @azure/communication-calling#CallAgent.calls} as an object with CallState {@link CallState} fields.\n * It is keyed by {@link @azure/communication-calling#Call.id}. Please note that\n * {@link @azure/communication-calling#Call.id} could change. You should not cache the id itself but the entire\n * {@link @azure/communication-calling#Call} and then use the id contained to look up data in this map.\n */\n calls: { [key: string]: CallState };\n /**\n * Calls that have ended are stored here so the callEndReason could be checked.\n * It is an object with {@link @azure/communication-calling#Call.id} keys and {@link CallState} values.\n *\n * Only {@link MAX_CALL_HISTORY_LENGTH} Calls are kept in the history. Oldest calls are evicted if required.\n */\n callsEnded: { [key: string]: CallState };\n /**\n * Proxy of {@link @azure/communication-calling#IncomingCall} as an object with {@link IncomingCall} fields.\n * It is keyed by {@link @azure/communication-calling#IncomingCall.id}.\n */\n incomingCalls: {\n [key: string]: IncomingCallState | TeamsIncomingCallState;\n };\n /**\n * Incoming Calls that have ended are stored here so the callEndReason could be checked.\n * It is an as an object with {@link @azure/communication-calling#Call.id} keys and {@link IncomingCall} values.\n *\n * Only {@link MAX_CALL_HISTORY_LENGTH} Calls are kept in the history. Oldest calls are evicted if required.\n */\n incomingCallsEnded: {\n [key: string]: IncomingCallState | TeamsIncomingCallState;\n };\n /**\n * Proxy of {@link @azure/communication-calling#DeviceManager}. Please review {@link DeviceManagerState}.\n */\n deviceManager: DeviceManagerState;\n /**\n * Proxy of {@link @azure/communication-calling#CallAgent}. Please review {@link CallAgentState}.\n */\n callAgent?: CallAgentState;\n /**\n * Stores a userId. This is not used by the {@link StatefulCallClient} and is provided here as a convenience for the\n * developer for easier access to userId. Must be passed in at initialization of the {@link StatefulCallClient}.\n * Completely controlled by the developer.\n */\n userId: CommunicationIdentifierKind;\n /**\n * Stores the latest error for each API method.\n *\n * See documentation of {@Link CallErrors} for details.\n */\n latestErrors: CallErrors;\n /* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */\n /**\n * Stores the latest notifications.\n *\n * See documentation of {@Link CallNotifications} for details.\n */\n latestNotifications: CallNotifications;\n /**\n * A phone number in E.164 format that will be used to represent callers identity.\n * For example, using the alternateCallerId to add a participant using PSTN, this number will\n * be used as the caller id in the PSTN call.\n */\n alternateCallerId?: string;\n /**\n * state to track the environment that the stateful client was made in is supported\n */\n environmentInfo?: EnvironmentInfo;\n}\n\n/**\n * Errors teed from API calls to the Calling SDK.\n *\n * Each property in the object stores the latest error for a particular SDK API method.\n *\n * Errors from this object can be cleared using the {@link newClearCallErrorsModifier}.\n * Additionally, errors are automatically cleared when:\n * - The state is cleared.\n * - Subsequent calls to related API methods succeed.\n * See documentation of individual stateful client methods for details on when errors may be automatically cleared.\n *\n * @public\n */\nexport type CallErrors = {\n [target in CallErrorTarget]: CallError;\n};\n\n/**\n * Error thrown from failed stateful API methods.\n *\n * @public\n */\nexport class CallError extends Error {\n /**\n * The API method target that failed.\n */\n public target: CallErrorTarget;\n /**\n * Error thrown by the failed SDK method.\n */\n public innerError: Error;\n /**\n * Timestamp added to the error by the stateful layer.\n */\n public timestamp: Date;\n\n constructor(target: CallErrorTarget, innerError: Error, timestamp?: Date) {\n super();\n this.target = target;\n this.innerError = innerError;\n // Testing note: It is easier to mock Date::now() than the Date() constructor.\n this.timestamp = timestamp ?? new Date(Date.now());\n this.name = 'CallError';\n this.message = `${this.target}: ${this.innerError.message}`;\n }\n}\n\n/**\n * String literal type for all permissible keys in {@Link CallErrors}.\n *\n * @public\n */\nexport type CallErrorTarget =\n | 'Call.addParticipant'\n | 'Call.dispose'\n | 'Call.feature'\n | 'Call.hangUp'\n | 'Call.hold'\n | 'Call.mute'\n | 'Call.muteIncomingAudio'\n | 'Call.off'\n | 'Call.on'\n | 'Call.removeParticipant'\n | 'Call.resume'\n | 'Call.sendDtmf'\n | 'Call.startAudio'\n | 'Call.startScreenSharing'\n | 'Call.startVideo'\n | 'Call.stopScreenSharing'\n | 'Call.stopAudio'\n | 'Call.stopVideo'\n | 'Call.unmute'\n | 'Call.unmuteIncomingAudio'\n | 'CallAgent.dispose'\n | 'CallAgent.feature'\n | 'CallAgent.join'\n | 'CallAgent.off'\n | 'CallAgent.on'\n | 'CallAgent.startCall'\n | 'CallClient.createCallAgent'\n | 'CallClient.createTeamsCallAgent'\n | 'CallClient.feature'\n | 'CallClient.getDeviceManager'\n | 'CallClient.getEnvironmentInfo'\n | 'DeviceManager.askDevicePermission'\n | 'DeviceManager.getCameras'\n | 'DeviceManager.getMicrophones'\n | 'DeviceManager.getSpeakers'\n | 'DeviceManager.off'\n | 'DeviceManager.on'\n | 'DeviceManager.selectMicrophone'\n | 'DeviceManager.selectSpeaker'\n | 'IncomingCall.accept'\n | 'IncomingCall.reject'\n | 'TeamsCall.addParticipant'\n | 'VideoEffectsFeature.startEffects'\n | /* @conditional-compile-remove(calling-beta-sdk) */ 'CallAgent.handlePushNotification'\n | /* @conditional-compile-remove(calling-beta-sdk) */ 'Call.admit'\n | /* @conditional-compile-remove(calling-beta-sdk) */ 'Call.rejectParticipant'\n | /* @conditional-compile-remove(calling-beta-sdk) */ 'Call.admitAll'\n | 'Call.mutedByOthers'\n | 'Call.muteAllRemoteParticipants'\n | 'Call.setConstraints';\n\n/* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */\n/**\n * @public\n */\nexport type CallNotifications = {\n [target in NotificationTarget]: CallNotification;\n};\n\n/* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */\n/**\n * @public\n */\nexport interface CallNotification {\n target: NotificationTarget;\n\n timestamp: Date;\n}\n\n/* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */\n/** @public */\nexport type NotificationTarget =\n | 'assignedBreakoutRoomOpened'\n | 'assignedBreakoutRoomOpenedPromptJoin'\n | 'assignedBreakoutRoomChanged'\n | 'breakoutRoomJoined'\n | 'breakoutRoomClosingSoon'\n | /* @conditional-compile-remove(media-access) */ 'capabilityTurnVideoOnPresent'\n | /* @conditional-compile-remove(media-access) */ 'capabilityTurnVideoOnAbsent'\n | /* @conditional-compile-remove(media-access) */ 'capabilityUnmuteMicPresent'\n | /* @conditional-compile-remove(media-access) */ 'capabilityUnmuteMicAbsent';\n\n/**\n * State only proxy for {@link @azure/communication-calling#DiagnosticsCallFeature}.\n *\n * @public\n */\nexport interface DiagnosticsCallFeatureState {\n /**\n * Stores diagnostics related to network conditions.\n */\n network: NetworkDiagnosticsState;\n\n /**\n * Stores diagnostics related to media quality.\n */\n media: MediaDiagnosticsState;\n}\n\n/* @conditional-compile-remove(remote-ufd) */\n/**\n * All type names for {@link @azure/communication-calling#RemoteDiagnosticState}.\n *\n * @beta\n */\nexport type RemoteDiagnosticType = NetworkDiagnosticType | MediaDiagnosticType | ServerDiagnosticType;\n\n/* @conditional-compile-remove(remote-ufd) */\n/**\n * State only proxy for {@link @azure/communication-calling#DiagnosticsCallFeature}.\n *\n * @beta\n */\nexport declare type RemoteDiagnosticState = {\n readonly diagnostic: RemoteDiagnosticType;\n readonly value: DiagnosticQuality | DiagnosticFlag;\n readonly valueType: DiagnosticValueType;\n};\n\n/**\n * State only proxy for {@link @azure/communication-calling#NetworkDiagnostics}.\n *\n * @public\n */\nexport interface NetworkDiagnosticsState {\n latest: LatestNetworkDiagnostics;\n}\n\n/**\n * State only proxy for {@link @azure/communication-calling#MediaDiagnostics}.\n *\n * @public\n */\nexport interface MediaDiagnosticsState {\n latest: LatestMediaDiagnostics;\n}\n\n/**\n * @public\n * Information for conference phone info\n */\nexport interface ConferencePhoneInfo {\n /**\n * Phone number for the conference\n */\n phoneNumber: string;\n /**\n * Conference id for the conference\n */\n conferenceId: string;\n /**\n * Is toll free phone number\n */\n isTollFree: boolean;\n /**\n * phone number country\n */\n country?: string;\n /**\n * phone number city\n */\n city?: string;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import { CommunicationIdentifierKind } from '@azure/communication-common';
2
2
  import { AudioDeviceInfo, DeviceAccess, DominantSpeakersInfo, ParticipantRole, ScalingMode, VideoDeviceInfo } from '@azure/communication-calling';
3
- import { MediaAccess } from '@azure/communication-calling';
3
+ import { MediaAccess, MeetingMediaAccess } from '@azure/communication-calling';
4
4
  import { RaisedHand } from '@azure/communication-calling';
5
5
  import { BreakoutRoom, BreakoutRoomsSettings } from '@azure/communication-calling';
6
6
  import { TeamsMeetingAudioConferencingDetails } from '@azure/communication-calling';
@@ -169,5 +169,6 @@ export declare class CallContext {
169
169
  setLatestNotification(callId: string, notification: CallNotification): void;
170
170
  deleteLatestNotification(callId: string, notificationTarget: NotificationTarget): void;
171
171
  setMediaAccesses(callId: string, mediaAccesses: MediaAccess[]): void;
172
+ setMeetingMediaAccess(callId: string, meetingMediaAccess: MeetingMediaAccess): void;
172
173
  }
173
174
  //# sourceMappingURL=CallContext.d.ts.map
@@ -1177,6 +1177,21 @@ export class CallContext {
1177
1177
  });
1178
1178
  });
1179
1179
  }
1180
+ /* @conditional-compile-remove(media-access) */
1181
+ setMeetingMediaAccess(callId, meetingMediaAccess) {
1182
+ this.modifyState((draft) => {
1183
+ const call = draft.calls[this._callIdHistory.latestCallId(callId)];
1184
+ if (!call) {
1185
+ return;
1186
+ }
1187
+ if (meetingMediaAccess) {
1188
+ call.mediaAccess = {
1189
+ isAudioPermitted: meetingMediaAccess.isAudioPermitted,
1190
+ isVideoPermitted: meetingMediaAccess.isVideoPermitted
1191
+ };
1192
+ }
1193
+ });
1194
+ }
1180
1195
  }
1181
1196
  const toCallError = (target, error) => {
1182
1197
  if (error instanceof Error) {