Skip to content

Commit

Permalink
Reapply "save settings as state"
Browse files Browse the repository at this point in the history
This reverts commit f15488f.
  • Loading branch information
mustafaboleken committed Jan 2, 2025
1 parent f15488f commit b10cbf5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion react/src/pages/AntMedia.js
Original file line number Diff line number Diff line change
Expand Up @@ -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([]);
Expand Down Expand Up @@ -2964,6 +2966,7 @@ function AntMedia(props) {
console.log("--maxVideoTrackCountFromAppSettings: ", localSettings?.maxVideoTrackCount);
setAppSettingsMaxVideoTrackCount(localSettings?.maxVideoTrackCount > 0 ? localSettings?.maxVideoTrackCount+1 : 6);
}
setSettings(localSettings);

Check warning on line 2969 in react/src/pages/AntMedia.js

View check run for this annotation

Codecov / codecov/patch

react/src/pages/AntMedia.js#L2969

Added line #L2969 was not covered by tests
} else if (obj.command === "startRecordingResponse") {
console.log("Incoming startRecordingResponse:", obj);
definition = JSON.parse(obj.definition);
Expand Down Expand Up @@ -3172,7 +3175,8 @@ function AntMedia(props) {
processUpdatedStatsForPlaySpeedTest,
speedTestCounter,
setRoomName,
setPublishStreamId
setPublishStreamId,
settings
}}
>
{props.children}
Expand Down

0 comments on commit b10cbf5

Please sign in to comment.