From e4eaabf404f73903b8a323a887d5fcd5e24182c4 Mon Sep 17 00:00:00 2001 From: Mustafa BOLEKEN Date: Thu, 2 Jan 2025 15:17:19 +0300 Subject: [PATCH] save settings as state --- react/src/pages/AntMedia.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/react/src/pages/AntMedia.js b/react/src/pages/AntMedia.js index 65177499..8a0f1818 100644 --- a/react/src/pages/AntMedia.js +++ b/react/src/pages/AntMedia.js @@ -338,6 +338,8 @@ function AntMedia(props) { const [microphoneButtonDisabled, setMicrophoneButtonDisabled] = React.useState(false); const [cameraButtonDisabled, setCameraButtonDisabled] = React.useState(false); + const [settings, setSettings] = React.useState(); + const [screenSharingInProgress, setScreenSharingInProgress] = React.useState(false); const [requestSpeakerList, setRequestSpeakerList] = React.useState([]); @@ -2964,6 +2966,7 @@ function AntMedia(props) { console.log("--maxVideoTrackCountFromAppSettings: ", localSettings?.maxVideoTrackCount); setAppSettingsMaxVideoTrackCount(localSettings?.maxVideoTrackCount > 0 ? localSettings?.maxVideoTrackCount+1 : 6); } + setSettings(localSettings); } else if (obj.command === "startRecordingResponse") { console.log("Incoming startRecordingResponse:", obj); definition = JSON.parse(obj.definition); @@ -3172,7 +3175,8 @@ function AntMedia(props) { processUpdatedStatsForPlaySpeedTest, speedTestCounter, setRoomName, - setPublishStreamId + setPublishStreamId, + settings }} > {props.children}