@azure/communication-react 1.15.0-alpha-202404060012 → 1.15.0-alpha-202404090013

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 (144) hide show
  1. package/dist/communication-react.d.ts +31 -43
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-CLkmWBpD.js → ChatMessageComponentAsRichTextEditBox-CkXr0tIb.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-CLkmWBpD.js.map → ChatMessageComponentAsRichTextEditBox-CkXr0tIb.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{index-CeUuqiwO.js → index-BcyLWrGT.js} +223 -214
  5. package/dist/dist-cjs/communication-react/index-BcyLWrGT.js.map +1 -0
  6. package/dist/dist-cjs/communication-react/index.js +1 -1
  7. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  8. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +3 -0
  10. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js +6 -0
  11. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.d.ts +2 -2
  13. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/callControlSelectors.js.map +1 -1
  15. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +0 -3
  16. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js +2 -8
  18. package/dist/dist-esm/calling-component-bindings/src/hooks/usePropsFor.js.map +1 -1
  19. package/dist/dist-esm/calling-component-bindings/src/index.js +1 -1
  20. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  21. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js +6 -20
  22. package/dist/dist-esm/calling-component-bindings/src/participantListSelector.js.map +1 -1
  23. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.d.ts +1 -9
  24. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +8 -31
  25. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  26. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +2 -1
  27. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +11 -28
  28. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  29. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +1 -5
  30. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  31. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +14 -9
  32. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  33. package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -1
  34. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +9 -0
  35. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  36. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.d.ts +1 -2
  37. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +7 -20
  38. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  39. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.d.ts +15 -1
  40. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js +42 -0
  41. package/dist/dist-esm/calling-stateful-client/src/CaptionsSubscriber.js.map +1 -1
  42. package/dist/dist-esm/calling-stateful-client/src/Converter.js +3 -1
  43. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  44. package/dist/dist-esm/react-components/src/components/ReactionButton.d.ts +3 -3
  45. package/dist/dist-esm/react-components/src/components/ReactionButton.js +1 -1
  46. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  47. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js +3 -6
  48. package/dist/dist-esm/react-components/src/components/VideoGallery/ParticipantVideoTileOverlay.js.map +1 -1
  49. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.d.ts +0 -4
  50. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js +0 -21
  51. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  52. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +0 -1
  53. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  54. package/dist/dist-esm/react-components/src/components/VideoTile.d.ts +0 -2
  55. package/dist/dist-esm/react-components/src/components/VideoTile.js +5 -0
  56. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  57. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.d.ts +4 -0
  58. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js +16 -0
  59. package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +0 -1
  61. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  62. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +16 -2
  63. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +16 -2
  64. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +16 -2
  65. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +16 -2
  66. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +16 -2
  67. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +16 -2
  68. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +16 -2
  69. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +16 -2
  70. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +16 -2
  71. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +16 -2
  72. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +16 -2
  73. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +16 -2
  74. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +16 -2
  75. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +16 -2
  76. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +16 -2
  77. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +16 -2
  78. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +16 -2
  79. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +16 -2
  80. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +16 -2
  81. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +16 -2
  82. package/dist/dist-esm/react-components/src/types/CallSurveyImprovementSuggestions.d.ts +1 -1
  83. package/dist/dist-esm/react-components/src/types/CallSurveyImprovementSuggestions.js.map +1 -1
  84. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +2 -2
  85. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/types/ReactionTypes.d.ts +2 -6
  87. package/dist/dist-esm/react-components/src/types/ReactionTypes.js.map +1 -1
  88. package/dist/dist-esm/react-components/src/types/SurveyIssues.d.ts +1 -1
  89. package/dist/dist-esm/react-components/src/types/SurveyIssues.js.map +1 -1
  90. package/dist/dist-esm/react-components/src/types/SurveyIssuesHeadingStrings.d.ts +1 -1
  91. package/dist/dist-esm/react-components/src/types/SurveyIssuesHeadingStrings.js.map +1 -1
  92. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.d.ts +1 -2
  93. package/dist/dist-esm/react-components/src/types/VideoGalleryParticipant.js.map +1 -1
  94. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +1 -5
  95. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  96. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +3 -3
  97. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  98. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +11 -6
  99. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  100. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.d.ts +1 -1
  101. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/Prompt.js.map +1 -1
  102. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +3 -0
  103. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +6 -0
  104. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
  105. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +2 -2
  106. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  107. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.d.ts +0 -1
  108. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/state/CallWithChatAdapterState.js.map +1 -1
  109. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.d.ts +1 -1
  110. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js +1 -1
  111. package/dist/dist-esm/react-composites/src/composites/common/CaptionsBanner.js.map +1 -1
  112. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +1 -1
  113. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +1 -1
  114. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  115. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.d.ts +1 -1
  116. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +1 -1
  117. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  118. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.d.ts +1 -1
  119. package/dist/dist-esm/react-composites/src/composites/common/Drawer/PreparedMoreDrawer.js.map +1 -1
  120. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js +1 -1
  121. package/dist/dist-esm/react-composites/src/composites/common/TagsSurvey.js.map +1 -1
  122. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +9 -2
  123. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +9 -2
  124. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +9 -2
  125. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +8 -1
  126. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +1 -2
  127. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +9 -2
  128. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +9 -2
  129. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +9 -2
  130. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +9 -2
  131. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +9 -2
  132. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +9 -2
  133. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +9 -2
  134. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +9 -2
  135. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +9 -2
  136. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +9 -2
  137. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +9 -2
  138. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +10 -3
  139. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +9 -2
  140. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +9 -2
  141. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +9 -2
  142. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +9 -2
  143. package/package.json +1 -1
  144. package/dist/dist-cjs/communication-react/index-CeUuqiwO.js.map +0 -1
@@ -7,12 +7,8 @@ import { getRole } from './baseSelectors';
7
7
  import { isHideAttendeeNamesEnabled } from './baseSelectors';
8
8
  import { _isRingingPSTNParticipant, _updateUserDisplayNames } from './utils/callUtils';
9
9
  import { memoizedConvertAllremoteParticipants } from './utils/participantListSelectorUtils';
10
- /* @conditional-compile-remove(spotlight) */
11
- import { memoizedConvertAllremoteParticipantsBetaSpotlight } from './utils/participantListSelectorUtils';
12
10
  /* @conditional-compile-remove(reaction) */
13
11
  import { memoizedConvertToVideoTileReaction } from './utils/participantListSelectorUtils';
14
- /* @conditional-compile-remove(reaction) */
15
- import { memoizedConvertAllremoteParticipantsBeta } from './utils/participantListSelectorUtils';
16
12
  /* @conditional-compile-remove(spotlight) */
17
13
  import { memoizedSpotlight } from './utils/participantListSelectorUtils';
18
14
  import { getLocalParticipantRaisedHand } from './baseSelectors';
@@ -52,15 +48,13 @@ const convertRemoteParticipantsToParticipantListParticipants = (remoteParticipan
52
48
  let displayName = participant.displayName;
53
49
  /* @conditional-compile-remove(hide-attendee-name) */
54
50
  displayName = maskDisplayNameWithRole(displayName, localUserRole, participant.role, isHideAttendeeNamesEnabled);
51
+ let remoteParticipantReaction = undefined;
55
52
  /* @conditional-compile-remove(reaction) */
56
- const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);
57
- /* @conditional-compile-remove(spotlight) */
58
- const spotlight = memoizedSpotlight(spotlightedParticipants, toFlatCommunicationIdentifier(participant.identifier));
59
- return memoizeFn(toFlatCommunicationIdentifier(participant.identifier), displayName, state, participant.isMuted, isScreenSharing, participant.isSpeaking, participant.raisedHand, localUserCanRemoveOthers,
60
- /* @conditional-compile-remove(reaction) */
61
- remoteParticipantReaction,
53
+ remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);
54
+ let spotlight = undefined;
62
55
  /* @conditional-compile-remove(spotlight) */
63
- spotlight);
56
+ spotlight = memoizedSpotlight(spotlightedParticipants, toFlatCommunicationIdentifier(participant.identifier));
57
+ return memoizeFn(toFlatCommunicationIdentifier(participant.identifier), displayName, state, participant.isMuted, isScreenSharing, participant.isSpeaking, participant.raisedHand, localUserCanRemoveOthers, remoteParticipantReaction, spotlight);
64
58
  })
65
59
  .sort((a, b) => {
66
60
  var _a, _b;
@@ -77,10 +71,6 @@ const convertRemoteParticipantsToParticipantListParticipants = (remoteParticipan
77
71
  }
78
72
  }));
79
73
  };
80
- /* @conditional-compile-remove(spotlight) */
81
- return memoizedConvertAllremoteParticipantsBetaSpotlight(conversionCallback);
82
- /* @conditional-compile-remove(reaction) */
83
- return memoizedConvertAllremoteParticipantsBeta(conversionCallback);
84
74
  return memoizedConvertAllremoteParticipants(conversionCallback);
85
75
  };
86
76
  /**
@@ -112,11 +102,7 @@ localParticipantReactionState,
112
102
  spotlightCallFeature) => {
113
103
  const localUserCanRemoveOthers = localUserCanRemoveOthersTrampoline(role);
114
104
  const participants = remoteParticipants
115
- ? convertRemoteParticipantsToParticipantListParticipants(updateUserDisplayNamesTrampoline(Object.values(remoteParticipants)), localUserCanRemoveOthers,
116
- /* @conditional-compile-remove(hide-attendee-name) */
117
- isHideAttendeeNamesEnabled,
118
- /* @conditional-compile-remove(hide-attendee-name) */
119
- role,
105
+ ? convertRemoteParticipantsToParticipantListParticipants(updateUserDisplayNamesTrampoline(Object.values(remoteParticipants)), localUserCanRemoveOthers, undefined || /* @conditional-compile-remove(hide-attendee-name) */ isHideAttendeeNamesEnabled, undefined || /* @conditional-compile-remove(hide-attendee-name) */ role,
120
106
  /* @conditional-compile-remove(spotlight) */
121
107
  spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.spotlightedParticipants)
122
108
  : [];
