@azure/communication-react 1.13.0-alpha-202402140012 → 1.13.0-alpha-202402150012
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/communication-react.d.ts +10 -10
- package/dist/dist-cjs/communication-react/index.js +13 -54
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js +8 -12
- package/dist/dist-esm/calling-stateful-client/src/CallDeclarativeCommon.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +4 -41
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +4 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/package.json +2 -2
@@ -103,7 +103,7 @@ import { TeamsCall } from '@azure/communication-calling';
|
|
103
103
|
import { TeamsCallAgent } from '@azure/communication-calling';
|
104
104
|
import { TeamsMeetingLinkLocator } from '@azure/communication-calling';
|
105
105
|
import { Theme } from '@fluentui/react';
|
106
|
-
import {
|
106
|
+
import { TransferEventArgs } from '@azure/communication-calling';
|
107
107
|
import { TypingIndicatorReceivedEvent } from '@azure/communication-chat';
|
108
108
|
import { UnknownIdentifier } from '@azure/communication-common';
|
109
109
|
import { VideoDeviceInfo } from '@azure/communication-calling';
|
@@ -1180,7 +1180,7 @@ export declare interface CallAdapterSubscribers {
|
|
1180
1180
|
/**
|
1181
1181
|
* Subscribe function for 'transferRequested' event.
|
1182
1182
|
*/
|
1183
|
-
on(event: '
|
1183
|
+
on(event: 'transferAccepted', listener: TransferAcceptedListener): void;
|
1184
1184
|
/**
|
1185
1185
|
* Subscribe function for 'capabilitiesChanged' event.
|
1186
1186
|
*/
|
@@ -1260,7 +1260,7 @@ export declare interface CallAdapterSubscribers {
|
|
1260
1260
|
/**
|
1261
1261
|
* Unsubscribe function for 'transferRequested' event.
|
1262
1262
|
*/
|
1263
|
-
off(event: '
|
1263
|
+
off(event: 'transferAccepted', listener: TransferAcceptedListener): void;
|
1264
1264
|
/**
|
1265
1265
|
* Unsubscribe function for 'capabilitiesChanged' event.
|
1266
1266
|
*/
|
@@ -10396,6 +10396,13 @@ export declare interface TranscriptionCallFeature {
|
|
10396
10396
|
isTranscriptionActive: boolean;
|
10397
10397
|
}
|
10398
10398
|
|
10399
|
+
/**
|
10400
|
+
* Callback for {@link CallAdapterSubscribers} 'transferRequested' event.
|
10401
|
+
*
|
10402
|
+
* @beta
|
10403
|
+
*/
|
10404
|
+
export declare type TransferAcceptedListener = (event: TransferEventArgs) => void;
|
10405
|
+
|
10399
10406
|
/**
|
10400
10407
|
* Transfer feature state
|
10401
10408
|
*
|
@@ -10410,13 +10417,6 @@ export declare interface TransferFeature {
|
|
10410
10417
|
};
|
10411
10418
|
}
|
10412
10419
|
|
10413
|
-
/**
|
10414
|
-
* Callback for {@link CallAdapterSubscribers} 'transferRequested' event.
|
10415
|
-
*
|
10416
|
-
* @beta
|
10417
|
-
*/
|
10418
|
-
export declare type TransferRequestedListener = (event: TransferRequestedEventArgs) => void;
|
10419
|
-
|
10420
10420
|
/**
|
10421
10421
|
* Component to notify local user when one or more participants in the chat thread are typing.
|
10422
10422
|
*
|
@@ -173,7 +173,7 @@ function getDefaultExportFromCjs (x) {
|
|
173
173
|
// Copyright (c) Microsoft Corporation.
|
174
174
|
// Licensed under the MIT License.
|
175
175
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
176
|
-
var telemetryVersion = '1.13.0-alpha-
|
176
|
+
var telemetryVersion = '1.13.0-alpha-202402150012';
|
177
177
|
|
178
178
|
|
179
179
|
var telemetryVersion$1 = /*@__PURE__*/getDefaultExportFromCjs(telemetryVersion);
|
@@ -4528,21 +4528,17 @@ class ProxyTransferCallFeature {
|
|
4528
4528
|
switch (prop) {
|
4529
4529
|
case 'on':
|
4530
4530
|
return (...args) => {
|
4531
|
-
const
|
4532
|
-
if (
|
4531
|
+
const isTransferAccepted = args[0] === 'transferAccepted';
|
4532
|
+
if (isTransferAccepted) {
|
4533
4533
|
const listener = args[1];
|
4534
4534
|
const newListener = (args) => {
|
4535
|
-
|
4536
|
-
|
4537
|
-
|
4538
|
-
|
4539
|
-
|
4540
|
-
});
|
4541
|
-
return acceptedTransferCall;
|
4542
|
-
} });
|
4543
|
-
listener(newArgs);
|
4535
|
+
this._context.setAcceptedTransfer(this._call.id, {
|
4536
|
+
callId: args.targetCall.id,
|
4537
|
+
timestamp: new Date()
|
4538
|
+
});
|
4539
|
+
listener(args);
|
4544
4540
|
};
|
4545
|
-
return target.on('
|
4541
|
+
return target.on('transferAccepted', newListener);
|
4546
4542
|
}
|
4547
4543
|
};
|
4548
4544
|
default:
|
@@ -33458,7 +33454,7 @@ class AzureCommunicationCallAdapter {
|
|
33458
33454
|
/* @conditional-compile-remove(video-background-effects) */ options, this.targetCallees);
|
33459
33455
|
this.context.onCallEnded((endCallData) => this.emitter.emit('callEnded', endCallData));
|
33460
33456
|
const onStateChange = (clientState) => {
|
33461
|
-
var _a, _b, _c
|
33457
|
+
var _a, _b, _c;
|
33462
33458
|
// unsubscribe when the instance gets disposed
|
33463
33459
|
if (!this) {
|
33464
33460
|
callClient.offStateChange(onStateChange);
|
@@ -33480,31 +33476,6 @@ class AzureCommunicationCallAdapter {
|
|
33480
33476
|
});
|
33481
33477
|
}
|
33482
33478
|
this.context.updateClientState(clientState);
|
33483
|
-
/* @conditional-compile-remove(call-transfer) */
|
33484
|
-
const acceptedTransferCallState = this.context.getState().acceptedTransferCallState;
|
33485
|
-
/* @conditional-compile-remove(call-transfer) */
|
33486
|
-
// TODO: Remove this if statement when Calling SDK prevents accepting transfer requests that have timed out
|
33487
|
-
// This is to handle the case when there has been an accepted transfer call that is now in the connected state
|
33488
|
-
// AND is not the current call. Ensure we leave the current call.
|
33489
|
-
if (acceptedTransferCallState &&
|
33490
|
-
acceptedTransferCallState.state === 'Connected' &&
|
33491
|
-
((_d = this.call) === null || _d === void 0 ? void 0 : _d.id) &&
|
33492
|
-
acceptedTransferCallState.id !== this.call.id) {
|
33493
|
-
const cAgent = callAgent;
|
33494
|
-
const transferCall = cAgent.calls.find((call) => call.id === acceptedTransferCallState.id);
|
33495
|
-
if (transferCall) {
|
33496
|
-
const oldCall = this.call;
|
33497
|
-
this.processNewCall(transferCall);
|
33498
|
-
// Arbitrary wait time before hanging up. 2 seconds is derived from manual testing. This is to allow
|
33499
|
-
// transferor to hang up themselves. If the transferor has not hung up, we hang up because we are now
|
33500
|
-
// in the transfer call
|
33501
|
-
setTimeout(() => {
|
33502
|
-
if ((oldCall === null || oldCall === void 0 ? void 0 : oldCall.state) === 'Connected') {
|
33503
|
-
oldCall.hangUp();
|
33504
|
-
}
|
33505
|
-
}, 2000);
|
33506
|
-
}
|
33507
|
-
}
|
33508
33479
|
};
|
33509
33480
|
this.handlers = createHandlers(callClient, callAgent, deviceManager, undefined,
|
33510
33481
|
/* @conditional-compile-remove(video-background-effects) */ {
|
@@ -34148,7 +34119,7 @@ class AzureCommunicationCallAdapter {
|
|
34148
34119
|
/* @conditional-compile-remove(rooms) */
|
34149
34120
|
(_f = this.call) === null || _f === void 0 ? void 0 : _f.on('roleChanged', this.roleChanged.bind(this));
|
34150
34121
|
/* @conditional-compile-remove(call-transfer) */
|
34151
|
-
(_g = this.call) === null || _g === void 0 ? void 0 : _g.feature(communicationCalling.Features.Transfer).on('
|
34122
|
+
(_g = this.call) === null || _g === void 0 ? void 0 : _g.feature(communicationCalling.Features.Transfer).on('transferAccepted', this.transferAccepted.bind(this));
|
34152
34123
|
/* @conditional-compile-remove(capabilities) */
|
34153
34124
|
(_h = this.call) === null || _h === void 0 ? void 0 : _h.feature(communicationCalling.Features.Capabilities).on('capabilitiesChanged', this.capabilitiesChanged.bind(this));
|
34154
34125
|
/* @conditional-compile-remove(spotlight) */
|
@@ -34222,20 +34193,8 @@ class AzureCommunicationCallAdapter {
|
|
34222
34193
|
});
|
34223
34194
|
}
|
34224
34195
|
/* @conditional-compile-remove(call-transfer) */
|
34225
|
-
|
34226
|
-
|
34227
|
-
var _a, _b, _c, _d, _e, _f;
|
34228
|
-
const videoSource = (_c = (_b = (_a = this.context.getState().call) === null || _a === void 0 ? void 0 : _a.localVideoStreams) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.source;
|
34229
|
-
args.accept({
|
34230
|
-
audioOptions: (_d = options === null || options === void 0 ? void 0 : options.audioOptions) !== null && _d !== void 0 ? _d : {
|
34231
|
-
muted: !!((_e = this.context.getState().call) === null || _e === void 0 ? void 0 : _e.isMuted)
|
34232
|
-
},
|
34233
|
-
videoOptions: (_f = options === null || options === void 0 ? void 0 : options.videoOptions) !== null && _f !== void 0 ? _f :
|
34234
|
-
/* maintain video state if options.videoOptions is not defined */
|
34235
|
-
(videoSource ? { localVideoStreams: [new communicationCalling.LocalVideoStream(videoSource)] } : undefined)
|
34236
|
-
});
|
34237
|
-
} });
|
34238
|
-
this.emitter.emit('transferRequested', newArgs);
|
34196
|
+
transferAccepted(args) {
|
34197
|
+
this.emitter.emit('transferAccepted', args);
|
34239
34198
|
}
|
34240
34199
|
/* @conditional-compile-remove(capabilities) */
|
34241
34200
|
capabilitiesChanged(data) {
|