Skip to content
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
3d93e6d
VideoTile call state
anjulgarg Aug 2, 2022
3ca9d28
Change files
anjulgarg Aug 2, 2022
46b5ee3
Update comment
anjulgarg Aug 2, 2022
720291d
add beta tag to videotilecallstate prop
anjulgarg Aug 2, 2022
07eee05
Update api.md
anjulgarg Aug 2, 2022
7207bc0
Updating api.md
anjulgarg Aug 2, 2022
cfe0d52
Tweak prop name
anjulgarg Aug 2, 2022
8c46372
Update changelog
anjulgarg Aug 2, 2022
bb9af49
Tweak prop name
anjulgarg Aug 2, 2022
3b6019b
updating api.md
anjulgarg Aug 2, 2022
05336f7
Tweaking types
anjulgarg Aug 2, 2022
a47ddcf
update changelog
anjulgarg Aug 2, 2022
5cf9962
Update api.md
anjulgarg Aug 2, 2022
c1f3109
Return participant state from videoGallerySelector and wire it in gal…
anjulgarg Aug 2, 2022
9c0200c
Change files
anjulgarg Aug 2, 2022
96ed707
Tweak changelog
anjulgarg Aug 2, 2022
0a60565
Fixing build
anjulgarg Aug 2, 2022
d4fd313
Merge branch 'main' into anjulgarg/2940249-videotile-call-connection-…
anjulgarg Aug 3, 2022
1a572f7
Tweaking state conversion logic in videoGallerySelector
anjulgarg Aug 3, 2022
14b94ac
Localization for video tile participant state prop
anjulgarg Aug 3, 2022
f7119e5
Conditionally remove pstn code from participant item
anjulgarg Aug 3, 2022
7a91e32
Merge branch 'main' into anjulgarg/2940249-videotile-call-connection-…
anjulgarg Aug 4, 2022
eef7c39
Update api.md
anjulgarg Aug 4, 2022
813cea4
Update Api.md
anjulgarg Aug 4, 2022
a203864
Merge branch 'anjulgarg/2940249-videotile-call-connection-state' of h…
anjulgarg Aug 4, 2022
253e26a
Merge branch 'anjulgarg/2940249-videotile-call-connection-state' of h…
anjulgarg Aug 4, 2022
224e1f6
Merge branch 'main' of https://github.com/Azure/communication-ui-libr…
anjulgarg Aug 4, 2022
7f59246
resolving PR comments
anjulgarg Aug 4, 2022
00586c1
Change files
anjulgarg Aug 4, 2022
e4a6e2b
Merge branch 'anjulgarg/2940468-participant-state' of https://github.…
anjulgarg Aug 4, 2022
f4a54d8
Debugging video tile participant state display logic
anjulgarg Aug 4, 2022
782d34a
update api.md
anjulgarg Aug 4, 2022
2710515
cMerge branch 'anjulgarg/2940468-participant-state' of https://github…
anjulgarg Aug 4, 2022
b68cf49
Resolving PR comments
anjulgarg Aug 4, 2022
46d3381
fixing conditional compilation
anjulgarg Aug 4, 2022
788e4e4
fixing conditional compilation
anjulgarg Aug 4, 2022
062b894
Merge branch 'anjulgarg/2940468-participant-state' of https://github.…
anjulgarg Aug 4, 2022
493e879
fixing conditional compilation
anjulgarg Aug 4, 2022
694099b
Merge branch 'main' of https://github.com/Azure/communication-ui-libr…
anjulgarg Aug 4, 2022
657f859
Fixing conditional compilation errors
anjulgarg Aug 4, 2022
dfe4134
Change files
anjulgarg Aug 4, 2022
c3f504f
Merge branch 'anjulgarg/2940251-localise-videotile-participantState' …
anjulgarg Aug 4, 2022
d36abaa
Updating types to match video tile participant state
anjulgarg Aug 4, 2022
cae6254
updating api.md
anjulgarg Aug 4, 2022
c83e032
Merge branch 'main' of https://github.com/Azure/communication-ui-libr…
anjulgarg Aug 4, 2022
2dd5fb2
debugging
anjulgarg Aug 4, 2022
a7ae1ab
Change files
anjulgarg Aug 4, 2022
5df4793
Remove duplicate interface
anjulgarg Aug 4, 2022
4cd9cc5
Merge branch 'main' into anjulgarg/2941671-participantState-participa…
anjulgarg Aug 5, 2022
4f9e355
Update locale strings to match figma
anjulgarg Aug 5, 2022
c78196e
Merge branch 'main' into anjulgarg/2941671-participantState-participa…
anjulgarg Aug 5, 2022
94cf112
Merge branch 'main' into anjulgarg/2941671-participantState-participa…
anjulgarg Aug 6, 2022
5f7087c
Merge branch 'main' into anjulgarg/2941671-participantState-participa…
anjulgarg Aug 8, 2022
4c42a7f
Merge branch 'main' of https://github.com/Azure/communication-ui-libr…
anjulgarg Aug 8, 2022
294877e
Resolving PR comments
anjulgarg Aug 8, 2022
372e8ae
Merge branch 'anjulgarg/2941671-participantState-participantItem' of …
anjulgarg Aug 8, 2022
bfa7c8e
Update api.md
anjulgarg Aug 8, 2022
caad630
Update api.md
anjulgarg Aug 8, 2022
7a711b6
Merge branch 'main' into anjulgarg/2941671-participantState-participa…
anjulgarg Aug 9, 2022
79a15d1
Hide menu when participant is connecting or ringing etc.
anjulgarg Aug 9, 2022
7721afd
Merge branch 'anjulgarg/2941671-participantState-participantItem' of …
anjulgarg Aug 9, 2022
36820b4
Merge branch 'main' into anjulgarg/2941671-participantState-participa…
anjulgarg Aug 9, 2022
ceb1a0d
Merge branch 'main' into anjulgarg/2941671-participantState-participa…
anjulgarg Aug 9, 2022
7803602
Updating storybook snapshots
anjulgarg Aug 9, 2022
3f45c61
Merge branch 'anjulgarg/2941671-participantState-participantItem' of …
anjulgarg Aug 9, 2022
bd73417
Merge branch 'main' into anjulgarg/2941671-participantState-participa…
anjulgarg Aug 9, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "videoGallerySelector returns remote participants with a participant state",
"packageName": "@internal/calling-component-bindings",
"email": "anjulgarg@live.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "ParticipantItem can display a participant state using `participantState` prop",
"packageName": "@internal/react-components",
"email": "anjulgarg@live.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ import { memoizeFnAll, toFlatCommunicationIdentifier } from '@internal/acs-ui-co
import { RemoteParticipantState, RemoteVideoStreamState } from '@internal/calling-stateful-client';
import { VideoGalleryRemoteParticipant, VideoGalleryStream } from '@internal/react-components';
import { checkIsSpeaking } from './SelectorUtils';
/* @conditional-compile-remove(one-to-n-calling) */
/* @conditional-compile-remove(PSTN-calls) */
import { VideoGalleryRemoteParticipantState } from '@internal/react-components';