@@ -1 +1 @@
1
- {"version":3,"file":"participantListSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/participantListSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EACL,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,UAAU,EAEX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,qDAAqD;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAC;AAC5F,4CAA4C;AAC5C,OAAO,EAAE,iDAAiD,EAAE,MAAM,sCAAsC,CAAC;AACzG,2CAA2C;AAC3C,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,2CAA2C;AAC3C,OAAO,EAAE,wCAAwC,EAAE,MAAM,sCAAsC,CAAC;AAChG,4CAA4C;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAChE,2CAA2C;AAC3C,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,4CAA4C;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAA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4CAA4C;QAC5C,SAAS,EAAE,iBAAiB,CAAC,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,uBAAuB,EAAE,MAAM,CAAC;KACpF,CAAC,CAAC;IACH,0DAA0D;IAC1D,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;IAC/C,OAAO;QACL,YAAY,EAAE,YAAY;QAC1B,QAAQ,EAAE,MAAM;QAChB,0DAA0D;QAC1D,qBAAqB,EAAE,qBAAqB;KAC7C,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,gCAAgC,GAAG,CAAC,kBAA4C,EAA4B,EAAE;IAClH,6CAA6C;IAC7C,OAAO,uBAAuB,CAAC,kBAAkB,CAAC,CAAC;IACnD,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAC;AAEF,MAAM,kCAAkC,GAAG,CAAC,IAAa,EAAW,EAAE;IACpE,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,CAAC;AAC1E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallClientState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { createSelector } from 'reselect';\nimport {\n getIdentifier,\n getDisplayName,\n getIsScreenSharingOn,\n getIsMuted,\n CallingBaseSelectorProps\n} from './baseSelectors';\nimport { getRole } from './baseSelectors';\n/* @conditional-compile-remove(hide-attendee-name) */\nimport { isHideAttendeeNamesEnabled } from './baseSelectors';\nimport { CallParticipantListParticipant } from '@internal/react-components';\nimport { _isRingingPSTNParticipant, _updateUserDisplayNames } from './utils/callUtils';\nimport { memoizedConvertAllremoteParticipants } from './utils/participantListSelectorUtils';\n/* @conditional-compile-remove(spotlight) */\nimport { memoizedConvertAllremoteParticipantsBetaSpotlight } from './utils/participantListSelectorUtils';\n/* @conditional-compile-remove(reaction) */\nimport { memoizedConvertToVideoTileReaction } from './utils/participantListSelectorUtils';\n/* @conditional-compile-remove(reaction) */\nimport { memoizedConvertAllremoteParticipantsBeta } from './utils/participantListSelectorUtils';\n/* @conditional-compile-remove(spotlight) */\nimport { memoizedSpotlight } from './utils/participantListSelectorUtils';\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\n/* @conditional-compile-remove(reaction) */\nimport { getLocalParticipantReactionState } from './baseSelectors';\n/* @conditional-compile-remove(spotlight) */\nimport { getSpotlightCallFeature } from './baseSelectors';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { getParticipantCount } from './baseSelectors';\nimport { isMicrosoftTeamsAppIdentifier, isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { ParticipantRole, SpotlightedParticipant } from '@azure/communication-calling';\n/* @conditional-compile-remove(hide-attendee-name) */\nimport { maskDisplayNameWithRole } from './utils/callUtils';\nimport { getRemoteParticipantsExcludingConsumers } from './getRemoteParticipantsExcludingConsumers';\n\nconst convertRemoteParticipantsToParticipantListParticipants = (\n remoteParticipants: RemoteParticipantState[],\n localUserCanRemoveOthers: boolean,\n isHideAttendeeNamesEnabled?: boolean,\n localUserRole?: ParticipantRole,\n spotlightedParticipants?: SpotlightedParticipant[]\n): CallParticipantListParticipant[] => {\n const conversionCallback = (\n memoizeFn: (...args: any[]) => CallParticipantListParticipant\n ): CallParticipantListParticipant[] => {\n return (\n remoteParticipants\n // Filter out MicrosoftBot participants\n .filter((participant: RemoteParticipantState) => {\n return !isMicrosoftTeamsAppIdentifier(participant.identifier);\n return true;\n })\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) => {\n return (\n !['InLobby', 'Idle', 'Connecting', 'Disconnected'].includes(participant.state) ||\n isPhoneNumberIdentifier(participant.identifier)\n );\n })\n .map((participant: RemoteParticipantState) => {\n const isScreenSharing = Object.values(participant.videoStreams).some(\n (videoStream) => videoStream.mediaStreamType === 'ScreenSharing' && videoStream.isAvailable\n );\n /**\n * We want to check the participant to see if they are a PSTN participant joining the call\n * and mapping their state to be 'Ringing'\n */\n const state = _isRingingPSTNParticipant(participant);\n let displayName = participant.displayName;\n /* @conditional-compile-remove(hide-attendee-name) */\n displayName = maskDisplayNameWithRole(\n displayName,\n localUserRole,\n participant.role,\n isHideAttendeeNamesEnabled\n );\n /* @conditional-compile-remove(reaction) */\n const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);\n /* @conditional-compile-remove(spotlight) */\n const spotlight = memoizedSpotlight(\n spotlightedParticipants,\n toFlatCommunicationIdentifier(participant.identifier)\n );\n return memoizeFn(\n toFlatCommunicationIdentifier(participant.identifier),\n displayName,\n state,\n participant.isMuted,\n isScreenSharing,\n participant.isSpeaking,\n participant.raisedHand,\n localUserCanRemoveOthers,\n /* @conditional-compile-remove(reaction) */\n remoteParticipantReaction,\n /* @conditional-compile-remove(spotlight) */\n spotlight\n );\n })\n .sort((a, b) => {\n const nameA = a.displayName?.toLowerCase() || '';\n const nameB = b.displayName?.toLowerCase() || '';\n if (nameA < nameB) {\n return -1;\n } else if (nameA > nameB) {\n return 1;\n } else {\n return 0;\n }\n })\n );\n };\n /* @conditional-compile-remove(spotlight) */\n return memoizedConvertAllremoteParticipantsBetaSpotlight(conversionCallback);\n /* @conditional-compile-remove(reaction) */\n return memoizedConvertAllremoteParticipantsBeta(conversionCallback);\n return memoizedConvertAllremoteParticipants(conversionCallback);\n};\n\n/**\n * Selector type for {@link ParticipantList} component.\n *\n * @public\n */\nexport type ParticipantListSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n participants: CallParticipantListParticipant[];\n myUserId: string;\n /* @conditional-compile-remove(total-participant-count) */\n totalParticipantCount?: number;\n};\n\n/**\n * Selects data that drives {@link ParticipantList} component.\n *\n * @public\n */\nexport const participantListSelector: ParticipantListSelector = createSelector(\n [\n getIdentifier,\n getDisplayName,\n getRemoteParticipantsExcludingConsumers,\n getIsScreenSharingOn,\n getIsMuted,\n getLocalParticipantRaisedHand,\n getRole,\n getParticipantCount,\n /* @conditional-compile-remove(hide-attendee-name) */\n isHideAttendeeNamesEnabled,\n /* @conditional-compile-remove(reaction) */\n getLocalParticipantReactionState,\n /* @conditional-compile-remove(spotlight) */\n getSpotlightCallFeature\n ],\n (\n userId,\n displayName,\n remoteParticipants,\n isScreenSharingOn,\n isMuted,\n raisedHand,\n role,\n partitipantCount,\n /* @conditional-compile-remove(hide-attendee-name) */\n isHideAttendeeNamesEnabled,\n /* @conditional-compile-remove(reaction) */\n localParticipantReactionState,\n /* @conditional-compile-remove(spotlight) */\n spotlightCallFeature\n ): {\n participants: CallParticipantListParticipant[];\n myUserId: string;\n totalParticipantCount?: number;\n } => {\n const localUserCanRemoveOthers = localUserCanRemoveOthersTrampoline(role);\n const participants = remoteParticipants\n ? convertRemoteParticipantsToParticipantListParticipants(\n updateUserDisplayNamesTrampoline(Object.values(remoteParticipants)),\n localUserCanRemoveOthers,\n /* @conditional-compile-remove(hide-attendee-name) */\n isHideAttendeeNamesEnabled,\n /* @conditional-compile-remove(hide-attendee-name) */\n role,\n /* @conditional-compile-remove(spotlight) */\n spotlightCallFeature?.spotlightedParticipants\n )\n : [];\n /* @conditional-compile-remove(reaction) */\n const localParticipantReaction = memoizedConvertToVideoTileReaction(localParticipantReactionState);\n participants.push({\n userId: userId,\n displayName: displayName,\n isScreenSharing: isScreenSharingOn,\n isMuted: isMuted,\n raisedHand: raisedHand,\n state: 'Connected',\n // Local participant can never remove themselves.\n isRemovable: false,\n /* @conditional-compile-remove(reaction) */\n reaction: localParticipantReaction,\n /* @conditional-compile-remove(spotlight) */\n spotlight: memoizedSpotlight(spotlightCallFeature?.spotlightedParticipants, userId)\n });\n /* @conditional-compile-remove(total-participant-count) */\n const totalParticipantCount = partitipantCount;\n return {\n participants: participants,\n myUserId: userId,\n /* @conditional-compile-remove(total-participant-count) */\n totalParticipantCount: totalParticipantCount\n };\n }\n);\n\nconst updateUserDisplayNamesTrampoline = (remoteParticipants: RemoteParticipantState[]): RemoteParticipantState[] => {\n /* @conditional-compile-remove(PSTN-calls) */\n return _updateUserDisplayNames(remoteParticipants);\n return remoteParticipants;\n};\n\nconst localUserCanRemoveOthersTrampoline = (role?: string): boolean => {\n return role === 'Presenter' || role === 'Unknown' || role === undefined;\n};\n"]}
1
+ {"version":3,"file":"participantListSelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/participantListSelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EACL,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,UAAU,EAEX,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,qDAAqD;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAE7D,OAAO,EAAE,yBAAyB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACvF,OAAO,EAAE,oCAAoC,EAAE,MAAM,sCAAsC,CAAC;AAC5F,2CAA2C;AAC3C,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,4CAA4C;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAChE,2CAA2C;AAC3C,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,4CAA4C;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAErG,qDAAqD;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AA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AACJ,CAAC,CACF,CAAC;AAEF,MAAM,gCAAgC,GAAG,CAAC,kBAA4C,EAA4B,EAAE;IAClH,6CAA6C;IAC7C,OAAO,uBAAuB,CAAC,kBAAkB,CAAC,CAAC;IACnD,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAC;AAEF,MAAM,kCAAkC,GAAG,CAAC,IAAa,EAAW,EAAE;IACpE,OAAO,IAAI,KAAK,WAAW,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,SAAS,CAAC;AAC1E,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { CallClientState, RemoteParticipantState } from '@internal/calling-stateful-client';\nimport { createSelector } from 'reselect';\nimport {\n getIdentifier,\n getDisplayName,\n getIsScreenSharingOn,\n getIsMuted,\n CallingBaseSelectorProps\n} from './baseSelectors';\nimport { getRole } from './baseSelectors';\n/* @conditional-compile-remove(hide-attendee-name) */\nimport { isHideAttendeeNamesEnabled } from './baseSelectors';\nimport { CallParticipantListParticipant } from '@internal/react-components';\nimport { _isRingingPSTNParticipant, _updateUserDisplayNames } from './utils/callUtils';\nimport { memoizedConvertAllremoteParticipants } from './utils/participantListSelectorUtils';\n/* @conditional-compile-remove(reaction) */\nimport { memoizedConvertToVideoTileReaction } from './utils/participantListSelectorUtils';\n/* @conditional-compile-remove(spotlight) */\nimport { memoizedSpotlight } from './utils/participantListSelectorUtils';\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\n/* @conditional-compile-remove(reaction) */\nimport { getLocalParticipantReactionState } from './baseSelectors';\n/* @conditional-compile-remove(spotlight) */\nimport { getSpotlightCallFeature } from './baseSelectors';\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { getParticipantCount } from './baseSelectors';\nimport { isMicrosoftTeamsAppIdentifier, isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { ParticipantRole, SpotlightedParticipant } from '@azure/communication-calling';\n/* @conditional-compile-remove(hide-attendee-name) */\nimport { maskDisplayNameWithRole } from './utils/callUtils';\nimport { getRemoteParticipantsExcludingConsumers } from './getRemoteParticipantsExcludingConsumers';\n\nconst convertRemoteParticipantsToParticipantListParticipants = (\n remoteParticipants: RemoteParticipantState[],\n localUserCanRemoveOthers: boolean,\n isHideAttendeeNamesEnabled?: boolean,\n localUserRole?: ParticipantRole,\n spotlightedParticipants?: SpotlightedParticipant[]\n): CallParticipantListParticipant[] => {\n const conversionCallback = (\n memoizeFn: (...args: any[]) => CallParticipantListParticipant\n ): CallParticipantListParticipant[] => {\n return (\n remoteParticipants\n // Filter out MicrosoftBot participants\n .filter((participant: RemoteParticipantState) => {\n return !isMicrosoftTeamsAppIdentifier(participant.identifier);\n return true;\n })\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) => {\n return (\n !['InLobby', 'Idle', 'Connecting', 'Disconnected'].includes(participant.state) ||\n isPhoneNumberIdentifier(participant.identifier)\n );\n })\n .map((participant: RemoteParticipantState) => {\n const isScreenSharing = Object.values(participant.videoStreams).some(\n (videoStream) => videoStream.mediaStreamType === 'ScreenSharing' && videoStream.isAvailable\n );\n /**\n * We want to check the participant to see if they are a PSTN participant joining the call\n * and mapping their state to be 'Ringing'\n */\n const state = _isRingingPSTNParticipant(participant);\n let displayName = participant.displayName;\n /* @conditional-compile-remove(hide-attendee-name) */\n displayName = maskDisplayNameWithRole(\n displayName,\n localUserRole,\n participant.role,\n isHideAttendeeNamesEnabled\n );\n let remoteParticipantReaction = undefined;\n /* @conditional-compile-remove(reaction) */\n remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);\n let spotlight = undefined;\n /* @conditional-compile-remove(spotlight) */\n spotlight = memoizedSpotlight(spotlightedParticipants, toFlatCommunicationIdentifier(participant.identifier));\n return memoizeFn(\n toFlatCommunicationIdentifier(participant.identifier),\n displayName,\n state,\n participant.isMuted,\n isScreenSharing,\n participant.isSpeaking,\n participant.raisedHand,\n localUserCanRemoveOthers,\n remoteParticipantReaction,\n spotlight\n );\n })\n .sort((a, b) => {\n const nameA = a.displayName?.toLowerCase() || '';\n const nameB = b.displayName?.toLowerCase() || '';\n if (nameA < nameB) {\n return -1;\n } else if (nameA > nameB) {\n return 1;\n } else {\n return 0;\n }\n })\n );\n };\n return memoizedConvertAllremoteParticipants(conversionCallback);\n};\n\n/**\n * Selector type for {@link ParticipantList} component.\n *\n * @public\n */\nexport type ParticipantListSelector = (\n state: CallClientState,\n props: CallingBaseSelectorProps\n) => {\n participants: CallParticipantListParticipant[];\n myUserId: string;\n /* @conditional-compile-remove(total-participant-count) */\n totalParticipantCount?: number;\n};\n\n/**\n * Selects data that drives {@link ParticipantList} component.\n *\n * @public\n */\nexport const participantListSelector: ParticipantListSelector = createSelector(\n [\n getIdentifier,\n getDisplayName,\n getRemoteParticipantsExcludingConsumers,\n getIsScreenSharingOn,\n getIsMuted,\n getLocalParticipantRaisedHand,\n getRole,\n getParticipantCount,\n /* @conditional-compile-remove(hide-attendee-name) */\n isHideAttendeeNamesEnabled,\n /* @conditional-compile-remove(reaction) */\n getLocalParticipantReactionState,\n /* @conditional-compile-remove(spotlight) */\n getSpotlightCallFeature\n ],\n (\n userId,\n displayName,\n remoteParticipants,\n isScreenSharingOn,\n isMuted,\n raisedHand,\n role,\n partitipantCount,\n /* @conditional-compile-remove(hide-attendee-name) */\n isHideAttendeeNamesEnabled,\n /* @conditional-compile-remove(reaction) */\n localParticipantReactionState,\n /* @conditional-compile-remove(spotlight) */\n spotlightCallFeature\n ): {\n participants: CallParticipantListParticipant[];\n myUserId: string;\n totalParticipantCount?: number;\n } => {\n const localUserCanRemoveOthers = localUserCanRemoveOthersTrampoline(role);\n const participants = remoteParticipants\n ? convertRemoteParticipantsToParticipantListParticipants(\n updateUserDisplayNamesTrampoline(Object.values(remoteParticipants)),\n localUserCanRemoveOthers,\n undefined || /* @conditional-compile-remove(hide-attendee-name) */ isHideAttendeeNamesEnabled,\n undefined || /* @conditional-compile-remove(hide-attendee-name) */ role,\n /* @conditional-compile-remove(spotlight) */\n spotlightCallFeature?.spotlightedParticipants\n )\n : [];\n /* @conditional-compile-remove(reaction) */\n const localParticipantReaction = memoizedConvertToVideoTileReaction(localParticipantReactionState);\n participants.push({\n userId: userId,\n displayName: displayName,\n isScreenSharing: isScreenSharingOn,\n isMuted: isMuted,\n raisedHand: raisedHand,\n state: 'Connected',\n // Local participant can never remove themselves.\n isRemovable: false,\n /* @conditional-compile-remove(reaction) */\n reaction: localParticipantReaction,\n /* @conditional-compile-remove(spotlight) */\n spotlight: memoizedSpotlight(spotlightCallFeature?.spotlightedParticipants, userId)\n });\n /* @conditional-compile-remove(total-participant-count) */\n const totalParticipantCount = partitipantCount;\n return {\n participants: participants,\n myUserId: userId,\n /* @conditional-compile-remove(total-participant-count) */\n totalParticipantCount: totalParticipantCount\n };\n }\n);\n\nconst updateUserDisplayNamesTrampoline = (remoteParticipants: RemoteParticipantState[]): RemoteParticipantState[] => {\n /* @conditional-compile-remove(PSTN-calls) */\n return _updateUserDisplayNames(remoteParticipants);\n return remoteParticipants;\n};\n\nconst localUserCanRemoveOthersTrampoline = (role?: string): boolean => {\n return role === 'Presenter' || role === 'Unknown' || role === undefined;\n};\n"]}
@@ -8,15 +8,7 @@ import { Reaction } from "../../../react-components/src";
8
8
  /**
9
9
  * @private
10
10
  */
