Skip to content

Commit bf84a9a

Browse files
mgamis-msftdmceachernmsftgithub-actions[bot]
authored
Promote rooms feature to GA (#3841)
* Filter out consumers from remote participants * Change files * Duplicate change files for beta release * create new selector to filter out consumers * return key map of ids to remote participants * Promote rooms feature to GA * Update packages/react-composites CallWithChatComposite browser test snapshots * Revert "Update packages/react-composites CallWithChatComposite browser test snapshots" This reverts commit 1d4356a. * Refactor showLabel logic for localVideoTile of VideoGallery * more robust remove participant menu item tests * Update packages/react-composites CallComposite browser test snapshots * Change files * Duplicate changelog files for beta * update stable api * add comments for UI tests helpers --------- Co-authored-by: Donald McEachern <94866715+dmceachernmsft@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent dda9af1 commit bf84a9a

26 files changed

Lines changed: 116 additions & 32 deletions

File tree

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": "Rooms",
5+
"comment": "Promote rooms feature to GA",
6+
"packageName": "@azure/communication-react",
7+
"email": "miguelgamis@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": "Rooms",
5+
"comment": "Promote rooms feature to GA",
6+
"packageName": "@azure/communication-react",
7+
"email": "miguelgamis@microsoft.com",
8+
"dependentChangeType": "patch"
9+
}

common/config/babel/features.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ module.exports = {
3737
"one-to-n-calling",
3838
// PSTN calls
3939
"PSTN-calls",
40-
// rooms
41-
"rooms",
4240
// Adhoc calls to a Teams user.
4341
"teams-adhoc-call",
4442
// Joining calls using teams token
@@ -129,6 +127,8 @@ module.exports = {
129127
"vertical-gallery",
130128
// API for injecting custom buttons in he control bar for
131129
// `CallComposite` and `CallWithChatComposite`.
132-
"control-bar-button-injection"
130+
"control-bar-button-injection",
131+
// rooms
132+
"rooms",
133133
]
134134
}