/** @internal */
export const _dominantSpeakersWithFlatId = (dominantSpeakers?: DominantSpeakersInfo): undefined | string[] => {
Expand Down Expand Up @@ -102,7 +99,7 @@ export const convertRemoteParticipantToVideoGalleryRemoteParticipant = (
isScreenSharingOn: screenShareStream !== undefined && screenShareStream.isAvailable,
/* @conditional-compile-remove(one-to-n-calling) */
/* @conditional-compile-remove(PSTN-calls) */
state: convertRemoteParticipantStateToVideoGalleryRemoteParticipantState(state)
state
Comment thread
anjulgarg marked this conversation as resolved.
};
};

Expand All @@ -116,29 +113,3 @@ const convertRemoteVideoStreamToVideoGalleryStream = (stream: RemoteVideoStreamS
renderElement: stream.view?.target
};
};

/* @conditional-compile-remove(one-to-n-calling) */
/* @conditional-compile-remove(PSTN-calls) */
/**
* We convert the Communication Participant states to simpler states that can be used with VideoTiles/VideoGallery.
*/
const convertRemoteParticipantStateToVideoGalleryRemoteParticipantState = (
state: RemoteParticipantConnectionState
): VideoGalleryRemoteParticipantState | undefined => {
// `Idle` is the first state of the participant.
if (state === 'Idle' || state === 'Connecting') {
return 'Connecting';
}
// `EarlyMedia` is a state when the media is played before a participant connects to the call.
// It occurs immediately after the `Connecting` state.
if (state === 'EarlyMedia' || state === 'Ringing') {
return 'Ringing';
}
if (state === 'Hold') {
return 'Hold';
}
if (state === 'Connected') {
return 'Connected';
}
return;
};
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ export interface CallingTheme {

// @public
export type CallParticipantListParticipant = ParticipantListParticipant & {
state: 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected';
state: ParticipantState;
Comment thread
JamesBurnside marked this conversation as resolved.
isScreenSharing?: boolean;
isMuted?: boolean;
isSpeaking?: boolean;
Expand Down Expand Up @@ -2306,6 +2306,7 @@ export interface ParticipantItemProps {
onClick?: (props?: ParticipantItemProps) => void;
onRenderAvatar?: OnRenderAvatarCallback;
onRenderIcon?: (props?: ParticipantItemProps) => JSX.Element | null;
participantState?: ParticipantState;
presence?: PersonaPresence;
showParticipantOverflowTooltip?: boolean;
strings?: Partial<ParticipantItemStrings>;
Expand All @@ -2319,6 +2320,9 @@ export interface ParticipantItemStrings {
isMeText: string;
menuTitle: string;
mutedIconLabel: string;
participantStateConnecting: string;
participantStateHold: string;
participantStateRinging: string;
removeButtonLabel: string;
sharingIconLabel: string;
}
Expand Down Expand Up @@ -2449,6 +2453,9 @@ export type ParticipantsRemovedListener = (event: {
removedBy: ChatParticipant;
}) => void;

// @public
export type ParticipantState = 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected';
Comment thread
anjulgarg marked this conversation as resolved.

// @public
export type ReadReceiptsBySenderId = {
[key: string]: {
Expand Down Expand Up @@ -2779,12 +2786,9 @@ export interface VideoGalleryRemoteParticipant extends VideoGalleryParticipant {
isSpeaking?: boolean;
screenShareStream?: VideoGalleryStream;
// @beta
state?: VideoGalleryRemoteParticipantState;
state?: ParticipantState;
}

// @beta
export type VideoGalleryRemoteParticipantState = 'Connecting' | 'Ringing' | 'Connected' | 'Hold';

// @public
export type VideoGallerySelector = (state: CallClientState, props: CallingBaseSelectorProps) => {
screenShareParticipant: VideoGalleryRemoteParticipant | undefined;
Expand Down Expand Up @@ -2846,7 +2850,7 @@ export interface VideoTileProps {
isSpeaking?: boolean;
noVideoAvailableAriaLabel?: string;
onRenderPlaceholder?: OnRenderAvatarCallback;
participantState?: VideoGalleryRemoteParticipantState;
participantState?: ParticipantState;
personaMaxSize?: number;
personaMinSize?: number;
renderElement?: JSX.Element | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ export interface CallingTheme {

// @public
export type CallParticipantListParticipant = ParticipantListParticipant & {
state: 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected';
state: ParticipantState;
isScreenSharing?: boolean;
isMuted?: boolean;
isSpeaking?: boolean;
Expand Down Expand Up @@ -2145,6 +2145,9 @@ export type ParticipantsRemovedListener = (event: {
removedBy: ChatParticipant;
}) => void;

// @public
export type ParticipantState = 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected';
Comment thread
anjulgarg marked this conversation as resolved.

// @public
export type ReadReceiptsBySenderId = {
[key: string]: {
Expand Down
8 changes: 2 additions & 6 deletions packages/communication-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ export type {
ParticipantListStyles,
ParticipantMenuItemsCallback,
ParticipantRemovedSystemMessage,
ParticipantState,
ParticipantsButtonContextualMenuStyles,
ParticipantsButtonProps,
ParticipantsButtonStrings,
Expand Down Expand Up @@ -233,12 +234,7 @@ export type {
FileMetadata
} from '../../react-components/src';
/* @conditional-compile-remove(PSTN-calls) */
export type {
HoldButtonProps,
HoldButtonStrings,
VideoGalleryRemoteParticipantState,
VideoTileStrings
} from '../../react-components/src';
export type { HoldButtonProps, HoldButtonStrings, VideoTileStrings } from '../../react-components/src';

export * from '../../react-components/src/localization/locales';
export * from '../../react-components/src/theming';
Expand Down
18 changes: 11 additions & 7 deletions packages/react-components/review/beta/react-components.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export interface CallingTheme {

// @public
export type CallParticipantListParticipant = ParticipantListParticipant & {
state: 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected';
state: ParticipantState;
isScreenSharing?: boolean;
isMuted?: boolean;
isSpeaking?: boolean;
Expand Down Expand Up @@ -1021,6 +1021,7 @@ export interface ParticipantItemProps {
onClick?: (props?: ParticipantItemProps) => void;
onRenderAvatar?: OnRenderAvatarCallback;
onRenderIcon?: (props?: ParticipantItemProps) => JSX.Element | null;
participantState?: ParticipantState;
presence?: PersonaPresence;
showParticipantOverflowTooltip?: boolean;
strings?: Partial<ParticipantItemStrings>;
Expand All @@ -1034,6 +1035,9 @@ export interface ParticipantItemStrings {
isMeText: string;
menuTitle: string;
mutedIconLabel: string;
participantStateConnecting: string;
participantStateHold: string;
participantStateRinging: string;
removeButtonLabel: string;
sharingIconLabel: string;
}
Expand Down Expand Up @@ -1130,6 +1134,9 @@ export interface ParticipantsButtonStyles extends ControlBarButtonStyles {
menuStyles?: Partial<ParticipantsButtonContextualMenuStyles>;
}

// @public
export type ParticipantState = 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected';

// @internal (undocumented)
export type _Permissions = {
cameraButton: boolean;
Expand Down Expand Up @@ -1201,7 +1208,7 @@ export const _RemoteVideoTile: React_2.MemoExoticComponent<(props: {
showMuteIndicator?: boolean | undefined;
showLabel?: boolean | undefined;
personaMinSize?: number | undefined;
state?: VideoGalleryRemoteParticipantState | undefined;
state?: ParticipantState | undefined;
}) => JSX.Element>;

// @beta (undocumented)
Expand Down Expand Up @@ -1396,12 +1403,9 @@ export interface VideoGalleryRemoteParticipant extends VideoGalleryParticipant {
isSpeaking?: boolean;
screenShareStream?: VideoGalleryStream;
// @beta
state?: VideoGalleryRemoteParticipantState;
state?: ParticipantState;
}

// @beta
export type VideoGalleryRemoteParticipantState = 'Connecting' | 'Ringing' | 'Connected' | 'Hold';

// @public
export interface VideoGalleryStream {
id?: number;
Expand Down Expand Up @@ -1448,7 +1452,7 @@ export interface VideoTileProps {
isSpeaking?: boolean;
noVideoAvailableAriaLabel?: string;
onRenderPlaceholder?: OnRenderAvatarCallback;
participantState?: VideoGalleryRemoteParticipantState;
participantState?: ParticipantState;
personaMaxSize?: number;
personaMinSize?: number;
renderElement?: JSX.Element | null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface CallingTheme {

// @public
export type CallParticipantListParticipant = ParticipantListParticipant & {
state: 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected';
state: ParticipantState;
isScreenSharing?: boolean;
isMuted?: boolean;
isSpeaking?: boolean;
Expand Down Expand Up @@ -1081,6 +1081,9 @@ export interface ParticipantsButtonStyles extends ControlBarButtonStyles {
menuStyles?: Partial<ParticipantsButtonContextualMenuStyles>;
}

// @public
export type ParticipantState = 'Idle' | 'Connecting' | 'Ringing' | 'Connected' | 'Hold' | 'InLobby' | 'EarlyMedia' | 'Disconnected';

// @internal
export const _PictureInPictureInPicture: (props: _PictureInPictureInPictureProps) => JSX.Element;

Expand Down Expand Up @@ -1130,7 +1133,7 @@ export const _RemoteVideoTile: React_2.MemoExoticComponent<(props: {
showMuteIndicator?: boolean | undefined;
showLabel?: boolean | undefined;
personaMinSize?: number | undefined;
state?: VideoGalleryRemoteParticipantState | undefined;
state?: ParticipantState | undefined;
}) => JSX.Element>;

// @public
Expand Down Expand Up @@ -1302,9 +1305,6 @@ export interface VideoGalleryRemoteParticipant extends VideoGalleryParticipant {
screenShareStream?: VideoGalleryStream;
}

// @beta
export type VideoGalleryRemoteParticipantState = 'Connecting' | 'Ringing' | 'Connected' | 'Hold';

// @public
export interface VideoGalleryStream {
id?: number;
Expand Down
Loading