11
- export declare const memoizedConvertAllremoteParticipants: (callback: import("../../../acs-ui-common/src").CallbackType<string, [displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, raisedHand: RaisedHandState | undefined, localUserCanRemoveOthers: boolean], CallParticipantListParticipant>) => CallParticipantListParticipant[];
12
- /**
13
- * @private
14
- */
15
- export declare const memoizedConvertAllremoteParticipantsBeta: (callback: import("../../../acs-ui-common/src").CallbackType<string, [displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, raisedHand: RaisedHandState | undefined, localUserCanRemoveOthers: boolean, reaction: Reaction | undefined], CallParticipantListParticipant>) => CallParticipantListParticipant[];
16
- /**
17
- * @private
18
- */
19
- export declare const memoizedConvertAllremoteParticipantsBetaSpotlight: (callback: import("../../../acs-ui-common/src").CallbackType<string, [displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, raisedHand: RaisedHandState | undefined, localUserCanRemoveOthers: boolean, reaction: Reaction | undefined, isSpotlighted: Spotlight | undefined], CallParticipantListParticipant>) => CallParticipantListParticipant[];
11
+ export declare const memoizedConvertAllremoteParticipants: (callback: import("../../../acs-ui-common/src").CallbackType<string, [displayName: string | undefined, state: RemoteParticipantState, isMuted: boolean, isScreenSharing: boolean, isSpeaking: boolean, raisedHand: RaisedHandState | undefined, localUserCanRemoveOthers: boolean, reaction: Reaction | undefined, spotlight: Spotlight | undefined], CallParticipantListParticipant>) => CallParticipantListParticipant[];
20
12
  /**
21
13
  * @private
22
14
  */
@@ -4,9 +4,9 @@ import { getIdentifierKind } from '@azure/communication-common';
4
4
  import { fromFlatCommunicationIdentifier, memoizeFnAll } from "../../../acs-ui-common/src";
5
5
  /* @conditional-compile-remove(spotlight) */
6
6
  import { toFlatCommunicationIdentifier } from "../../../acs-ui-common/src";
