Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion Project/src/MakeCall/CallCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
}
Expand Down
11 changes: 10 additions & 1 deletion Project/src/MakeCall/CurrentCallInformation.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -24,6 +25,9 @@ const CurrentCallInformation = ({ sentResolution, call }) => {

const optimalVideoCountChanged = () => {
setOptimalVideoCount(ovcFeature.optimalVideoCount);
if (ovcFeature.lastOvcChangeReason) {
setLastOvcChangeReason(ovcFeature.lastOvcChangeReason);
}
};

return (
Expand All @@ -34,7 +38,12 @@ const CurrentCallInformation = ({ sentResolution, call }) => {
sentResolution && <div>Sent Resolution: {sentResolution}</div>
}
{
ovcFeature && <div>Optimal Video Count: {optimalVideoCount}</div>
ovcFeature && (
<>
<div>Optimal Video Count: {optimalVideoCount}</div>
<div>Last OVC Change Reason: {lastOvcChangeReason}</div>
</>
)
}
</div>
);
Expand Down
Loading