Skip to content

Commit 18e74ee

Browse files
Merge branch 'main' into vhuseinova/node-version-update
2 parents 54e2057 + eb8b42e commit 18e74ee

File tree

97 files changed

+536
-145
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+536
-145
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "prerelease",
3+
"area": "feature",
4+
"workstream": "RTT",
5+
"comment": "Change id to sequenceId for RTT feature state",
6+
"packageName": "@azure/communication-react",
7+
"email": "96077406+carocao-msft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "improvement",
4+
"workstream": "Hard mute",
5+
"comment": "Remove hard mute conditional compile part 2",
6+
"packageName": "@azure/communication-react",
7+
"email": "fuyan@microsoft.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "prerelease",
3+
"area": "feature",
4+
"workstream": "rtt",
5+
"comment": "Fixed some component bugs and completed RTT storybook",
6+
"packageName": "@azure/communication-react",
7+
"email": "96077406+carocao-msft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "prerelease",
3+
"area": "feature",
4+
"workstream": "RTT",
5+
"comment": "Add RTT to composite experience",
6+
"packageName": "@azure/communication-react",
7+
"email": "96077406+carocao-msft@users.noreply.github.com",
8+
"dependentChangeType": "patch"
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"type": "patch",
3+
"area": "improvement",
4+
"workstream": "Hard mute",
5+
"comment": "Remove hard mute conditional compile part 2",
6+
"packageName": "@azure/communication-react",
7+
"email": "fuyan@microsoft.com",
8+
"dependentChangeType": "patch"
9+
}