7
- /* @conditional-compile-remove(reaction) */
7
+ /* @conditional-compile-remove(reaction) */ /* @conditional-compile-remove(spotlight) */
8
8
  import memoizeOne from 'memoize-one';
9
- const convertRemoteParticipantToParticipantListParticipant = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers) => {
9
+ const convertRemoteParticipantToParticipantListParticipant = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction, spotlight) => {
10
10
  const identifier = fromFlatCommunicationIdentifier(userId);
11
11
  return {
12
12
  userId,
@@ -15,32 +15,21 @@ const convertRemoteParticipantToParticipantListParticipant = (userId, displayNam
15
15
  isMuted,
16
16
  isScreenSharing,
17
17
  isSpeaking,
18
+ raisedHand,
18
19
  // ACS users can not remove Teams users.
19
20
  // Removing unknown types of users is undefined.
20
21
  isRemovable: (getIdentifierKind(identifier).kind === 'communicationUser' ||
21
22
  getIdentifierKind(identifier).kind === 'phoneNumber') &&
22
- localUserCanRemoveOthers
23
+ localUserCanRemoveOthers,
24
+ /* @conditional-compile-remove(reaction) */ reaction,
25
+ /* @conditional-compile-remove(spotlight) */ spotlight
23
26
  };
24
27
  };
25
28
  /**
26
29
  * @private
27
30
  */
28
- export const memoizedConvertAllremoteParticipants = memoizeFnAll((userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers) => {
29
- return convertRemoteParticipantToParticipantListParticipantBetaRelease(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers);
30
- });
31
- /* @conditional-compile-remove(reaction) */
32
- /**
33
- * @private
34
- */
35
- export const memoizedConvertAllremoteParticipantsBeta = memoizeFnAll((userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction) => {
36
- return convertRemoteParticipantToParticipantListParticipantBeta(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction);
37
- });
38
- /* @conditional-compile-remove(spotlight) */
39
- /**
40
- * @private
41
- */
42
- export const memoizedConvertAllremoteParticipantsBetaSpotlight = memoizeFnAll((userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction, isSpotlighted) => {
43
- return convertRemoteParticipantToParticipantListParticipantBetaSpotlight(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction, isSpotlighted);
31
+ export const memoizedConvertAllremoteParticipants = memoizeFnAll((userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction, spotlight) => {
32
+ return convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction, spotlight);
44
33
  });
45
34
  /* @conditional-compile-remove(reaction) */
46
35
  /**
@@ -62,16 +51,4 @@ export const memoizedSpotlight = memoizeOne((spotlightedParticipants, userId) =>
62
51
  const spotlightOrder = spotlightedParticipants === null || spotlightedParticipants === void 0 ? void 0 : spotlightedParticipants.find((spotlightedParticipant) => toFlatCommunicationIdentifier(spotlightedParticipant.identifier) === userId);
63
52
  return spotlightOrder ? { spotlightedOrderPosition: spotlightOrder.order } : undefined;
64
53
  });
65
- const convertRemoteParticipantToParticipantListParticipantBetaRelease = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers) => {
66
- return Object.assign({}, convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers));
67
- };
68
- /* @conditional-compile-remove(reaction) */
69
- const convertRemoteParticipantToParticipantListParticipantBeta = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction) => {
70
- return Object.assign(Object.assign({}, convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers)), { reaction });
71
- };
72
- /* @conditional-compile-remove(spotlight) */
73
- const convertRemoteParticipantToParticipantListParticipantBetaSpotlight = (userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers, reaction, spotlight) => {
74
- return Object.assign(Object.assign({}, convertRemoteParticipantToParticipantListParticipant(userId, displayName, state, isMuted, isScreenSharing, isSpeaking, raisedHand, localUserCanRemoveOthers)), { reaction,
75
- spotlight });
76
- };
77
54
  //# sourceMappingURL=participantListSelectorUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"participantListSelectorUtils.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/utils/participantListSelectorUtils.ts"],"names":[],"m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AC,EAAE,wBAAwB,EAAE,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACzF,CAAC,CACF,CAAC;AAEF,MAAM,+DAA+D,GAAG,CACtE,MAAc,EACd,WAA+B,EAC/B,KAA6B,EAC7B,OAAgB,EAChB,eAAwB,EACxB,UAAmB,EACnB,UAAuC,EACvC,wBAAiC,EACD,EAAE;IAClC,yBACK,oDAAoD,CACrD,MAAM,EACN,WAAW,EACX,KAAK,EACL,OAAO,EACP,eAAe,EACf,UAAU,EACV,UAAU,EACV,wBAAwB,CACzB,EACD;AACJ,CAAC,CAAC;AAEF,2CAA2C;AAC3C,MAAM,wDAAwD,GAAG,CAC/D,MAAc,EACd,WAA+B,EAC/B,KAA6B,EAC7B,OAAgB,EAChB,eAAwB,EACxB,UAAmB,EACnB,UAAuC,EACvC,wBAAiC,EACjC,QAA8B,EACE,EAAE;IAClC,uCACK,oDAAoD,CACrD,MAAM,EACN,WAAW,EACX,KAAK,EACL,OAAO,EACP,eAAe,EACf,UAAU,EACV,UAAU,EACV,wBAAwB,CACzB,KACD,QAAQ,IACR;AACJ,CAAC,CAAC;AAEF,4CAA4C;AAC5C,MAAM,iEAAiE,GAAG,CACxE,MAAc,EACd,WAA+B,EAC/B,KAA6B,EAC7B,OAAgB,EAChB,eAAwB,EACxB,UAAmB,EACnB,UAAuC,EACvC,wBAAiC,EACjC,QAA8B,EAC9B,SAAgC,EACA,EAAE;IAClC,uCACK,oDAAoD,CACrD,MAAM,EACN,WAAW,EACX,KAAK,EACL,OAAO,EACP,eAAe,EACf,UAAU,EACV,UAAU,EACV,wBAAwB,CACzB,KACD,QAAQ;QACR,SAAS,IACT;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RemoteParticipantState } from '@azure/communication-calling';\n/* @conditional-compile-remove(spotlight) */\nimport { SpotlightedParticipant } from '@azure/communication-calling';\nimport { getIdentifierKind } from '@azure/communication-common';\nimport { fromFlatCommunicationIdentifier, memoizeFnAll } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(spotlight) */\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CallParticipantListParticipant } from '@internal/react-components';\n/* @conditional-compile-remove(spotlight) */\nimport { Spotlight } from '@internal/react-components';\nimport { RaisedHandState } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(reaction) */\nimport { ReactionState } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(reaction) */\nimport { Reaction } from '@internal/react-components';\n/* @conditional-compile-remove(reaction) */\nimport memoizeOne from 'memoize-one';\n\nconst convertRemoteParticipantToParticipantListParticipant = (\n userId: string,\n displayName: string | undefined,\n state: RemoteParticipantState,\n isMuted: boolean,\n isScreenSharing: boolean,\n isSpeaking: boolean,\n raisedHand: RaisedHandState | undefined,\n localUserCanRemoveOthers: boolean\n): CallParticipantListParticipant => {\n const identifier = fromFlatCommunicationIdentifier(userId);\n return {\n userId,\n displayName,\n state,\n isMuted,\n isScreenSharing,\n isSpeaking,\n // ACS users can not remove Teams users.\n // Removing unknown types of users is undefined.\n isRemovable:\n (getIdentifierKind(identifier).kind === 'communicationUser' ||\n getIdentifierKind(identifier).kind === 'phoneNumber') &&\n localUserCanRemoveOthers\n };\n};\n\n/**\n * @private\n */\nexport const memoizedConvertAllremoteParticipants = memoizeFnAll(\n (\n userId: string,\n displayName: string | undefined,\n state: RemoteParticipantState,\n isMuted: boolean,\n isScreenSharing: boolean,\n isSpeaking: boolean,\n raisedHand: RaisedHandState | undefined,\n localUserCanRemoveOthers: boolean\n ): CallParticipantListParticipant => {\n return convertRemoteParticipantToParticipantListParticipantBetaRelease(\n userId,\n displayName,\n state,\n isMuted,\n isScreenSharing,\n isSpeaking,\n raisedHand,\n localUserCanRemoveOthers\n );\n }\n);\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const memoizedConvertAllremoteParticipantsBeta = memoizeFnAll(\n (\n userId: string,\n displayName: string | undefined,\n state: RemoteParticipantState,\n isMuted: boolean,\n isScreenSharing: boolean,\n isSpeaking: boolean,\n raisedHand: RaisedHandState | undefined,\n localUserCanRemoveOthers: boolean,\n reaction: Reaction | undefined\n ): CallParticipantListParticipant => {\n return convertRemoteParticipantToParticipantListParticipantBeta(\n userId,\n displayName,\n state,\n isMuted,\n isScreenSharing,\n isSpeaking,\n raisedHand,\n localUserCanRemoveOthers,\n reaction\n );\n }\n);\n\n/* @conditional-compile-remove(spotlight) */\n/**\n * @private\n */\nexport const memoizedConvertAllremoteParticipantsBetaSpotlight = memoizeFnAll(\n (\n userId: string,\n displayName: string | undefined,\n state: RemoteParticipantState,\n isMuted: boolean,\n isScreenSharing: boolean,\n isSpeaking: boolean,\n raisedHand: RaisedHandState | undefined,\n localUserCanRemoveOthers: boolean,\n reaction: Reaction | undefined,\n isSpotlighted: Spotlight | undefined\n ): CallParticipantListParticipant => {\n return convertRemoteParticipantToParticipantListParticipantBetaSpotlight(\n userId,\n displayName,\n state,\n isMuted,\n isScreenSharing,\n isSpeaking,\n raisedHand,\n localUserCanRemoveOthers,\n reaction,\n isSpotlighted\n );\n }\n);\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const memoizedConvertToVideoTileReaction = memoizeOne(\n (reactionState: ReactionState | undefined): Reaction | undefined => {\n return reactionState && reactionState.reactionMessage\n ? {\n reactionType: reactionState.reactionMessage.reactionType,\n receivedOn: reactionState.receivedOn\n }\n : undefined;\n }\n);\n\n/* @conditional-compile-remove(spotlight) */\n/**\n * @private\n */\nexport const memoizedSpotlight = memoizeOne(\n (spotlightedParticipants: SpotlightedParticipant[] | undefined, userId: string): Spotlight | undefined => {\n const spotlightOrder = spotlightedParticipants?.find(\n (spotlightedParticipant) => toFlatCommunicationIdentifier(spotlightedParticipant.identifier) === userId\n );\n return spotlightOrder ? { spotlightedOrderPosition: spotlightOrder.order } : undefined;\n }\n);\n\nconst convertRemoteParticipantToParticipantListParticipantBetaRelease = (\n userId: string,\n displayName: string | undefined,\n state: RemoteParticipantState,\n isMuted: boolean,\n isScreenSharing: boolean,\n isSpeaking: boolean,\n raisedHand: RaisedHandState | undefined,\n localUserCanRemoveOthers: boolean\n): CallParticipantListParticipant => {\n return {\n ...convertRemoteParticipantToParticipantListParticipant(\n userId,\n displayName,\n state,\n isMuted,\n isScreenSharing,\n isSpeaking,\n raisedHand,\n localUserCanRemoveOthers\n )\n };\n};\n\n/* @conditional-compile-remove(reaction) */\nconst convertRemoteParticipantToParticipantListParticipantBeta = (\n userId: string,\n displayName: string | undefined,\n state: RemoteParticipantState,\n isMuted: boolean,\n isScreenSharing: boolean,\n isSpeaking: boolean,\n raisedHand: RaisedHandState | undefined,\n localUserCanRemoveOthers: boolean,\n reaction: Reaction | undefined\n): CallParticipantListParticipant => {\n return {\n ...convertRemoteParticipantToParticipantListParticipant(\n userId,\n displayName,\n state,\n isMuted,\n isScreenSharing,\n isSpeaking,\n raisedHand,\n localUserCanRemoveOthers\n ),\n reaction\n };\n};\n\n/* @conditional-compile-remove(spotlight) */\nconst convertRemoteParticipantToParticipantListParticipantBetaSpotlight = (\n userId: string,\n displayName: string | undefined,\n state: RemoteParticipantState,\n isMuted: boolean,\n isScreenSharing: boolean,\n isSpeaking: boolean,\n raisedHand: RaisedHandState | undefined,\n localUserCanRemoveOthers: boolean,\n reaction: Reaction | undefined,\n spotlight: Spotlight | undefined\n): CallParticipantListParticipant => {\n return {\n ...convertRemoteParticipantToParticipantListParticipant(\n userId,\n displayName,\n state,\n isMuted,\n isScreenSharing,\n isSpeaking,\n raisedHand,\n localUserCanRemoveOthers\n ),\n reaction,\n spotlight\n };\n};\n"]}
