@azure/communication-react 1.10.1-alpha-202311170012 → 1.10.1-alpha-202311180013

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.
@@ -2339,6 +2339,10 @@ export declare type CallingSounds = {
2339
2339
  * Sound to be played when the call is ringing
2340
2340
  */
2341
2341
  callRinging?: SoundEffect;
2342
+ /**
2343
+ * Sound to be played when the call is rejected by the user being callede
2344
+ */
2345
+ callBusy?: SoundEffect;
2342
2346
  };
2343
2347
 
2344
2348
  /**
@@ -3039,8 +3043,6 @@ export declare interface CallWithChatClientState {
3039
3043
  devices: DeviceManagerState;
3040
3044
  /** State of whether the active call is a Teams interop call */
3041
3045
  isTeamsCall: boolean;
3042
- /** State of whether the active call is a rooms call */
3043
- isRoomsCall: boolean;
3044
3046
  /** alternateCallerId for PSTN call */
3045
3047
  alternateCallerId?: string | undefined;
3046
3048
  /** Environment information for system adapter is made on */
@@ -177,7 +177,7 @@ const _isValidIdentifier = (identifier) => {
177
177
  // Copyright (c) Microsoft Corporation.
178
178
  // Licensed under the MIT License.
179
179
  // GENERATED FILE. DO NOT EDIT MANUALLY.
180
- var telemetryVersion = '1.10.1-alpha-202311170012';
180
+ var telemetryVersion = '1.10.1-alpha-202311180013';
181
181
 
182
182
  // Copyright (c) Microsoft Corporation.
183
183
  /**
@@ -30082,6 +30082,7 @@ const createProfileStateModifier = (onFetchProfile, notifyUpdate) => {
30082
30082
  };
30083
30083
 
30084
30084
  // Copyright (c) Microsoft Corporation.
30085
+ const CALL_REJECTED_CODE = 603;
30085
30086
  /**
30086
30087
  * @private
30087
30088
  */
@@ -30089,7 +30090,7 @@ class CallingSoundSubscriber {
30089
30090
  constructor(call, locator, sounds) {
30090
30091
  this.onCallStateChanged = () => {
30091
30092
  this.call.on('stateChanged', () => {
30092
- var _a, _b, _c;
30093
+ var _a, _b, _c, _d, _e;
30093
30094
  if (shouldPlayRingingSound(this.call, this.callLocator) && ((_a = this.soundsLoaded) === null || _a === void 0 ? void 0 : _a.callRingingSound)) {
30094
30095
  this.soundsLoaded.callRingingSound.loop = true;
30095
30096
  this.playSound(this.soundsLoaded.callRingingSound);
@@ -30099,8 +30100,13 @@ class CallingSoundSubscriber {
30099
30100
  this.soundsLoaded.callRingingSound.loop = false;
30100
30101
  this.soundsLoaded.callRingingSound.pause();
30101
30102
  }
30102
- if (this.call.state === 'Disconnected' && ((_c = this.soundsLoaded) === null || _c === void 0 ? void 0 : _c.callEndedSound)) {
30103
- this.playSound(this.soundsLoaded.callEndedSound);
30103
+ if (this.call.state === 'Disconnected') {
30104
+ if (((_c = this.soundsLoaded) === null || _c === void 0 ? void 0 : _c.callBusySound) && ((_d = this.call.callEndReason) === null || _d === void 0 ? void 0 : _d.code) === CALL_REJECTED_CODE) {
30105
+ this.playSound(this.soundsLoaded.callBusySound);
30106
+ }
30107
+ else if ((_e = this.soundsLoaded) === null || _e === void 0 ? void 0 : _e.callEndedSound) {
30108
+ this.playSound(this.soundsLoaded.callEndedSound);
30109
+ }
30104
30110
  }
30105
30111
  });
30106
30112
  };
@@ -30122,7 +30128,7 @@ class CallingSoundSubscriber {
30122
30128
  }
30123
30129
  }
30124
30130
  loadSounds(sounds) {
30125
- var _a, _b;
30131
+ var _a, _b, _c;
30126
30132
  let callEndedSound;
30127
30133
  if (sounds === null || sounds === void 0 ? void 0 : sounds.callEnded) {
30128
30134
  callEndedSound = new Audio((_a = sounds === null || sounds === void 0 ? void 0 : sounds.callEnded) === null || _a === void 0 ? void 0 : _a.path);
@@ -30133,9 +30139,15 @@ class CallingSoundSubscriber {
30133
30139
  callRingingSound = new Audio((_b = sounds === null || sounds === void 0 ? void 0 : sounds.callRinging) === null || _b === void 0 ? void 0 : _b.path);
30134
30140
  callRingingSound.preload = 'auto';
30135
30141
  }
30142
+ let callBusySound;
30143
+ if (sounds === null || sounds === void 0 ? void 0 : sounds.callBusy) {
30144
+ callBusySound = new Audio((_c = sounds === null || sounds === void 0 ? void 0 : sounds.callBusy) === null || _c === void 0 ? void 0 : _c.path);
30145
+ callBusySound.preload = 'auto';
30146
+ }
30136
30147
  return {
30137
30148
  callEndedSound,
30138
- callRingingSound
30149
+ callRingingSound,
30150
+ callBusySound
30139
30151
  };
30140
30152
  }
30141
30153
  playSound(sound) {
@@ -31625,7 +31637,7 @@ function callAdapterStateFromCallWithChatAdapterState(callWithChatAdapterState)
31625
31637
  devices: callWithChatAdapterState.devices,
31626
31638
  isTeamsCall: callWithChatAdapterState.isTeamsCall,
31627
31639
  /* @conditional-compile-remove(rooms) */
31628
- isRoomsCall: callWithChatAdapterState.isRoomsCall,
31640
+ isRoomsCall: false,
31629
31641
  latestErrors: callWithChatAdapterState.latestCallErrors,
31630
31642
  /* @conditional-compile-remove(PSTN-calls) */
31631
31643
  alternateCallerId: callWithChatAdapterState.alternateCallerId,
@@ -32148,8 +32160,6 @@ function callWithChatAdapterStateFromBackingStates(callAdapter, chatAdapter) {
32148
32160
  devices: callAdapterState.devices,
32149
32161
  isLocalPreviewMicrophoneEnabled: callAdapterState.isLocalPreviewMicrophoneEnabled,
32150
32162
  isTeamsCall: callAdapterState.isTeamsCall,
32151
- /* @conditional-compile-remove(rooms) */
32152
- isRoomsCall: callAdapterState.isRoomsCall,
32153
32163
  latestCallErrors: callAdapterState.latestErrors,
32154
32164
  latestChatErrors: chatAdapterState.latestErrors,
32155
32165
  /* @conditional-compile-remove(file-sharing) */