packages/calling-component-bindings/src/baseSelectors.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,12 @@ import {
1919
import { TeamsIncomingCallState } from '@internal/calling-stateful-client';
2020
import { ReactionState } from '@internal/calling-stateful-client';
2121
import { CaptionsInfo } from '@internal/calling-stateful-client';
22+
import { CaptionsKind, CapabilitiesChangeInfo } from '@azure/communication-calling';
2223
/* @conditional-compile-remove(rtt) */
2324
import { RealTimeTextInfo } from '@internal/calling-stateful-client';
24-
import { CaptionsKind } from '@azure/communication-calling';
2525
import { RaisedHandState } from '@internal/calling-stateful-client';
2626
import { SupportedCaptionLanguage, SupportedSpokenLanguage } from '@internal/react-components';
27-
import { ConferencePhoneInfo } from '@internal/calling-stateful-client';
28-
/* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */
29-
import { CallNotifications } from '@internal/calling-stateful-client';
30-
/* @conditional-compile-remove(media-access) */
31-
import { CapabilitiesChangeInfo } from '@azure/communication-calling';
27+
import { ConferencePhoneInfo, CallNotifications } from '@internal/calling-stateful-client';
3228
/* @conditional-compile-remove(together-mode) */
3329
import { TogetherModeCallFeatureState } from '@internal/calling-stateful-client';
3430
/**
@@ -67,7 +63,6 @@ export const getCapabilities = (
6763
props: CallingBaseSelectorProps
6864
): ParticipantCapabilities | undefined => state.calls[props.callId]?.capabilitiesFeature?.capabilities;
6965

70-
/* @conditional-compile-remove(media-access) */
7166
/**
7267
* @private
7368
*/
@@ -185,7 +180,6 @@ export const getIdentifier = (state: CallClientState): string => toFlatCommunica
185180
*/
186181
export const getLatestErrors = (state: CallClientState): CallErrors => state.latestErrors;
187182

188-
/* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */
189183
/**
190184
* @private
191185
*/

packages/calling-component-bindings/src/captionsSelector.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export const captionsBannerSelector: CaptionsBannerSelector = reselect.createSel
179179
.map((rtt) => {
180180
const userId = getRealTimeTextSpeakerIdentifier(rtt);
181181
return {
182-
id: rtt.id,
182+
id: rtt.sequenceId,
183183
displayName: getRealTimeTextDisplayName(rtt, identifier, remoteParticipants, displayName, userId),
184184
message: rtt.message,
185185
userId,
@@ -194,7 +194,7 @@ export const captionsBannerSelector: CaptionsBannerSelector = reselect.createSel
194194
.map((rtt) => {
195195
const userId = getRealTimeTextSpeakerIdentifier(rtt);
196196
return {
197-
id: rtt.id,
197+
id: rtt.sequenceId,
198198
displayName: getRealTimeTextDisplayName(rtt, identifier, remoteParticipants, displayName, userId),
199199
message: rtt.message,
200200
userId,
@@ -207,7 +207,7 @@ export const captionsBannerSelector: CaptionsBannerSelector = reselect.createSel
207207
const myInProgress =
208208
realTimeTexts?.myInProgress && realTimeTexts.myInProgress.message !== ''
209209
? {
210-
id: realTimeTexts.myInProgress.id,
210+
id: realTimeTexts.myInProgress.sequenceId,
211211
displayName: displayName,
212212
message: realTimeTexts.myInProgress.message,
213213
userId: identifier,

packages/calling-component-bindings/src/handlers/createCommonHandlers.ts

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -140,49 +140,41 @@ export interface CommonCallingHandlers {
140140
* @beta
141141
*/
142142
onDisposeTogetherModeStreamView: () => Promise<void>;
143-
/* @conditional-compile-remove(media-access) */
144143
/**
145144
* Forbid remote participants from sending audio
146145
*
147146
*/
148147
onForbidAudio?: (userIds: string[]) => Promise<void>;
149-
/* @conditional-compile-remove(media-access) */
150148
/**
151149
* Permit remote participants to send audio
152150
*
153151
*/
154152
onPermitAudio?: (userIds: string[]) => Promise<void>;
155-
/* @conditional-compile-remove(media-access) */
156153
/**
157154
* Change meeting option forbid remote participants from sending audio
158155
*
159156
*/
160157
onForbidOthersAudio?: () => Promise<void>;
161-
/* @conditional-compile-remove(media-access) */
162158
/**
163159
* Change meeting option permit remote participants to send audio
164160
*
165161
*/
166162
onPermitOthersAudio?: () => Promise<void>;
167-
/* @conditional-compile-remove(media-access) */
168163
/**
169164
* Forbid remote participants from sending video
170165
*
171166
*/
172167
onForbidVideo?: (userIds: string[]) => Promise<void>;
173-
/* @conditional-compile-remove(media-access) */
174168
/**
175169
* Permit remote participants to send video
176170
*
177171
*/
178172
onPermitVideo?: (userIds: string[]) => Promise<void>;
179-
/* @conditional-compile-remove(media-access) */
180173
/**
181174
* Change meeting option forbid remote participants from sending video
182175
*
183176
*/
184177
onForbidOthersVideo?: () => Promise<void>;
185-
/* @conditional-compile-remove(media-access) */
186178
/**
187179
* Change meeting option permit remote participants to send video
188180
*
@@ -842,40 +834,39 @@ export const createDefaultCommonCallingHandlers = memoizeOne(
842834
togetherModeFeature.sceneSize = { width, height };
843835
}
844836
};
845-
/* @conditional-compile-remove(media-access) */
837+
846838
const onForbidAudio = async (userIds: string[]): Promise<void> => {
847839
const participants = userIds?.map((userId) => _toCommunicationIdentifier(userId));
848840
await call?.feature(Features.MediaAccess).forbidAudio(participants);
849841
};
850-
/* @conditional-compile-remove(media-access) */
842+
851843
const onPermitAudio = async (userIds: string[]): Promise<void> => {
852844
const participants = userIds?.map((userId) => _toCommunicationIdentifier(userId));
853845
await call?.feature(Features.MediaAccess).permitAudio(participants);
854846
};
855-
/* @conditional-compile-remove(media-access) */
847+
856848
const onForbidOthersAudio = async (): Promise<void> => {
857849
await call?.feature(Features.MediaAccess).forbidOthersAudio();
858850
};
859-
/* @conditional-compile-remove(media-access) */
851+
860852
const onPermitOthersAudio = async (): Promise<void> => {
861853
await call?.feature(Features.MediaAccess).permitOthersAudio();
862854
};
863855

864-
/* @conditional-compile-remove(media-access) */
865856
const onForbidVideo = async (userIds: string[]): Promise<void> => {
866857
const participants = userIds?.map((userId) => _toCommunicationIdentifier(userId));
867858
await call?.feature(Features.MediaAccess).forbidVideo(participants);
868859
};
869-
/* @conditional-compile-remove(media-access) */
860+
870861
const onPermitVideo = async (userIds: string[]): Promise<void> => {
871862
const participants = userIds?.map((userId) => _toCommunicationIdentifier(userId));
872863
await call?.feature(Features.MediaAccess).permitVideo(participants);
873864
};
874-
/* @conditional-compile-remove(media-access) */
865+
875866
const onForbidOthersVideo = async (): Promise<void> => {
876867
await call?.feature(Features.MediaAccess).forbidOthersVideo();
877868
};
878-
/* @conditional-compile-remove(media-access) */
869+
879870
const onPermitOthersVideo = async (): Promise<void> => {
880871
await call?.feature(Features.MediaAccess).permitOthersVideo();
881872
};
@@ -937,21 +928,13 @@ export const createDefaultCommonCallingHandlers = memoizeOne(
937928
onSetTogetherModeSceneSize,
938929
/* @conditional-compile-remove(together-mode) */
939930
onDisposeTogetherModeStreamView,
940-
/* @conditional-compile-remove(media-access) */
941931
onForbidAudio,
942-
/* @conditional-compile-remove(media-access) */
943932
onPermitAudio,
944-
/* @conditional-compile-remove(media-access) */
945933
onForbidOthersAudio,
946-
/* @conditional-compile-remove(media-access) */
947934
onPermitOthersAudio,
948-
/* @conditional-compile-remove(media-access) */
949935
onForbidVideo,
950-
/* @conditional-compile-remove(media-access) */
951936
onPermitVideo,
952-
/* @conditional-compile-remove(media-access) */
953937
onForbidOthersVideo,
954-
/* @conditional-compile-remove(media-access) */
955938
onPermitOthersVideo,
956939
/* @conditional-compile-remove(rtt) */
957940
onSendRealTimeText

packages/calling-component-bindings/src/notificationStackSelector.ts

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from './baseSelectors';
1111
/* @conditional-compile-remove(breakout-rooms) */
1212
import { getAssignedBreakoutRoom } from './baseSelectors';
13-
/* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */
13+
1414
import { getLatestNotifications } from './baseSelectors';
1515

1616
import { getMeetingConferencePhones } from './baseSelectors';
@@ -23,9 +23,6 @@ import { CallClientState, CallErrors, CallErrorTarget } from '@internal/calling-
2323

2424
import { DiagnosticQuality } from '@azure/communication-calling';
2525

26-
/* @conditional-compile-remove(media-access) */
27-
import { CallNotifications } from '@internal/calling-stateful-client';
28-
2926
/**
3027
* Selector type for {@link Notification} component.
3128
*
@@ -51,7 +48,7 @@ export type NotificationStackSelector = (
5148
export const notificationStackSelector: NotificationStackSelector = createSelector(
5249
[
5350
getLatestErrors,
54-
/* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */ getLatestNotifications,
51+
getLatestNotifications,
5552
getDiagnostics,
5653
getDeviceManager,
5754
getEnvironmentInfo,
@@ -60,7 +57,7 @@ export const notificationStackSelector: NotificationStackSelector = createSelect
6057
],
6158
(
6259
latestErrors: CallErrors,
63-
/* @conditional-compile-remove(breakout-rooms) */ /* @conditional-compile-remove(media-access) */ /* @conditional-compile-remove(together-mode) */ latestNotifications,
60+
latestNotifications,
6461
diagnostics,
6562
deviceManager,
6663
environmentInfo,
@@ -185,11 +182,14 @@ export const notificationStackSelector: NotificationStackSelector = createSelect
185182
}
186183

187184
appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.unmute', 'unmuteGeneric');
188-
appendMuteByOthersNotificationTrampoline(
189-
activeErrorMessages,
190-
latestErrors,
191-
/* @conditional-compile-remove(media-access) */ latestNotifications
192-
);
185+
if (
186+
latestNotifications &&
187+
!latestNotifications['capabilityUnmuteMicAbsent'] &&
188+
!latestNotifications['capabilityUnmuteMicPresent']
189+
) {
190+
appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');
191+
}
192+
193193
appendActiveErrorIfDefined(
194194
activeErrorMessages,
195195
latestErrors,
@@ -268,31 +268,27 @@ export const notificationStackSelector: NotificationStackSelector = createSelect
268268
});
269269
}
270270

271-
/* @conditional-compile-remove(media-access) */
272271
if (latestNotifications['capabilityTurnVideoOnPresent']) {
273272
activeNotifications.push({
274273
type: 'capabilityTurnVideoOnPresent',
275274
timestamp: latestNotifications['capabilityTurnVideoOnPresent'].timestamp
276275
});
277276
}
278277

279-
/* @conditional-compile-remove(media-access) */
280278
if (latestNotifications['capabilityTurnVideoOnAbsent']) {
281279
activeNotifications.push({
282280
type: 'capabilityTurnVideoOnAbsent',
283281
timestamp: latestNotifications['capabilityTurnVideoOnAbsent'].timestamp
284282
});
285283
}
286284

287-
/* @conditional-compile-remove(media-access) */
288285
if (latestNotifications['capabilityUnmuteMicPresent']) {
289286
activeNotifications.push({
290287
type: 'capabilityUnmuteMicPresent',
291288
timestamp: latestNotifications['capabilityUnmuteMicPresent'].timestamp
292289
});
293290
}
294291

295-
/* @conditional-compile-remove(media-access) */
296292
if (latestNotifications['capabilityUnmuteMicAbsent']) {
297293
activeNotifications.push({
298294
type: 'capabilityUnmuteMicAbsent',
@@ -335,22 +331,3 @@ const appendActiveErrorIfDefined = (
335331
timestamp: latestErrors[target].timestamp
336332
});
337333
};
338-
339-
const appendMuteByOthersNotificationTrampoline = (
340-
activeErrorMessages: ActiveNotification[],
341-
latestErrors: CallErrors,
342-
latestNotifications?: undefined | /* @conditional-compile-remove(media-access) */ CallNotifications
343-
): void => {
344-
/* @conditional-compile-remove(media-access) */
345-
if (
346-
latestNotifications &&
347-
!latestNotifications['capabilityUnmuteMicAbsent'] &&
348-
!latestNotifications['capabilityUnmuteMicPresent']
349-
) {
350-
appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');
351-
}
352-
/* @conditional-compile-remove(media-access) */
353-
return;
354-
355-
appendActiveErrorIfDefined(activeErrorMessages, latestErrors, 'Call.mutedByOthers', 'mutedByRemoteParticipant');
356-
};

packages/calling-component-bindings/src/participantListSelector.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
getIsScreenSharingOn,
1010
getIsMuted,
1111
CallingBaseSelectorProps,
12-
/* @conditional-compile-remove(media-access) */
1312
getCapabilities
1413
} from './baseSelectors';
1514
import { getRole } from './baseSelectors';
@@ -86,7 +85,6 @@ const convertRemoteParticipantsToParticipantListParticipants = (
8685
localUserCanRemoveOthers,
8786
remoteParticipantReaction,
8887
spotlight,
89-
/* @conditional-compile-remove(media-access) */
9088
participant.mediaAccess
9189
);
9290
})
@@ -139,7 +137,6 @@ export const participantListSelector: ParticipantListSelector = createSelector(
139137
isHideAttendeeNamesEnabled,
140138
getLocalParticipantReactionState,
141139
getSpotlightCallFeature,
142-
/* @conditional-compile-remove(media-access) */
143140
getCapabilities
144141
],
145142
(
@@ -154,7 +151,6 @@ export const participantListSelector: ParticipantListSelector = createSelector(
154151
isHideAttendeeNamesEnabled,
155152
localParticipantReactionState,
156153
spotlightCallFeature,
157-
/* @conditional-compile-remove(media-access) */
158154
capabilities
159155
): {
160156
participants: CallParticipantListParticipant[];
@@ -182,7 +178,6 @@ export const participantListSelector: ParticipantListSelector = createSelector(
182178
isRemovable: false,
183179
reaction: memoizedConvertToVideoTileReaction(localParticipantReactionState),
184180
spotlight: memoizedSpotlight(spotlightCallFeature?.spotlightedParticipants, userId),
185-
/* @conditional-compile-remove(media-access) */
186181
mediaAccess: {
187182
isAudioPermitted: capabilities?.unmuteMic ? capabilities.unmuteMic.isPresent : true,
188183
isVideoPermitted: capabilities?.turnVideoOn ? capabilities.turnVideoOn.isPresent : true

0 commit comments

Comments
 (0)