1
+ {"version":3,"file":"participantListSelectorUtils.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/utils/participantListSelectorUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EA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IACjE,OAAO,aAAa,IAAI,aAAa,CAAC,eAAe;QACnD,CAAC,CAAC;YACE,YAAY,EAAE,aAAa,CAAC,eAAe,CAAC,YAAY;YACxD,UAAU,EAAE,aAAa,CAAC,UAAU;SACrC;QACH,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC,CACF,CAAC;AAEF,4CAA4C;AAC5C;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CACzC,CAAC,uBAA6D,EAAE,MAAc,EAAyB,EAAE;IACvG,MAAM,cAAc,GAAG,uBAAuB,aAAvB,uBAAuB,uBAAvB,uBAAuB,CAAE,IAAI,CAClD,CAAC,sBAAsB,EAAE,EAAE,CAAC,6BAA6B,CAAC,sBAAsB,CAAC,UAAU,CAAC,KAAK,MAAM,CACxG,CAAC;IACF,OAAO,cAAc,CAAC,CAAC,CAAC,EAAE,wBAAwB,EAAE,cAAc,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AACzF,CAAC,CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { RemoteParticipantState } from '@azure/communication-calling';\n/* @conditional-compile-remove(spotlight) */\nimport { SpotlightedParticipant } from '@azure/communication-calling';\nimport { getIdentifierKind } from '@azure/communication-common';\nimport { fromFlatCommunicationIdentifier, memoizeFnAll } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(spotlight) */\nimport { toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { CallParticipantListParticipant } from '@internal/react-components';\n/* @conditional-compile-remove(spotlight) */\nimport { Spotlight } from '@internal/react-components';\nimport { RaisedHandState } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(reaction) */\nimport { ReactionState } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(reaction) */\nimport { Reaction } from '@internal/react-components';\n/* @conditional-compile-remove(reaction) */ /* @conditional-compile-remove(spotlight) */\nimport memoizeOne from 'memoize-one';\n\nconst convertRemoteParticipantToParticipantListParticipant = (\n userId: string,\n displayName: string | undefined,\n state: RemoteParticipantState,\n isMuted: boolean,\n isScreenSharing: boolean,\n isSpeaking: boolean,\n raisedHand: RaisedHandState | undefined,\n localUserCanRemoveOthers: boolean,\n reaction: undefined | /* @conditional-compile-remove(reaction) */ Reaction,\n spotlight: undefined | /* @conditional-compile-remove(spotlight) */ Spotlight\n): CallParticipantListParticipant => {\n const identifier = fromFlatCommunicationIdentifier(userId);\n return {\n userId,\n displayName,\n state,\n isMuted,\n isScreenSharing,\n isSpeaking,\n raisedHand,\n // ACS users can not remove Teams users.\n // Removing unknown types of users is undefined.\n isRemovable:\n (getIdentifierKind(identifier).kind === 'communicationUser' ||\n getIdentifierKind(identifier).kind === 'phoneNumber') &&\n localUserCanRemoveOthers,\n /* @conditional-compile-remove(reaction) */ reaction,\n /* @conditional-compile-remove(spotlight) */ spotlight\n };\n};\n\n/**\n * @private\n */\nexport const memoizedConvertAllremoteParticipants = memoizeFnAll(\n (\n userId: string,\n displayName: string | undefined,\n state: RemoteParticipantState,\n isMuted: boolean,\n isScreenSharing: boolean,\n isSpeaking: boolean,\n raisedHand: RaisedHandState | undefined,\n localUserCanRemoveOthers: boolean,\n reaction: undefined | /* @conditional-compile-remove(reaction) */ Reaction,\n spotlight: undefined | /* @conditional-compile-remove(spotlight) */ Spotlight\n ): CallParticipantListParticipant => {\n return convertRemoteParticipantToParticipantListParticipant(\n userId,\n displayName,\n state,\n isMuted,\n isScreenSharing,\n isSpeaking,\n raisedHand,\n localUserCanRemoveOthers,\n reaction,\n spotlight\n );\n }\n);\n\n/* @conditional-compile-remove(reaction) */\n/**\n * @private\n */\nexport const memoizedConvertToVideoTileReaction = memoizeOne(\n (reactionState: ReactionState | undefined): Reaction | undefined => {\n return reactionState && reactionState.reactionMessage\n ? {\n reactionType: reactionState.reactionMessage.reactionType,\n receivedOn: reactionState.receivedOn\n }\n : undefined;\n }\n);\n\n/* @conditional-compile-remove(spotlight) */\n/**\n * @private\n */\nexport const memoizedSpotlight = memoizeOne(\n (spotlightedParticipants: SpotlightedParticipant[] | undefined, userId: string): Spotlight | undefined => {\n const spotlightOrder = spotlightedParticipants?.find(\n (spotlightedParticipant) => toFlatCommunicationIdentifier(spotlightedParticipant.identifier) === userId\n );\n return spotlightOrder ? { spotlightedOrderPosition: spotlightOrder.order } : undefined;\n }\n);\n"]}
@@ -2,6 +2,7 @@ import { DominantSpeakersInfo, RemoteParticipantState as RemoteParticipantConnec
2
2
  import { ParticipantRole } from '@azure/communication-calling';
3
3
  import { RemoteParticipantState, RemoteVideoStreamState } from "../../../calling-stateful-client/src";
4
4
  import { VideoGalleryRemoteParticipant } from "../../../react-components/src";
5
+ import { RaisedHandState } from "../../../calling-stateful-client/src";
5
6
  /** @internal */
6
7
  export declare const _dominantSpeakersWithFlatId: (dominantSpeakers?: DominantSpeakersInfo) => undefined | string[];
7
8
  /** @internal */
@@ -11,7 +12,7 @@ export declare const _videoGalleryRemoteParticipantsMemo: _VideoGalleryRemotePar
11
12
  /** @private */
12
13
  export declare const convertRemoteParticipantToVideoGalleryRemoteParticipant: (userId: string, isMuted: boolean, isSpeaking: boolean, videoStreams: {
13
14
  [key: number]: RemoteVideoStreamState;
14
- }, state: RemoteParticipantConnectionState, displayName?: string, raisedHand?: unknown, contentSharingStream?: HTMLElement, reaction?: unknown, spotlight?: unknown) => VideoGalleryRemoteParticipant;
15
+ }, state: RemoteParticipantConnectionState, displayName?: string, raisedHand?: RaisedHandState, contentSharingStream?: HTMLElement, reaction?: unknown, spotlight?: unknown) => VideoGalleryRemoteParticipant;
15
16
  /** @private */
16
17
  export declare const memoizeLocalParticipant: (this: any, identifier: any, displayName: any, isMuted: any, isScreenSharingOn: any, localVideoStream: any, role: any, raisedHand: any, reaction: any, localSpotlight: any, capabilities: any) => {
17
18
  userId: any;
@@ -35,41 +35,24 @@ export const _videoGalleryRemoteParticipantsMemo = (remoteParticipants, isHideAt
35
35
  let displayName = participant.displayName;
36
36
  /* @conditional-compile-remove(hide-attendee-name) */
37
37
  displayName = maskDisplayNameWithRole(displayName, localUserRole, participant.role, isHideAttendeeNamesEnabled);
38
- /* @conditional-compile-remove(reaction) */
39
- const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);
40
- return memoizedFn(toFlatCommunicationIdentifier(participant.identifier), participant.isMuted, checkIsSpeaking(participant), participant.videoStreams, state, displayName, participant.raisedHand,
38
+ let contentSharingStream = undefined;
41
39
  /* @conditional-compile-remove(ppt-live) */
42
- participant.contentSharingStream,
43
- /* @conditional-compile-remove(reaction) */
44
- remoteParticipantReaction,
45
- /* @conditional-compile-remove(spotlight) */
46
- participant.spotlight);
40
+ contentSharingStream = participant.contentSharingStream;
41
+ let remoteParticipantReaction = undefined;
42
+ /* @conditional-compile-remove(reaction) */ remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);
43
+ let spotlight = undefined;
44
+ /* @conditional-compile-remove(spotlight) */ spotlight = participant.spotlight;
45
+ return memoizedFn(toFlatCommunicationIdentifier(participant.identifier), participant.isMuted, checkIsSpeaking(participant), participant.videoStreams, state, displayName, participant.raisedHand, contentSharingStream, remoteParticipantReaction, spotlight);
47
46
  }));
