From fa2e6c8acb0406c4d3ccb464fc5916fc2e8505c0 Mon Sep 17 00:00:00 2001 From: Victor Rios Date: Wed, 1 Oct 2025 14:10:13 -0700 Subject: [PATCH] #4240940: Adding ovc change reason --- Project/src/MakeCall/CallCard.js | 2 +- Project/src/MakeCall/CurrentCallInformation.js | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Project/src/MakeCall/CallCard.js b/Project/src/MakeCall/CallCard.js index 4222d2d0..c3901cf2 100644 --- a/Project/src/MakeCall/CallCard.js +++ b/Project/src/MakeCall/CallCard.js @@ -493,7 +493,7 @@ export default class CallCard extends React.Component { const ovcFeature = this.call.feature(Features.OptimalVideoCount); const ovcChangedHandler = () => { if (this.state.ovc !== ovcFeature.optimalVideoCount) { - this.setState({ ovc: ovcFeature.optimalVideoCount }); + this.setState({ ovc: ovcFeature.optimalVideoCount, lastOvcChangeReason: ovcFeature.lastOvcChangeReason }); this.updateListOfParticipantsToRender('optimalVideoCountChanged'); } } diff --git a/Project/src/MakeCall/CurrentCallInformation.js b/Project/src/MakeCall/CurrentCallInformation.js index 110538cb..54b9e00b 100644 --- a/Project/src/MakeCall/CurrentCallInformation.js +++ b/Project/src/MakeCall/CurrentCallInformation.js @@ -5,6 +5,7 @@ import { AzureLogger } from '@azure/logger'; const CurrentCallInformation = ({ sentResolution, call }) => { const [ovcFeature, setOvcFeature] = useState(); const [optimalVideoCount, setOptimalVideoCount] = useState(1); + const [lastOvcChangeReason, setLastOvcChangeReason] = useState('Unknown'); useEffect(() => { try { @@ -24,6 +25,9 @@ const CurrentCallInformation = ({ sentResolution, call }) => { const optimalVideoCountChanged = () => { setOptimalVideoCount(ovcFeature.optimalVideoCount); + if (ovcFeature.lastOvcChangeReason) { + setLastOvcChangeReason(ovcFeature.lastOvcChangeReason); + } }; return ( @@ -34,7 +38,12 @@ const CurrentCallInformation = ({ sentResolution, call }) => { sentResolution &&
Sent Resolution: {sentResolution}
} { - ovcFeature &&
Optimal Video Count: {optimalVideoCount}
+ ovcFeature && ( + <> +
Optimal Video Count: {optimalVideoCount}
+
Last OVC Change Reason: {lastOvcChangeReason}
+ + ) } );