packages/calling-stateful-client/review/stable/calling-stateful-client.api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,7 @@ export interface RemoteParticipantState {
251251
isMuted: boolean;
252252
isSpeaking: boolean;
253253
raisedHand?: RaisedHandState;
254+
role?: ParticipantRole;
254255
state: RemoteParticipantState_2;
255256
videoStreams: {
256257
[key: number]: RemoteVideoStreamState;

packages/communication-react/review/beta/communication-react.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3007,7 +3007,7 @@ export interface LocalVideoTileOptions {
30073007
position?: 'grid' | 'floating';
30083008
}
30093009

3010-
// @beta
3010+
// @public
30113011
export type LocalVideoTileSize = '9:16' | '16:9' | 'hidden' | 'followDeviceOrientation';
30123012

30133013
// @public

packages/communication-react/review/stable/communication-react.api.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ import { PropertyChangedEvent } from '@azure/communication-calling';
6767
import { default as React_2 } from 'react';
6868
import type { RemoteParticipant } from '@azure/communication-calling';
6969
import { RemoteParticipantState as RemoteParticipantState_2 } from '@azure/communication-calling';
70+
import { RoomCallLocator } from '@azure/communication-calling';
7071
import { ScalingMode } from '@azure/communication-calling';
7172
import { SendMessageOptions } from '@azure/communication-chat';
7273
import { StartCallOptions } from '@azure/communication-calling';
@@ -238,6 +239,7 @@ export type CallAdapterClientState = {
238239
devices: DeviceManagerState;
239240
endedCall?: CallState;
240241
isTeamsCall: boolean;
242+
isRoomsCall: boolean;
241243
latestErrors: AdapterErrors;
242244
cameraStatus?: 'On' | 'Off';
243245
videoBackgroundImages?: VideoBackgroundImage[];
@@ -257,7 +259,7 @@ export interface CallAdapterDeviceManagement {
257259
}
258260

259261
// @public
260-
export type CallAdapterLocator = TeamsMeetingLinkLocator | GroupCallLocator;
262+
export type CallAdapterLocator = TeamsMeetingLinkLocator | GroupCallLocator | /* @conditional-compile-remove(rooms) */ RoomCallLocator;
261263

262264
// @public
263265
export type CallAdapterState = CallAdapterUiState & CallAdapterClientState;
@@ -281,6 +283,7 @@ export interface CallAdapterSubscribers {
281283
off(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;
282284
off(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;
283285
off(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;
286+
off(event: 'roleChanged', listener: PropertyChangedEvent): void;
284287
on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;
285288
on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;
286289
on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;
@@ -298,6 +301,7 @@ export interface CallAdapterSubscribers {
298301
on(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;
299302
on(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;
300303
on(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;
304+
on(event: 'roleChanged', listener: PropertyChangedEvent): void;
301305
}
302306

303307
// @public
@@ -406,6 +410,9 @@ export type CallCompositeIcons = {
406410
NoticePageJoinCallFailedDueToNoNetwork?: JSX.Element;
407411
NoticePageLeftCall?: JSX.Element;
408412
NoticePageRemovedFromCall?: JSX.Element;
413+
NoticePageNotInvitedToRoom?: JSX.Element;
414+
NoticePageRoomNotFound?: JSX.Element;
415+
NoticePageRoomNotValid?: JSX.Element;
409416
OptionsCamera?: JSX.Element;
410417
OptionsMic?: JSX.Element;
411418
OptionsSpeaker?: JSX.Element;
@@ -415,6 +422,7 @@ export type CallCompositeIcons = {
415422
ParticipantItemScreenShareStart?: JSX.Element;
416423
VideoTileMicOff?: JSX.Element;
417424
LocalCameraSwitch?: JSX.Element;
425+
NoticePageInviteToRoomRemoved?: JSX.Element;
418426
BlurVideoBackground?: JSX.Element;
419427
RemoveVideoBackgroundEffect?: JSX.Element;
420428
GalleryOptions?: JSX.Element;
@@ -496,6 +504,8 @@ export interface CallCompositeStrings {
496504
failedToJoinCallDueToNoNetworkTitle: string;
497505
failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails?: string;
498506
failedToJoinTeamsMeetingReasonAccessDeniedTitle: string;
507+
inviteToRoomRemovedDetails?: string;
508+
inviteToRoomRemovedTitle: string;
499509
learnMore: string;
500510
leavingCallTitle?: string;
501511
leftCallMoreDetails?: string;
@@ -525,6 +535,8 @@ export interface CallCompositeStrings {
525535
noCamerasLabel: string;
526536
noMicrophonesLabel: string;
527537
noSpeakersLabel: string;
538+
notInvitedToRoomDetails?: string;
539+
notInvitedToRoomTitle: string;
528540
participantJoinedNoticeString: string;
529541
participantLeftNoticeString: string;
530542
peopleButtonLabel: string;
@@ -537,6 +549,10 @@ export interface CallCompositeStrings {
537549
removedFromCallTitle: string;
538550
returnToCallButtonAriaDescription?: string;
539551
returnToCallButtonAriaLabel?: string;
552+
roomNotFoundDetails?: string;
553+
roomNotFoundTitle: string;
554+
roomNotValidDetails?: string;
555+
roomNotValidTitle: string;
540556
selectedPeopleButtonLabel: string;
541557
soundLabel: string;
542558
spokenLanguageStrings?: SpokenLanguageStrings;
@@ -1949,13 +1965,17 @@ export const DEFAULT_COMPOSITE_ICONS: {
19491965
NoticePageJoinCallFailedDueToNoNetwork?: JSX.Element | undefined;
19501966
NoticePageLeftCall?: JSX.Element | undefined;
19511967
NoticePageRemovedFromCall?: JSX.Element | undefined;
1968+
NoticePageNotInvitedToRoom?: JSX.Element | undefined;
1969+
NoticePageRoomNotFound?: JSX.Element | undefined;
1970+
NoticePageRoomNotValid?: JSX.Element | undefined;
19521971
OptionsCamera: JSX.Element;
19531972
OptionsMic: JSX.Element;
19541973
OptionsSpeaker: JSX.Element;
19551974
ParticipantItemMicOff: JSX.Element;
19561975
ParticipantItemScreenShareStart: JSX.Element;
19571976
VideoTileMicOff: JSX.Element;
19581977
LocalCameraSwitch?: JSX.Element | undefined;
1978+
NoticePageInviteToRoomRemoved?: JSX.Element | undefined;
19591979
BlurVideoBackground?: JSX.Element | undefined;
19601980
RemoveVideoBackgroundEffect?: JSX.Element | undefined;
19611981
GalleryOptions?: JSX.Element | undefined;
@@ -2324,6 +2344,9 @@ export interface LocalVideoStreamVideoEffectsState {
23242344
activeEffects?: VideoEffectName[];
23252345
}
23262346

2347+
// @public
2348+
export type LocalVideoTileSize = '9:16' | '16:9' | 'hidden' | 'followDeviceOrientation';
2349+
23272350
// @public
23282351
export type MediaDiagnosticChangedEvent = MediaDiagnosticChangedEventArgs & {
23292352
type: 'media';
@@ -2816,6 +2839,7 @@ export interface RemoteParticipantState {
28162839
isMuted: boolean;
28172840
isSpeaking: boolean;
28182841
raisedHand?: RaisedHandState;
2842+
role?: ParticipantRole;
28192843
state: RemoteParticipantState_2;
28202844
videoStreams: {
28212845
[key: number]: RemoteVideoStreamState;
@@ -3231,6 +3255,7 @@ export interface VideoGalleryProps {
32313255
layout?: VideoGalleryLayout;
32323256
localParticipant: VideoGalleryLocalParticipant;
32333257
localVideoCameraCycleButtonProps?: LocalVideoCameraCycleButtonProps;
3258+
localVideoTileSize?: LocalVideoTileSize;
32343259
localVideoViewOptions?: VideoStreamOptions;
32353260
maxRemoteVideoStreams?: number;
32363261
onCreateLocalStreamView?: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;

packages/react-components/review/beta/react-components.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ export const _LocalVideoTile: React_2.MemoExoticComponent<(props: {
13681368
raisedHand?: RaisedHand | undefined;
13691369
}) => React_2.JSX.Element>;
13701370

1371-
// @beta
1371+
// @public
13721372
export type LocalVideoTileSize = '9:16' | '16:9' | 'hidden' | 'followDeviceOrientation';
13731373

13741374
// @beta

packages/react-components/review/stable/react-components.api.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1117,6 +1117,9 @@ export const _LocalVideoTile: React_2.MemoExoticComponent<(props: {
11171117
raisedHand?: RaisedHand | undefined;
11181118
}) => React_2.JSX.Element>;
11191119

1120+
// @public
1121+
export type LocalVideoTileSize = '9:16' | '16:9' | 'hidden' | 'followDeviceOrientation';
1122+
11201123
// @public
11211124
export type Message = ChatMessage | SystemMessage | CustomMessage;
11221125

@@ -1993,6 +1996,7 @@ export interface VideoGalleryProps {
19931996
layout?: VideoGalleryLayout;
19941997
localParticipant: VideoGalleryLocalParticipant;
19951998
localVideoCameraCycleButtonProps?: LocalVideoCameraCycleButtonProps;
1999+
localVideoTileSize?: LocalVideoTileSize;
19962000
localVideoViewOptions?: VideoStreamOptions;
19972001
maxRemoteVideoStreams?: number;
19982002
onCreateLocalStreamView?: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;

packages/react-components/src/components/VideoGallery.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ export type OverflowGalleryPosition =
169169
/**
170170
* different modes of the local video tile
171171
*
172-
* @beta
172+
* @public
173173
*/
174174
export type LocalVideoTileSize = '9:16' | '16:9' | 'hidden' | 'followDeviceOrientation';
175175

@@ -366,10 +366,9 @@ export const VideoGallery = (props: VideoGalleryProps): JSX.Element => {
366366
/* @conditional-compile-remove(pinned-participants) */
367367
const drawerMenuHostId = useId('drawerMenuHost', drawerMenuHostIdFromProp);
368368

369-
const localTileNotInGrid = !!(
369+
const localTileNotInGrid =
370370
(layout === 'floatingLocalVideo' || /* @conditional-compile-remove(gallery-layouts) */ layout === 'speaker') &&
371-
remoteParticipants.length > 0
372-
);
371+
remoteParticipants.length > 0;
373372

374373
const containerRef = useRef<HTMLDivElement>(null);
375374
const containerWidth = _useContainerWidth(containerRef);
@@ -409,6 +408,12 @@ export const VideoGallery = (props: VideoGalleryProps): JSX.Element => {
409408
// Use pinnedParticipants from props but if it is not defined use the maintained state of pinned participants
410409
const pinnedParticipants = props.pinnedParticipants ?? pinnedParticipantsState;
411410

411+
const showLocalVideoTileLabel =
412+
!(
413+
(localTileNotInGrid && isNarrow) ||
414+
/*@conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ localVideoTileSize ===
415+
'9:16'
416+
) || /* @conditional-compile-remove(gallery-layouts) */ layout === 'default';
412417
/**
413418
* Utility function for memoized rendering of LocalParticipant.
414419
*/
@@ -456,13 +461,7 @@ export const VideoGallery = (props: VideoGalleryProps): JSX.Element => {
456461
initialsName={initialsName}
457462
localVideoViewOptions={localVideoViewOptions}
458463
onRenderAvatar={onRenderAvatar}
459-
showLabel={
460-
!(
461-
(localTileNotInGrid && isNarrow) ||
462-
/*@conditional-compile-remove(click-to-call) */ /* @conditional-compile-remove(rooms) */ localVideoTileSize ===
463-
'9:16'
464-
) || /* @conditional-compile-remove(gallery-layouts) */ layout === ('default' as VideoGalleryLayout)
465-
}
464+
showLabel={showLocalVideoTileLabel}
466465
showMuteIndicator={showMuteIndicator}
467466
showCameraSwitcherInLocalPreview={showCameraSwitcherInLocalPreview}
468467
localVideoCameraCycleButtonProps={localVideoCameraCycleButtonProps}
@@ -495,7 +494,8 @@ export const VideoGallery = (props: VideoGalleryProps): JSX.Element => {
495494
/*@conditional-compile-remove(click-to-call) */
496495
localVideoTileSize,
497496
/* @conditional-compile-remove(gallery-layouts) */
498-
layout
497+
layout,
498+
showLocalVideoTileLabel
499499
]);
500500

501501
/* @conditional-compile-remove(pinned-participants) */

packages/react-composites/review/stable/react-composites.api.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import { PersonaInitialsColor } from '@fluentui/react';
4343
import { PropertyChangedEvent } from '@azure/communication-calling';
4444
import { default as React_2 } from 'react';
4545
import type { RemoteParticipant } from '@azure/communication-calling';
46+
import { RoomCallLocator } from '@azure/communication-calling';
4647
import { SendMessageOptions } from '@azure/communication-chat';
4748
import { SpokenLanguageStrings } from '@internal/react-components';
4849
import { StartCallOptions } from '@azure/communication-calling';
@@ -196,6 +197,7 @@ export type CallAdapterClientState = {
196197
devices: DeviceManagerState;
197198
endedCall?: CallState;
198199
isTeamsCall: boolean;
200+
isRoomsCall: boolean;
199201
latestErrors: AdapterErrors;
200202
cameraStatus?: 'On' | 'Off';
201203
videoBackgroundImages?: VideoBackgroundImage[];
@@ -215,7 +217,7 @@ export interface CallAdapterDeviceManagement {
215217
}
216218

217219
// @public
218-
export type CallAdapterLocator = TeamsMeetingLinkLocator | GroupCallLocator;
220+
export type CallAdapterLocator = TeamsMeetingLinkLocator | GroupCallLocator | /* @conditional-compile-remove(rooms) */ RoomCallLocator;
219221

220222
// @public
221223
export type CallAdapterState = CallAdapterUiState & CallAdapterClientState;
@@ -239,6 +241,7 @@ export interface CallAdapterSubscribers {
239241
off(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;
240242
off(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;
241243
off(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;
244+
off(event: 'roleChanged', listener: PropertyChangedEvent): void;
242245
on(event: 'participantsJoined', listener: ParticipantsJoinedListener): void;
243246
on(event: 'participantsLeft', listener: ParticipantsLeftListener): void;
244247
on(event: 'isMutedChanged', listener: IsMutedChangedListener): void;
@@ -256,6 +259,7 @@ export interface CallAdapterSubscribers {
256259
on(event: 'isCaptionLanguageChanged', listener: IsCaptionLanguageChangedListener): void;
257260
on(event: 'isSpokenLanguageChanged', listener: IsSpokenLanguageChangedListener): void;
258261
on(event: 'capabilitiesChanged', listener: CapabilitiesChangedListener): void;
262+
on(event: 'roleChanged', listener: PropertyChangedEvent): void;
259263
}
260264

261265
// @public
@@ -317,6 +321,9 @@ export type CallCompositeIcons = {
317321
NoticePageJoinCallFailedDueToNoNetwork?: JSX.Element;
318322
NoticePageLeftCall?: JSX.Element;
319323
NoticePageRemovedFromCall?: JSX.Element;
324+
NoticePageNotInvitedToRoom?: JSX.Element;
325+
NoticePageRoomNotFound?: JSX.Element;
326+
NoticePageRoomNotValid?: JSX.Element;
320327
OptionsCamera?: JSX.Element;
321328
OptionsMic?: JSX.Element;
322329
OptionsSpeaker?: JSX.Element;
@@ -326,6 +333,7 @@ export type CallCompositeIcons = {
326333
ParticipantItemScreenShareStart?: JSX.Element;
327334
VideoTileMicOff?: JSX.Element;
328335
LocalCameraSwitch?: JSX.Element;
336+
NoticePageInviteToRoomRemoved?: JSX.Element;
329337
BlurVideoBackground?: JSX.Element;
330338
RemoveVideoBackgroundEffect?: JSX.Element;
331339
GalleryOptions?: JSX.Element;
@@ -407,6 +415,8 @@ export interface CallCompositeStrings {
407415
failedToJoinCallDueToNoNetworkTitle: string;
408416
failedToJoinTeamsMeetingReasonAccessDeniedMoreDetails?: string;
409417
failedToJoinTeamsMeetingReasonAccessDeniedTitle: string;
418+
inviteToRoomRemovedDetails?: string;
419+
inviteToRoomRemovedTitle: string;
410420
learnMore: string;
411421
leavingCallTitle?: string;
412422
leftCallMoreDetails?: string;
@@ -436,6 +446,8 @@ export interface CallCompositeStrings {
436446
noCamerasLabel: string;
437447
noMicrophonesLabel: string;
438448
noSpeakersLabel: string;
449+
notInvitedToRoomDetails?: string;
450+
notInvitedToRoomTitle: string;
439451
participantJoinedNoticeString: string;
440452
participantLeftNoticeString: string;
441453
peopleButtonLabel: string;
@@ -448,6 +460,10 @@ export interface CallCompositeStrings {
448460
removedFromCallTitle: string;
449461
returnToCallButtonAriaDescription?: string;
450462
returnToCallButtonAriaLabel?: string;
463+
roomNotFoundDetails?: string;
464+
roomNotFoundTitle: string;
465+
roomNotValidDetails?: string;
466+
roomNotValidTitle: string;
451467
selectedPeopleButtonLabel: string;
452468
soundLabel: string;
453469
spokenLanguageStrings?: SpokenLanguageStrings;
@@ -1143,13 +1159,17 @@ export const DEFAULT_COMPOSITE_ICONS: {
11431159
NoticePageJoinCallFailedDueToNoNetwork?: JSX.Element | undefined;
11441160
NoticePageLeftCall?: JSX.Element | undefined;
11451161
NoticePageRemovedFromCall?: JSX.Element | undefined;
1162+
NoticePageNotInvitedToRoom?: JSX.Element | undefined;
1163+
NoticePageRoomNotFound?: JSX.Element | undefined;
1164+
NoticePageRoomNotValid?: JSX.Element | undefined;
11461165
OptionsCamera: JSX.Element;
11471166
OptionsMic: JSX.Element;
11481167
OptionsSpeaker: JSX.Element;
11491168
ParticipantItemMicOff: JSX.Element;
11501169
ParticipantItemScreenShareStart: JSX.Element;
11511170
VideoTileMicOff: JSX.Element;
11521171
LocalCameraSwitch?: JSX.Element | undefined;
1172+
NoticePageInviteToRoomRemoved?: JSX.Element | undefined;
11531173
BlurVideoBackground?: JSX.Element | undefined;
11541174
RemoveVideoBackgroundEffect?: JSX.Element | undefined;
11551175
GalleryOptions?: JSX.Element | undefined;

0 commit comments

Comments
 (0)