48
47
  });
49
48
  };
50
- const memoizedAllConvertRemoteParticipant = memoizeFnAll((userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, // temp unknown type to build stable
51
- /* @conditional-compile-remove(ppt-live) */
52
- contentSharingStream,
53
- /* @conditional-compile-remove(reaction) */
54
- reaction, // temp unknown type to build stable
55
- /* @conditional-compile-remove(spotlight) */
49
+ const memoizedAllConvertRemoteParticipant = memoizeFnAll((userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, // temp unknown type to build stable
56
50
  spotlight // temp unknown type to build stable
57
51
  ) => {
58
- return convertRemoteParticipantToVideoGalleryRemoteParticipant(userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand,
59
- /* @conditional-compile-remove(ppt-live) */
60
- contentSharingStream,
61
- /* @conditional-compile-remove(reaction) */
62
- reaction,
63
- /* @conditional-compile-remove(spotlight) */
64
- spotlight);
52
+ return convertRemoteParticipantToVideoGalleryRemoteParticipant(userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, spotlight);
65
53
  });
66
54
  /** @private */
67
- export const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, // temp unknown type to build stable
68
- /* @conditional-compile-remove(ppt-live) */
69
- contentSharingStream,
70
- /* @conditional-compile-remove(reaction) */
71
- reaction, // temp unknown type to build stable
72
- /* @conditional-compile-remove(spotlight) */
55
+ export const convertRemoteParticipantToVideoGalleryRemoteParticipant = (userId, isMuted, isSpeaking, videoStreams, state, displayName, raisedHand, contentSharingStream, reaction, // temp unknown type to build stable
73
56
  spotlight // temp unknown type to build stable
74
57
  ) => {
75
58
  const rawVideoStreamsArray = Object.values(videoStreams);
@@ -107,7 +90,7 @@ spotlight // temp unknown type to build stable
107
90
  /* @conditional-compile-remove(one-to-n-calling) */
108
91
  /* @conditional-compile-remove(PSTN-calls) */
109
92
  state,
110
- raisedHand: raisedHand,
93
+ raisedHand,
111
94
  /* @conditional-compile-remove(reaction) */
112
95
  reaction: reaction,
113
96
  /* @conditional-compile-remove(spotlight) */
@@ -1 +1 @@
1
- {"version":3,"file":"videoGalleryUtils.js","sourceRoot":"","sources":["../../../../../../calling-component-bindings/src/utils/videoGalleryUtils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAUlC,OAAO,EAAE,YAAY,EAAE,6BAA6B,EAAE,mCAAgC;AAGtF,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,qDAAqD;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,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BAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,0CAAE,UAAU;YAC9C,aAAa,EAAE,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,0CAAE,MAAM;SAC9C;QACD,IAAI;QACJ,UAAU,EAAE,UAAU;QACtB,2CAA2C;QAC3C,QAAQ,EAAE,QAAQ;QAClB,4CAA4C;QAC5C,SAAS,EAAE,cAAc;QACzB,4CAA4C;QAC5C,YAAY;KACb,CAAC,CAAA;CAAA,CACH,CAAC;AAEF,4CAA4C;AAC5C,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 {\n DominantSpeakersInfo,\n RemoteParticipantState as RemoteParticipantConnectionState\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(spotlight) */\nimport { SpotlightedParticipant } from '@azure/communication-calling';\n/* @conditional-compile-remove(hide-attendee-name) */\nimport { ParticipantRole } from '@azure/communication-calling';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { RemoteParticipantState, RemoteVideoStreamState } from '@internal/calling-stateful-client';\nimport { VideoGalleryRemoteParticipant, VideoGalleryStream } from '@internal/react-components';\nimport memoizeOne from 'memoize-one';\nimport { _isRingingPSTNParticipant } from './callUtils';\n/* @conditional-compile-remove(hide-attendee-name) */\nimport { maskDisplayNameWithRole } from './callUtils';\nimport { checkIsSpeaking } from './SelectorUtils';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { RaisedHandState } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(reaction) */\nimport { Reaction } from '@internal/react-components';\n/* @conditional-compile-remove(reaction) */\nimport { memoizedConvertToVideoTileReaction } from './participantListSelectorUtils';\n/* @conditional-compile-remove(spotlight) */\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 /* @conditional-compile-remove(hide-attendee-name) */\n isHideAttendeeNamesEnabled?: boolean,\n /* @conditional-compile-remove(hide-attendee-name) */\n localUserRole?: ParticipantRole\n) => VideoGalleryRemoteParticipant[];\n\n/** @internal */\nexport const _videoGalleryRemoteParticipantsMemo: _VideoGalleryRemoteParticipantsMemoFn = (\n remoteParticipants: RemoteParticipantState[] | undefined,\n isHideAttendeeNamesEnabled?: boolean,\n /* @conditional-compile-remove(hide-attendee-name) */ 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 = _isRingingPSTNParticipant(participant);\n let displayName = participant.displayName;\n /* @conditional-compile-remove(hide-attendee-name) */\n displayName = maskDisplayNameWithRole(\n displayName,\n localUserRole,\n participant.role,\n isHideAttendeeNamesEnabled\n );\n /* @conditional-compile-remove(reaction) */\n const remoteParticipantReaction = memoizedConvertToVideoTileReaction(participant.reactionState);\n return memoizedFn(\n toFlatCommunicationIdentifier(participant.identifier),\n participant.isMuted,\n checkIsSpeaking(participant),\n participant.videoStreams,\n state,\n displayName,\n participant.raisedHand,\n /* @conditional-compile-remove(ppt-live) */\n participant.contentSharingStream,\n /* @conditional-compile-remove(reaction) */\n remoteParticipantReaction,\n /* @conditional-compile-remove(spotlight) */\n participant.spotlight\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: RemoteParticipantConnectionState,\n displayName?: string,\n raisedHand?: unknown, // temp unknown type to build stable\n /* @conditional-compile-remove(ppt-live) */\n contentSharingStream?: HTMLElement,\n /* @conditional-compile-remove(reaction) */\n reaction?: unknown, // temp unknown type to build stable\n /* @conditional-compile-remove(spotlight) */\n spotlight?: unknown // temp unknown type to build stable\n ): VideoGalleryRemoteParticipant => {\n return convertRemoteParticipantToVideoGalleryRemoteParticipant(\n userId,\n isMuted,\n isSpeaking,\n videoStreams,\n state,\n displayName,\n raisedHand as RaisedHandState,\n /* @conditional-compile-remove(ppt-live) */\n contentSharingStream,\n /* @conditional-compile-remove(reaction) */\n reaction as Reaction,\n /* @conditional-compile-remove(spotlight) */\n spotlight as Spotlight\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: RemoteParticipantConnectionState,\n displayName?: string,\n raisedHand?: unknown, // temp unknown type to build stable\n /* @conditional-compile-remove(ppt-live) */\n contentSharingStream?: HTMLElement,\n /* @conditional-compile-remove(reaction) */\n reaction?: unknown, // temp unknown type to build stable\n /* @conditional-compile-remove(spotlight) */\n spotlight?: unknown // temp unknown type to build stable\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 /* @conditional-compile-remove(ppt-live) */\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 /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n state,\n raisedHand: raisedHand as RaisedHandState,\n /* @conditional-compile-remove(reaction) */\n reaction: reaction as Reaction,\n /* @conditional-compile-remove(spotlight) */\n spotlight: spotlight as Spotlight\n };\n};\n\nconst convertRemoteVideoStreamToVideoGalleryStream = (stream: RemoteVideoStreamState): VideoGalleryStream => {\n return {\n id: stream.id,\n isAvailable: stream.isAvailable,\n /* @conditional-compile-remove(video-stream-is-receiving-flag) */\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\n/* @conditional-compile-remove(ppt-live) */\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 role,\n raisedHand,\n /* @conditional-compile-remove(reaction) */ reaction,\n /* @conditional-compile-remove(spotlight) */ localSpotlight,\n /* @conditional-compile-remove(spotlight) */ 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 role,\n raisedHand: raisedHand,\n /* @conditional-compile-remove(reaction) */\n reaction: reaction,\n /* @conditional-compile-remove(spotlight) */\n spotlight: localSpotlight,\n /* @conditional-compile-remove(spotlight) */\n capabilities\n })\n);\n\n/* @conditional-compile-remove(spotlight) */\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;AAUlC,OAAO,EAAE,YAAY,EAAE,6BAA6B,EAAE,mCAAgC;AAGtF,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACxD,qDAAqD;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,uB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B,CAAE,IAAI,0CAAE,UAAU;YAC9C,aAAa,EAAE,MAAA,gBAAgB,aAAhB,gBAAgB,uBAAhB,gBAAgB,CAAE,IAAI,0CAAE,MAAM;SAC9C;QACD,IAAI;QACJ,UAAU,EAAE,UAAU;QACtB,2CAA2C;QAC3C,QAAQ,EAAE,QAAQ;QAClB,4CAA4C;QAC5C,SAAS,EAAE,cAAc;QACzB,4CAA4C;QAC5C,YAAY;KACb,CAAC,CAAA;CAAA,CACH,CAAC;AAEF,4CAA4C;AAC5C,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 {\n DominantSpeakersInfo,\n RemoteParticipantState as RemoteParticipantConnectionState\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(spotlight) */\nimport { SpotlightedParticipant } from '@azure/communication-calling';\n/* @conditional-compile-remove(hide-attendee-name) */\nimport { ParticipantRole } from '@azure/communication-calling';\nimport { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-common';\nimport { RemoteParticipantState, RemoteVideoStreamState } from '@internal/calling-stateful-client';\nimport { VideoGalleryRemoteParticipant, VideoGalleryStream } from '@internal/react-components';\nimport memoizeOne from 'memoize-one';\nimport { _isRingingPSTNParticipant } from './callUtils';\n/* @conditional-compile-remove(hide-attendee-name) */\nimport { maskDisplayNameWithRole } from './callUtils';\nimport { checkIsSpeaking } from './SelectorUtils';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\nimport { RaisedHandState } from '@internal/calling-stateful-client';\n/* @conditional-compile-remove(reaction) */\nimport { Reaction } from '@internal/react-components';\n/* @conditional-compile-remove(reaction) */\nimport { memoizedConvertToVideoTileReaction } from './participantListSelectorUtils';\n/* @conditional-compile-remove(spotlight) */\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 /* @conditional-compile-remove(hide-attendee-name) */\n isHideAttendeeNamesEnabled?: boolean,\n /* @conditional-compile-remove(hide-attendee-name) */\n localUserRole?: ParticipantRole\n) => VideoGalleryRemoteParticipant[];\n\n/** @internal */\nexport const _videoGalleryRemoteParticipantsMemo: _VideoGalleryRemoteParticipantsMemoFn = (\n remoteParticipants: RemoteParticipantState[] | undefined,\n isHideAttendeeNamesEnabled?: boolean,\n /* @conditional-compile-remove(hide-attendee-name) */ 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 = _isRingingPSTNParticipant(participant);\n let displayName = participant.displayName;\n /* @conditional-compile-remove(hide-attendee-name) */\n displayName = maskDisplayNameWithRole(\n displayName,\n localUserRole,\n participant.role,\n isHideAttendeeNamesEnabled\n );\n let contentSharingStream = undefined;\n /* @conditional-compile-remove(ppt-live) */\n contentSharingStream = participant.contentSharingStream;\n let remoteParticipantReaction = undefined;\n /* @conditional-compile-remove(reaction) */ remoteParticipantReaction = memoizedConvertToVideoTileReaction(\n participant.reactionState\n );\n let spotlight = undefined;\n /* @conditional-compile-remove(spotlight) */ 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 contentSharingStream,\n remoteParticipantReaction,\n spotlight\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: RemoteParticipantConnectionState,\n displayName?: string,\n raisedHand?: RaisedHandState,\n contentSharingStream?: HTMLElement,\n reaction?: unknown, // temp unknown type to build stable\n spotlight?: unknown // temp unknown type to build stable\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 );\n }\n);\n\n/** @private */\nexport const convertRemoteParticipantToVideoGalleryRemoteParticipant = (\n userId: string,\n isMuted: boolean,\n isSpeaking: boolean,\n videoStreams: { [key: number]: RemoteVideoStreamState },\n state: RemoteParticipantConnectionState,\n displayName?: string,\n raisedHand?: RaisedHandState,\n contentSharingStream?: HTMLElement,\n reaction?: unknown, // temp unknown type to build stable\n spotlight?: unknown // temp unknown type to build stable\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 /* @conditional-compile-remove(ppt-live) */\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 /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n state,\n raisedHand,\n /* @conditional-compile-remove(reaction) */\n reaction: reaction as Reaction,\n /* @conditional-compile-remove(spotlight) */\n spotlight: spotlight as Spotlight\n };\n};\n\nconst convertRemoteVideoStreamToVideoGalleryStream = (stream: RemoteVideoStreamState): VideoGalleryStream => {\n return {\n id: stream.id,\n isAvailable: stream.isAvailable,\n /* @conditional-compile-remove(video-stream-is-receiving-flag) */\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\n/* @conditional-compile-remove(ppt-live) */\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 role,\n raisedHand,\n /* @conditional-compile-remove(reaction) */ reaction,\n /* @conditional-compile-remove(spotlight) */ localSpotlight,\n /* @conditional-compile-remove(spotlight) */ 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 role,\n raisedHand: raisedHand,\n /* @conditional-compile-remove(reaction) */\n reaction: reaction,\n /* @conditional-compile-remove(spotlight) */\n spotlight: localSpotlight,\n /* @conditional-compile-remove(spotlight) */\n capabilities\n })\n);\n\n/* @conditional-compile-remove(spotlight) */\n/** @private */\nexport const memoizeSpotlightedParticipantIds = memoizeOne((spotlightedParticipants) =>\n spotlightedParticipants?.map((p: SpotlightedParticipant) => toFlatCommunicationIdentifier(p.identifier))\n);\n"]}
@@ -66,11 +66,7 @@ capabilities) => {
66
66
  const spotlightedParticipantIds = memoizeSpotlightedParticipantIds(spotlightCallFeature === null || spotlightCallFeature === void 0 ? void 0 : spotlightCallFeature.spotlightedParticipants);
67
67
  return {
68
68
  screenShareParticipant: screenShareRemoteParticipant
69
- ? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName, screenShareRemoteParticipant.raisedHand,
70
- /* @conditional-compile-remove(ppt-live) */
71
- screenShareRemoteParticipant.contentSharingStream,
72
- /* @conditional-compile-remove(spotlight) */
73
- screenShareRemoteParticipant.spotlight)
69
+ ? convertRemoteParticipantToVideoGalleryRemoteParticipant(toFlatCommunicationIdentifier(screenShareRemoteParticipant.identifier), screenShareRemoteParticipant.isMuted, checkIsSpeaking(screenShareRemoteParticipant), screenShareRemoteParticipant.videoStreams, screenShareRemoteParticipant.state, screenShareRemoteParticipant.displayName, screenShareRemoteParticipant.raisedHand, undefined || /* @conditional-compile-remove(ppt-live) */ screenShareRemoteParticipant.contentSharingStream, undefined, undefined || /* @conditional-compile-remove(spotlight) */ screenShareRemoteParticipant.spotlight)
74
70
  : undefined,
75
71
  localParticipant: memoizeLocalParticipant(identifier, displayName, isMuted, isScreenSharingOn, localVideoStream, role, raisedHand,
76
72
  /* @conditional-compile-remove(reaction) */
@@ -1 +1 @@
1
- {"version":3,"file":"videoGallerySelector.js","sourceRoot":"","sources":["../../../../../calling-component-bindings/src/videoGallerySelector.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,6BAA6B,EAAE,gCAAgC;AAGxE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,EAEL,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,OAAO,EACP,+BAA+B,EAChC,MAAM,iBAAiB,CAAC;AACzB,qDAAqD;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,mCAAmC,EACnC,2BAA2B,EAC3B,uDAAuD,EACvD,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,4CAA4C;AAC5C,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAChE,2CAA2C;AAC3C,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,2CAA2C;AAC3C,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;A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4CAA4C;QAC5C,uBAAuB,EAAE,yBAAyB;QAClD,4CAA4C;QAC5C,0BAA0B,EAAE,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,0BAA0B;KAC7E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,gCAAgC,GAAG,CAAC,kBAA4C,EAA4B,EAAE;IAClH,6CAA6C;IAC7C,OAAO,uBAAuB,CAAC,kBAAkB,CAAC,CAAC;IACnD,OAAO,kBAAkB,CAAC;AAC5B,CAAC,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';\n/* @conditional-compile-remove(hide-attendee-name) */\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';\n/* @conditional-compile-remove(spotlight) */\nimport { memoizeSpotlightedParticipantIds } from './utils/videoGalleryUtils';\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\n/* @conditional-compile-remove(reaction) */\nimport { getLocalParticipantReactionState } from './baseSelectors';\n/* @conditional-compile-remove(reaction) */\nimport { memoizedConvertToVideoTileReaction } from './utils/participantListSelectorUtils';\nimport { getRemoteParticipantsExcludingConsumers } from './getRemoteParticipantsExcludingConsumers';\n/* @conditional-compile-remove(spotlight) */\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 /* @conditional-compile-remove(spotlight) */\n spotlightedParticipants?: string[];\n /* @conditional-compile-remove(spotlight) */\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 /* @conditional-compile-remove(hide-attendee-name) */\n isHideAttendeeNamesEnabled,\n /* @conditional-compile-remove(reaction) */\n getLocalParticipantReactionState,\n /* @conditional-compile-remove(spotlight) */\n getSpotlightCallFeature,\n /* @conditional-compile-remove(spotlight) */\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 /* @conditional-compile-remove(hide-attendee-name) */\n isHideAttendeeNamesEnabled,\n /* @conditional-compile-remove(reaction) */\n localParticipantReaction,\n /* @conditional-compile-remove(spotlight) */\n spotlightCallFeature,\n /* @conditional-compile-remove(spotlight) */\n capabilities\n ) => {\n const screenShareRemoteParticipant =\n screenShareRemoteParticipantId && remoteParticipants\n ? remoteParticipants[screenShareRemoteParticipantId]\n : undefined;\n const localVideoStream = localVideoStreams?.find((i) => i.mediaStreamType === 'Video');\n\n const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);\n const dominantSpeakersMap: Record<string, number> = {};\n dominantSpeakerIds?.forEach((speaker, idx) => (dominantSpeakersMap[speaker] = idx));\n const noRemoteParticipants: RemoteParticipantState[] = [];\n /* @conditional-compile-remove(reaction) */\n const localParticipantReactionState = memoizedConvertToVideoTileReaction(localParticipantReaction);\n /* @conditional-compile-remove(spotlight) */\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 /* @conditional-compile-remove(ppt-live) */\n screenShareRemoteParticipant.contentSharingStream,\n /* @conditional-compile-remove(spotlight) */\n screenShareRemoteParticipant.spotlight\n )\n : undefined,\n localParticipant: memoizeLocalParticipant(\n identifier,\n displayName,\n isMuted,\n isScreenSharingOn,\n localVideoStream,\n role,\n raisedHand,\n /* @conditional-compile-remove(reaction) */\n localParticipantReactionState,\n /* @conditional-compile-remove(spotlight) */\n spotlightCallFeature?.localParticipantSpotlight,\n /* @conditional-compile-remove(spotlight) */\n capabilities\n ),\n remoteParticipants: _videoGalleryRemoteParticipantsMemo(\n updateUserDisplayNamesTrampoline(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants),\n /* @conditional-compile-remove(hide-attendee-name) */\n isHideAttendeeNamesEnabled,\n /* @conditional-compile-remove(hide-attendee-name) */\n role\n ),\n dominantSpeakers: dominantSpeakerIds,\n maxRemoteVideoStreams: optimalVideoCount,\n /* @conditional-compile-remove(spotlight) */\n spotlightedParticipants: spotlightedParticipantIds,\n /* @conditional-compile-remove(spotlight) */\n maxParticipantsToSpotlight: spotlightCallFeature?.maxParticipantsToSpotlight\n };\n }\n);\n\nconst updateUserDisplayNamesTrampoline = (remoteParticipants: RemoteParticipantState[]): RemoteParticipantState[] => {\n /* @conditional-compile-remove(PSTN-calls) */\n return _updateUserDisplayNames(remoteParticipants);\n return remoteParticipants;\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,UAAU,CAAC;AAC1C,OAAO,EAEL,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,oBAAoB,EACpB,oBAAoB,EACpB,OAAO,EACP,+BAA+B,EAChC,MAAM,iBAAiB,CAAC;AACzB,qDAAqD;AACrD,OAAO,EAAE,0BAA0B,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EACL,mCAAmC,EACnC,2BAA2B,EAC3B,uDAAuD,EACvD,uBAAuB,EACxB,MAAM,2BAA2B,CAAC;AACnC,4CAA4C;AAC5C,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAChE,2CAA2C;AAC3C,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,2CAA2C;AAC3C,OAAO,EAAE,kCAAkC,EAAE,MAAM,sCAAsC,CAAC;AAC1F,OAAO,EAAE,uCAAuC,EAAE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C,4CAA4C;QAC5C,uBAAuB,EAAE,yBAAyB;QAClD,4CAA4C;QAC5C,0BAA0B,EAAE,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,0BAA0B;KAC7E,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,gCAAgC,GAAG,CAAC,kBAA4C,EAA4B,EAAE;IAClH,6CAA6C;IAC7C,OAAO,uBAAuB,CAAC,kBAAkB,CAAC,CAAC;IACnD,OAAO,kBAAkB,CAAC;AAC5B,CAAC,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';\n/* @conditional-compile-remove(hide-attendee-name) */\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';\n/* @conditional-compile-remove(spotlight) */\nimport { memoizeSpotlightedParticipantIds } from './utils/videoGalleryUtils';\nimport { getLocalParticipantRaisedHand } from './baseSelectors';\n/* @conditional-compile-remove(reaction) */\nimport { getLocalParticipantReactionState } from './baseSelectors';\n/* @conditional-compile-remove(reaction) */\nimport { memoizedConvertToVideoTileReaction } from './utils/participantListSelectorUtils';\nimport { getRemoteParticipantsExcludingConsumers } from './getRemoteParticipantsExcludingConsumers';\n/* @conditional-compile-remove(spotlight) */\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 /* @conditional-compile-remove(spotlight) */\n spotlightedParticipants?: string[];\n /* @conditional-compile-remove(spotlight) */\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 /* @conditional-compile-remove(hide-attendee-name) */\n isHideAttendeeNamesEnabled,\n /* @conditional-compile-remove(reaction) */\n getLocalParticipantReactionState,\n /* @conditional-compile-remove(spotlight) */\n getSpotlightCallFeature,\n /* @conditional-compile-remove(spotlight) */\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 /* @conditional-compile-remove(hide-attendee-name) */\n isHideAttendeeNamesEnabled,\n /* @conditional-compile-remove(reaction) */\n localParticipantReaction,\n /* @conditional-compile-remove(spotlight) */\n spotlightCallFeature,\n /* @conditional-compile-remove(spotlight) */\n capabilities\n ) => {\n const screenShareRemoteParticipant =\n screenShareRemoteParticipantId && remoteParticipants\n ? remoteParticipants[screenShareRemoteParticipantId]\n : undefined;\n const localVideoStream = localVideoStreams?.find((i) => i.mediaStreamType === 'Video');\n\n const dominantSpeakerIds = _dominantSpeakersWithFlatId(dominantSpeakers);\n const dominantSpeakersMap: Record<string, number> = {};\n dominantSpeakerIds?.forEach((speaker, idx) => (dominantSpeakersMap[speaker] = idx));\n const noRemoteParticipants: RemoteParticipantState[] = [];\n /* @conditional-compile-remove(reaction) */\n const localParticipantReactionState = memoizedConvertToVideoTileReaction(localParticipantReaction);\n /* @conditional-compile-remove(spotlight) */\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 undefined || /* @conditional-compile-remove(ppt-live) */ screenShareRemoteParticipant.contentSharingStream,\n undefined,\n undefined || /* @conditional-compile-remove(spotlight) */ screenShareRemoteParticipant.spotlight\n )\n : undefined,\n localParticipant: memoizeLocalParticipant(\n identifier,\n displayName,\n isMuted,\n isScreenSharingOn,\n localVideoStream,\n role,\n raisedHand,\n /* @conditional-compile-remove(reaction) */\n localParticipantReactionState,\n /* @conditional-compile-remove(spotlight) */\n spotlightCallFeature?.localParticipantSpotlight,\n /* @conditional-compile-remove(spotlight) */\n capabilities\n ),\n remoteParticipants: _videoGalleryRemoteParticipantsMemo(\n updateUserDisplayNamesTrampoline(remoteParticipants ? Object.values(remoteParticipants) : noRemoteParticipants),\n /* @conditional-compile-remove(hide-attendee-name) */\n isHideAttendeeNamesEnabled,\n /* @conditional-compile-remove(hide-attendee-name) */\n role\n ),\n dominantSpeakers: dominantSpeakerIds,\n maxRemoteVideoStreams: optimalVideoCount,\n /* @conditional-compile-remove(spotlight) */\n spotlightedParticipants: spotlightedParticipantIds,\n /* @conditional-compile-remove(spotlight) */\n maxParticipantsToSpotlight: spotlightCallFeature?.maxParticipantsToSpotlight\n };\n }\n);\n\nconst updateUserDisplayNamesTrampoline = (remoteParticipants: RemoteParticipantState[]): RemoteParticipantState[] => {\n /* @conditional-compile-remove(PSTN-calls) */\n return _updateUserDisplayNames(remoteParticipants);\n return remoteParticipants;\n};\n"]}
@@ -2,6 +2,7 @@ import { AudioDeviceInfo, CallDirection, CallEndReason, CallerInfo, CallState as
2
2
  import { CallInfo, TeamsCallInfo } from '@azure/communication-calling';
3
3
  import { CapabilitiesChangeInfo, ParticipantCapabilities } from '@azure/communication-calling';
4
4
  import { CaptionsResultType } from '@azure/communication-calling';
5
+ import { CaptionsKind } from '@azure/communication-calling';
5
6
  import { VideoEffectName } from '@azure/communication-calling';
6
7
  import { CallKind } from '@azure/communication-calling';
7
8
  import { EnvironmentInfo } from '@azure/communication-calling';
@@ -88,6 +89,10 @@ export interface CaptionsCallFeatureState {
88
89
  * current caption language
89
90
  */
90
91
  currentCaptionLanguage: string;
92
+ /**
93
+ * current caption kind: teams or acs captions
94
+ */
95
+ captionsKind: CaptionsKind;
91
96
  }
92
97
  /**
93
98
  * State only version of {@link @azure/communication-calling#TranscriptionCallFeature}. {@link StatefulCallClient} will
@@ -120,7 +125,7 @@ export interface CapabilitiesFeatureState {
120
125
  /**
121
126
  * State only version of {@link @azure/communication-calling#SpotlightCallFeature}
122
127
  *
123
- * @beta
128
+ * @public
124
129
  */
125
130
  export interface SpotlightCallFeatureState {
126
131
  /**
@@ -139,7 +144,7 @@ export interface SpotlightCallFeatureState {
139
144
  /**
140
145
  * Spotlight state with order
141
146
  *
142
- * @beta
147
+ * @public
143
148
  */
144
149
  export interface SpotlightState {
145
150
  /**
@@ -209,7 +214,7 @@ export interface RaiseHandCallFeatureState {
209
214
  * State only version of {@link @azure/communication-calling#PPTLiveCallFeature}. {@link StatefulCallClient} will
210
215
  * automatically listen for pptLive on the call and update the state exposed by {@link StatefulCallClient} accordingly.
211
216
  *
212
- * @beta
217
+ * @public
213
218
  */
214
219
  export interface PPTLiveCallFeatureState {
215
220
  /**
@@ -229,7 +234,7 @@ export type RaisedHandState = {
229
234
  * State only version of {@link @azure/communication-calling#Call.ReactionMessage} with UI helper props receivedOn.
230
235
  * Reaction state with a timestamp which helps UI to decide to render the reaction accordingly.
231
236
  *
232
- * @beta
237
+ * @public
233
238
  */
234
239
  export type ReactionState = {
235
240
  /**
@@ -393,14 +398,14 @@ export interface RemoteParticipantState {
393
398
  /**
394
399
  * Proxy of {@link @azure/communication-calling#Call.PPTLive.target}.
395
400
  *
396
- * @beta
401
+ * @public
397
402
  */
398
403
  contentSharingStream?: HTMLElement;
399
404
  /**
400
405
  * Proxy of {@link @azure/communication-calling#Call.ReactionMessage} with
401
406
  * UI helper props receivedOn which indicates the timestamp when the message was received.
402
407
  *
403
- * @beta
408
+ * @public
404
409
  */
405
410
  reactionState?: ReactionState;
406
411
  /**
@@ -496,7 +501,7 @@ export interface CallState {
496
501
  /**
497
502
  * Proxy of {@link @azure/communication-calling#PPTLiveCallFeature}.
498
503
  *
499
- *@beta
504
+ *@public
500
505
  */
501
506
  pptLive: PPTLiveCallFeatureState;
502
507
  /**
@@ -507,7 +512,7 @@ export interface CallState {
507
512
  * Proxy of {@link @azure/communication-calling#Call.ReactionMessage} with
508
513
  * UI helper props receivedOn which indicates the timestamp when the message was received.
509
514
  *
510
- * @beta
515
+ * @public
511
516
  */
512
517
  localParticipantReaction?: ReactionState;
513
518
  /**
@@ -528,7 +533,7 @@ export interface CallState {
528
533
  *
529
534
  * This property is added by the stateful layer and is not a proxy of SDK state
530
535
  *
531
- *@beta
536
+ *@public
532
537
  */
533
538
  contentSharingRemoteParticipant?: string;
534
539
  /**