@stream-io/video-client 1.40.1 → 1.40.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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.40.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.40.1...@stream-io/video-client-1.40.2) (2026-01-15)
6
+
7
+ ### Bug Fixes
8
+
9
+ - handle unrecoverable SFU join errors ([9b8198d](https://github.com/GetStream/stream-video-js/commit/9b8198d00e901a8eade169495a14d25c8d3bdf1e))
10
+ - handle unrecoverable SFU join errors ([#2083](https://github.com/GetStream/stream-video-js/issues/2083)) ([6ffb576](https://github.com/GetStream/stream-video-js/commit/6ffb5761b3dfb8e649cfa4f16dd30d294475eeae))
11
+
5
12
  ## [1.40.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.40.0...@stream-io/video-client-1.40.1) (2026-01-14)
6
13
 
7
14
  ### Bug Fixes
@@ -6060,7 +6060,7 @@ const getSdkVersion = (sdk) => {
6060
6060
  return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
6061
6061
  };
6062
6062
 
6063
- const version = "1.40.1";
6063
+ const version = "1.40.2";
6064
6064
  const [major, minor, patch] = version.split('.');
6065
6065
  let sdkInfo = {
6066
6066
  type: SdkType.PLAIN_JAVASCRIPT,
@@ -8493,14 +8493,27 @@ class StreamSfuClient {
8493
8493
  // be replaced with a new one in case a second join request is made
8494
8494
  const current = this.joinResponseTask;
8495
8495
  let timeoutId = undefined;
8496
+ const unsubscribeJoinErrorEvents = this.dispatcher.on('error', (event) => {
8497
+ const { error, reconnectStrategy } = event;
8498
+ if (!error)
8499
+ return;
8500
+ if (reconnectStrategy === WebsocketReconnectStrategy.DISCONNECT) {
8501
+ clearTimeout(timeoutId);
8502
+ unsubscribe?.();
8503
+ unsubscribeJoinErrorEvents();
8504
+ current.reject(new SfuJoinError(event));
8505
+ }
8506
+ });
8496
8507
  const unsubscribe = this.dispatcher.on('joinResponse', (joinResponse) => {
8497
8508
  clearTimeout(timeoutId);
8498
8509
  unsubscribe();
8510
+ unsubscribeJoinErrorEvents();
8499
8511
  this.keepAlive();
8500
8512
  current.resolve(joinResponse);
8501
8513
  });
8502
8514
  timeoutId = setTimeout(() => {
8503
8515
  unsubscribe();
8516
+ unsubscribeJoinErrorEvents();
8504
8517
  const message = `Waiting for "joinResponse" has timed out after ${this.joinResponseTimeout}ms`;
8505
8518
  this.tracer?.trace('joinRequestTimeout', message);
8506
8519
  current.reject(new Error(message));
@@ -8645,6 +8658,14 @@ StreamSfuClient.DISPOSE_OLD_SOCKET = 4100;
8645
8658
  * The close code used when the client fails to join the call (on the SFU).
8646
8659
  */
8647
8660
  StreamSfuClient.JOIN_FAILED = 4101;
8661
+ class SfuJoinError extends Error {
8662
+ constructor(event) {
8663
+ super(event.error?.message || 'Join Error');
8664
+ this.errorEvent = event;
8665
+ this.unrecoverable =
8666
+ event.reconnectStrategy === WebsocketReconnectStrategy.DISCONNECT;
8667
+ }
8668
+ }
8648
8669
 
8649
8670
  /**
8650
8671
  * Event handler that watched the delivery of `call.accepted`.
@@ -12421,7 +12442,8 @@ class Call {
12421
12442
  }
12422
12443
  catch (err) {
12423
12444
  this.logger.warn(`Failed to join call (${attempt})`, this.cid);
12424
- if (err instanceof ErrorFromResponse && err.unrecoverable) {
12445
+ if ((err instanceof ErrorFromResponse && err.unrecoverable) ||
12446
+ (err instanceof SfuJoinError && err.unrecoverable)) {
12425
12447
  // if the error is unrecoverable, we should not retry as that signals
12426
12448
  // that connectivity is good, but the coordinator doesn't allow the user
12427
12449
  // to join the call due to some reason (e.g., ended call, expired token...)
@@ -15092,7 +15114,7 @@ class StreamClient {
15092
15114
  this.getUserAgent = () => {
15093
15115
  if (!this.cachedUserAgent) {
15094
15116
  const { clientAppIdentifier = {} } = this.options;
15095
- const { sdkName = 'js', sdkVersion = "1.40.1", ...extras } = clientAppIdentifier;
15117
+ const { sdkName = 'js', sdkVersion = "1.40.2", ...extras } = clientAppIdentifier;
15096
15118
  this.cachedUserAgent = [
15097
15119
  `stream-video-${sdkName}-v${sdkVersion}`,
15098
15120
  ...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
@@ -15728,5 +15750,5 @@ const humanize = (n) => {
15728
15750
  return String(n);
15729
15751
  };
15730
15752
 
15731
- export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DebounceType, DeviceManager, DeviceManagerState, DynascaleManager, ErrorFromResponse, FrameRecordingSettingsRequestModeEnum, FrameRecordingSettingsRequestQualityEnum, FrameRecordingSettingsResponseModeEnum, IngressAudioEncodingOptionsRequestChannelsEnum, IngressSourceRequestFpsEnum, IngressVideoLayerRequestCodecEnum, LayoutSettingsRequestNameEnum, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RNSpeechDetector, RTMPBroadcastRequestQualityEnum, RTMPSettingsRequestQualityEnum, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, StartClosedCaptionsRequestLanguageEnum, StartTranscriptionRequestLanguageEnum, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsRequestClosedCaptionModeEnum, TranscriptionSettingsRequestLanguageEnum, TranscriptionSettingsRequestModeEnum, TranscriptionSettingsResponseClosedCaptionModeEnum, TranscriptionSettingsResponseLanguageEnum, TranscriptionSettingsResponseModeEnum, VideoSettingsRequestCameraFacingEnum, VideoSettingsResponseCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, deviceIds$, disposeOfMediaStream, dominantSpeaker, getAudioBrowserPermission, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceState, getScreenShareStream, getSdkInfo, getVideoBrowserPermission, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio, hasPausedTrack, hasScreenShare, hasScreenShareAudio, hasVideo, humanize, isPinned, livestreamOrAudioRoomSortPreset, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, resolveDeviceId, role, screenSharing, setDeviceInfo, setOSInfo, setPowerState, setSdkInfo, setThermalState, setWebRTCInfo, speakerLayoutSortPreset, speaking, videoLoggerSystem, withParticipantSource };
15753
+ export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DebounceType, DeviceManager, DeviceManagerState, DynascaleManager, ErrorFromResponse, FrameRecordingSettingsRequestModeEnum, FrameRecordingSettingsRequestQualityEnum, FrameRecordingSettingsResponseModeEnum, IngressAudioEncodingOptionsRequestChannelsEnum, IngressSourceRequestFpsEnum, IngressVideoLayerRequestCodecEnum, LayoutSettingsRequestNameEnum, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RNSpeechDetector, RTMPBroadcastRequestQualityEnum, RTMPSettingsRequestQualityEnum, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, SfuJoinError, models as SfuModels, SpeakerManager, SpeakerState, StartClosedCaptionsRequestLanguageEnum, StartTranscriptionRequestLanguageEnum, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsRequestClosedCaptionModeEnum, TranscriptionSettingsRequestLanguageEnum, TranscriptionSettingsRequestModeEnum, TranscriptionSettingsResponseClosedCaptionModeEnum, TranscriptionSettingsResponseLanguageEnum, TranscriptionSettingsResponseModeEnum, VideoSettingsRequestCameraFacingEnum, VideoSettingsResponseCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, deviceIds$, disposeOfMediaStream, dominantSpeaker, getAudioBrowserPermission, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceState, getScreenShareStream, getSdkInfo, getVideoBrowserPermission, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio, hasPausedTrack, hasScreenShare, hasScreenShareAudio, hasVideo, humanize, isPinned, livestreamOrAudioRoomSortPreset, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, resolveDeviceId, role, screenSharing, setDeviceInfo, setOSInfo, setPowerState, setSdkInfo, setThermalState, setWebRTCInfo, speakerLayoutSortPreset, speaking, videoLoggerSystem, withParticipantSource };
15732
15754
  //# sourceMappingURL=index.browser.es.js.map