diff --git a/Project/package-lock.json b/Project/package-lock.json index b44804b..f61469a 100644 --- a/Project/package-lock.json +++ b/Project/package-lock.json @@ -8,7 +8,7 @@ "name": "ACSCallingSample", "version": "1.0.0", "dependencies": { - "@azure/communication-calling": "1.35.1-beta.1", + "@azure/communication-calling": "1.37.1-beta.1", "@azure/communication-calling-effects": "1.1.1-beta.1", "@azure/communication-common": "^2.3.0", "@azure/communication-identity": "^1.3.0", @@ -57,6 +57,35 @@ "node": ">=6.0.0" } }, + "node_modules/@azure-rest/core-client": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@azure-rest/core-client/-/core-client-2.5.0.tgz", + "integrity": "sha512-KMVIPxG6ygcQ1M2hKHahF7eddKejYsWTjoLIfTWiqnaj42dBkYzj4+S8rK9xxmlOaEHKZHcMrRbm0NfN4kgwHw==", + "license": "MIT", + "dependencies": { + "@azure/abort-controller": "^2.0.0", + "@azure/core-auth": "^1.9.0", + "@azure/core-rest-pipeline": "^1.5.0", + "@azure/core-tracing": "^1.0.1", + "@typespec/ts-http-runtime": "^0.3.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@azure-rest/core-client/node_modules/@azure/abort-controller": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", + "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@azure/abort-controller": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.1.0.tgz", @@ -69,11 +98,12 @@ } }, "node_modules/@azure/communication-calling": { - "version": "1.35.1-beta.1", - "resolved": "https://registry.npmjs.org/@azure/communication-calling/-/communication-calling-1.35.1-beta.1.tgz", - "integrity": "sha512-14+XcbkvaGTcYBCjutsGjyF8e5dMWoEJZOg8v9mnU/DX5Xz6ve+8Eqk9a+BqVmlgZHG02y/EHqzt+foyOPw4ow==", + "version": "1.37.1-beta.1", + "resolved": "https://registry.npmjs.org/@azure/communication-calling/-/communication-calling-1.37.1-beta.1.tgz", + "integrity": "sha512-M9UdieOnNRny7WzXr76FB3eIvTjObLez4Q0cQHa2ek44YWIpdFDwLRCfQyhGhq8YVh0RyuTNYRlsjA/lOhCfyw==", + "license": "Microsoft Software License Terms for the Azure Communications Services, Azure CPaaS, ACS Software Development Kit SDK, see LICENSE file", "dependencies": { - "@azure/communication-common": "^2.3.0", + "@azure/communication-common": "2.3.2-beta.1", "@azure/logger": "^1.0.3" } }, @@ -86,6 +116,38 @@ "events": "3.3.0" } }, + "node_modules/@azure/communication-calling/node_modules/@azure/abort-controller": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-2.1.2.tgz", + "integrity": "sha512-nBrLsEWm4J2u5LpAPjxADTlq3trDgVZZXHNKabeXZtpq3d3AbN/KGO82R87rdDz5/lYB024rtEf10/q0urNgsA==", + "license": "MIT", + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@azure/communication-calling/node_modules/@azure/communication-common": { + "version": "2.3.2-beta.1", + "resolved": "https://registry.npmjs.org/@azure/communication-common/-/communication-common-2.3.2-beta.1.tgz", + "integrity": "sha512-iZmSxSXv/EuMIsyw6lxfADexpwA9Sst4Is84QLTD/pcQ6YkzuiGo6SfePbQelredgHHLHVjbqkwCcA19ym/yiw==", + "license": "MIT", + "dependencies": { + "@azure-rest/core-client": "^2.3.3", + "@azure/abort-controller": "^2.1.2", + "@azure/core-auth": "^1.9.0", + "@azure/core-rest-pipeline": "^1.17.0", + "@azure/core-tracing": "^1.2.0", + "@azure/core-util": "^1.11.0", + "events": "^3.3.0", + "jwt-decode": "^4.0.0", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@azure/communication-common": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/@azure/communication-common/-/communication-common-2.3.1.tgz", @@ -2887,6 +2949,20 @@ "@types/node": "*" } }, + "node_modules/@typespec/ts-http-runtime": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@typespec/ts-http-runtime/-/ts-http-runtime-0.3.0.tgz", + "integrity": "sha512-sOx1PKSuFwnIl7z4RN0Ls7N9AQawmR9r66eI5rFCzLDIs8HTIYrIpH9QjYWoX0lkgGrkLxXhi4QnK7MizPRrIg==", + "license": "MIT", + "dependencies": { + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", diff --git a/Project/package.json b/Project/package.json index 70ab692..bdbc599 100644 --- a/Project/package.json +++ b/Project/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "private": true, "dependencies": { - "@azure/communication-calling": "1.35.1-beta.1", + "@azure/communication-calling": "1.37.1-beta.1", "@azure/communication-calling-effects": "1.1.1-beta.1", "@azure/communication-common": "^2.3.0", "@azure/communication-identity": "^1.3.0", diff --git a/Project/src/MakeCall/MakeCall.js b/Project/src/MakeCall/MakeCall.js index b7503ea..c8ba41a 100644 --- a/Project/src/MakeCall/MakeCall.js +++ b/Project/src/MakeCall/MakeCall.js @@ -88,7 +88,7 @@ export default class MakeCall extends React.Component { setInterval(() => { if (this.state.ufdMessages.length > 0) { - this.setState({ ufdMessages: this.state.ufdMessages.slice(1) }); + this.setState({ ufdMessages: this.state.ufdMessages.slice() }); } }, 10000); @@ -173,16 +173,9 @@ export default class MakeCall extends React.Component { Diagnostic: ${diagnosticInfo.diagnostic} Value: ${diagnosticInfo.value} Value type: ${diagnosticInfo.valueType}`; - if (this.state.ufdMessages.length > 0) { - // limit speakingWhileMicrophoneIsMuted diagnostic until another diagnostic is received - if (diagnosticInfo.diagnostic === 'speakingWhileMicrophoneIsMuted' && this.state.ufdMessages[0].includes('speakingWhileMicrophoneIsMuted')) { - console.info(rmsg); - return; - } - this.setState({ ufdMessages: [rmsg, ...this.state.ufdMessages] }); - } else { - this.setState({ ufdMessages: [rmsg] }); - } + this.setState(prevState => ({ + ufdMessages: [rmsg, ...prevState.ufdMessages] + })); }; const remoteDiagnosticChangedListener = (diagnosticArgs) => { @@ -193,11 +186,9 @@ export default class MakeCall extends React.Component { Value type: ${diagnosticInfo.valueType} Participant Id: ${diagnosticInfo.participantId} Participant name: ${diagnosticInfo.remoteParticipant?.displayName}`; - if (this.state.ufdMessages.length > 0) { - this.setState({ ufdMessages: [rmsg, ...this.state.ufdMessages] }); - } else { - this.setState({ ufdMessages: [rmsg] }); - } + this.setState(prevState => ({ + ufdMessages: [rmsg, ...prevState.ufdMessages] + })); }); };