@stream-io/video-client 1.53.0 → 1.53.2

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/index.cjs.js CHANGED
@@ -6660,7 +6660,7 @@ const getSdkVersion = (sdk) => {
6660
6660
  return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
6661
6661
  };
6662
6662
 
6663
- const version = "1.53.0";
6663
+ const version = "1.53.2";
6664
6664
  const [major, minor, patch] = version.split('.');
6665
6665
  let sdkInfo = {
6666
6666
  type: SdkType.PLAIN_JAVASCRIPT,
@@ -13159,6 +13159,7 @@ class MicrophoneManager extends AudioDeviceManager {
13159
13159
  ]), async ([callingState, ownCapabilities, deviceId, status, permissionState,]) => {
13160
13160
  try {
13161
13161
  if (callingState === exports.CallingState.LEFT) {
13162
+ this.setMutedRecordingPrepared(false);
13162
13163
  await this.stopSpeakingWhileMutedDetection();
13163
13164
  }
13164
13165
  if (callingState !== exports.CallingState.JOINED)
@@ -13168,13 +13169,16 @@ class MicrophoneManager extends AudioDeviceManager {
13168
13169
  if (ownCapabilities.includes(OwnCapability.SEND_AUDIO)) {
13169
13170
  const hasPermission = await this.hasPermission(permissionState);
13170
13171
  if (hasPermission && status !== 'enabled') {
13172
+ this.setMutedRecordingPrepared(true);
13171
13173
  await this.startSpeakingWhileMutedDetection(deviceId);
13172
13174
  }
13173
13175
  else {
13176
+ this.setMutedRecordingPrepared(false);
13174
13177
  await this.stopSpeakingWhileMutedDetection();
13175
13178
  }
13176
13179
  }
13177
13180
  else {
13181
+ this.setMutedRecordingPrepared(false);
13178
13182
  await this.stopSpeakingWhileMutedDetection();
13179
13183
  }
13180
13184
  }
@@ -13492,6 +13496,16 @@ class MicrophoneManager extends AudioDeviceManager {
13492
13496
  this.logger.warn('Failed to stop speaking while muted detector', err);
13493
13497
  });
13494
13498
  }
13499
+ /**
13500
+ * iOS-only: keep the mic-input chain prepared while muted
13501
+ * so the `AVAudioEngine` stays full-duplex and remote audio renders on a
13502
+ * muted join.
13503
+ */
13504
+ setMutedRecordingPrepared(enabled) {
13505
+ if (!isReactNative())
13506
+ return;
13507
+ globalThis.streamRNVideoSDK?.callManager.setMutedRecordingPrepared?.(enabled);
13508
+ }
13495
13509
  async hasPermission(permissionState) {
13496
13510
  if (!isReactNative())
13497
13511
  return permissionState === 'granted';
@@ -17468,11 +17482,11 @@ class StreamClient {
17468
17482
  return await this.wsConnection.connect(this.defaultWSTimeout);
17469
17483
  };
17470
17484
  this.getSdkVersion = () => this.options.clientAppIdentifier?.sdkVersion ||
17471
- "1.53.0";
17485
+ "1.53.2";
17472
17486
  this.getUserAgent = () => {
17473
17487
  if (!this.cachedUserAgent) {
17474
17488
  const { clientAppIdentifier = {} } = this.options;
17475
- const { sdkName = 'js', sdkVersion = "1.53.0", ...extras } = clientAppIdentifier;
17489
+ const { sdkName = 'js', sdkVersion = "1.53.2", ...extras } = clientAppIdentifier;
17476
17490
  this.cachedUserAgent = [
17477
17491
  `stream-video-${sdkName}-v${sdkVersion}`,
17478
17492
  ...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
@@ -17877,8 +17891,12 @@ class ClientEventReporter {
17877
17891
  if (!joinAttemptId)
17878
17892
  return;
17879
17893
  const coordinatorConnectId = this.coordinatorConnectId;
17894
+ const ctx = this.callContexts.get(cid);
17880
17895
  this.send({
17881
- user_id: this.streamClient.userID,
17896
+ user_id: this.streamClient.userID || this.coordinatorConnectUserId,
17897
+ type: ctx?.callType,
17898
+ id: ctx?.callId,
17899
+ call_cid: cid,
17882
17900
  stage: 'JoinInitiated',
17883
17901
  join_attempt_id: joinAttemptId,
17884
17902
  ...(coordinatorConnectId && {
@@ -18128,7 +18146,7 @@ class ClientEventReporter {
18128
18146
  const ctx = this.callContexts.get(cid);
18129
18147
  const coordinatorConnectId = this.coordinatorConnectId;
18130
18148
  return {
18131
- user_id: this.streamClient.userID,
18149
+ user_id: this.streamClient.userID || this.coordinatorConnectUserId,
18132
18150
  type: ctx?.callType ?? '',
18133
18151
  id: ctx?.callId ?? '',
18134
18152
  call_cid: cid,