Skip to content

Commit edd932b

Browse files
Cherry pick #2392 (#2400)
1 parent 6e33a5a commit edd932b

4 files changed

Lines changed: 22 additions & 5 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Fix VideoGallery showing video spinners when the CallComposites are disconnecting from a call. ",
4+
"packageName": "@internal/react-components",
5+
"email": "2684369+JamesBurnside@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Fix CallWithChat control bar disappearing while the call is in the disconnecting state",
4+
"packageName": "@internal/react-composites",
5+
"email": "2684369+JamesBurnside@users.noreply.github.com",
6+
"dependentChangeType": "patch"
7+
}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ export const _RemoteVideoTile = React.memo(
8383
// Handle creating, destroying and updating the video stream as necessary
8484
useRemoteVideoStreamLifecycleMaintainer(remoteVideoStreamProps);
8585

86+
const showLoadingIndicator = isAvailable && isReceiving === false && props.participantState !== 'Disconnected';
87+
8688
const renderVideoStreamElement = useMemo(() => {
8789
// Checking if renderElement is well defined or not as calling SDK has a number of video streams limitation which
8890
// implies that, after their threshold, all streams have no child (blank video)
@@ -92,9 +94,9 @@ export const _RemoteVideoTile = React.memo(
9294
}
9395

9496
return (
95-
<StreamMedia videoStreamElement={renderElement} loadingState={isReceiving === false ? 'loading' : 'none'} />
97+
<StreamMedia videoStreamElement={renderElement} loadingState={showLoadingIndicator ? 'loading' : 'none'} />
9698
);
97-
}, [renderElement, isReceiving]);
99+
}, [renderElement, showLoadingIndicator]);
98100

99101
return (
100102
<VideoTile

packages/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -492,10 +492,11 @@ export const CallWithChatComposite = (props: CallWithChatCompositeProps): JSX.El
492492
const hasJoinedCallFn = (page: CallCompositePage, callStatus: CallState): boolean => {
493493
/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(one-to-n-calling) */
494494
return (
495-
(page === 'call' && (callStatus === 'Connected' || callStatus === 'RemoteHold')) ||
496-
(page === 'hold' && callStatus === 'LocalHold')
495+
(page === 'call' &&
496+
(callStatus === 'Connected' || callStatus === 'RemoteHold' || callStatus === 'Disconnecting')) ||
497+
(page === 'hold' && (callStatus === 'LocalHold' || callStatus === 'Disconnecting'))
497498
);
498-
return page === 'call' && callStatus === 'Connected';
499+
return page === 'call' && (callStatus === 'Connected' || callStatus === 'Disconnecting');
499500
};
500501

501502
const showShowChatTabHeaderButton = (callControls?: boolean | CallWithChatControlOptions): boolean => {

0 commit comments

Comments
 (0)