@stream-io/video-client 1.27.5 → 1.28.1

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,18 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [1.28.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.28.0...@stream-io/video-client-1.28.1) (2025-08-22)
6
+
7
+ ### Bug Fixes
8
+
9
+ - handle pre ended calls on ringing push arrival ([#1897](https://github.com/GetStream/stream-video-js/issues/1897)) ([935e375](https://github.com/GetStream/stream-video-js/commit/935e3756035639c651b3ac4469321a64b8576a0e))
10
+
11
+ ## [1.28.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.27.5...@stream-io/video-client-1.28.0) (2025-08-21)
12
+
13
+ ### Features
14
+
15
+ - Kick user from a call ([#1894](https://github.com/GetStream/stream-video-js/issues/1894)) ([32e2afc](https://github.com/GetStream/stream-video-js/commit/32e2afca0ea59e3f57e1ff9d05828c1e07fbff78))
16
+
5
17
  ## [1.27.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.27.4...@stream-io/video-client-1.27.5) (2025-08-15)
6
18
 
7
19
  ### Bug Fixes
@@ -59,6 +59,20 @@ const FrameRecordingSettingsResponseModeEnum = {
59
59
  DISABLED: 'disabled',
60
60
  AUTO_ON: 'auto-on',
61
61
  };
62
+ /**
63
+ * @export
64
+ */
65
+ const IngressAudioEncodingOptionsRequestChannelsEnum = {
66
+ NUMBER_1: 1,
67
+ NUMBER_2: 2,
68
+ };
69
+ /**
70
+ * @export
71
+ */
72
+ const IngressVideoLayerRequestCodecEnum = {
73
+ H264: 'h264',
74
+ VP8: 'vp8',
75
+ };
62
76
  /**
63
77
  * @export
64
78
  */
@@ -91,6 +105,7 @@ const OwnCapability = {
91
105
  JOIN_BACKSTAGE: 'join-backstage',
92
106
  JOIN_CALL: 'join-call',
93
107
  JOIN_ENDED_CALL: 'join-ended-call',
108
+ KICK_USER: 'kick-user',
94
109
  MUTE_USERS: 'mute-users',
95
110
  PIN_FOR_EVERYONE: 'pin-for-everyone',
96
111
  READ_CALL: 'read-call',
@@ -5287,6 +5302,7 @@ class CallState {
5287
5302
  this.eventHandlers = {
5288
5303
  // these events are not updating the call state:
5289
5304
  'call.frame_recording_ready': undefined,
5305
+ 'call.kicked_user': undefined,
5290
5306
  'call.moderation_blur': undefined,
5291
5307
  'call.moderation_warning': undefined,
5292
5308
  'call.permission_request': undefined,
@@ -5296,6 +5312,7 @@ class CallState {
5296
5312
  'call.rtmp_broadcast_stopped': undefined,
5297
5313
  'call.stats_report_ready': undefined,
5298
5314
  'call.transcription_ready': undefined,
5315
+ 'call.user_feedback_submitted': undefined,
5299
5316
  'call.user_muted': undefined,
5300
5317
  'connection.error': undefined,
5301
5318
  'connection.ok': undefined,
@@ -5636,7 +5653,7 @@ const getSdkVersion = (sdk) => {
5636
5653
  return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
5637
5654
  };
5638
5655
 
5639
- const version = "1.27.5";
5656
+ const version = "1.28.1";
5640
5657
  const [major, minor, patch] = version.split('.');
5641
5658
  let sdkInfo = {
5642
5659
  type: SdkType.PLAIN_JAVASCRIPT,
@@ -8726,10 +8743,6 @@ const registerEventHandlers = (call, dispatcher) => {
8726
8743
  call.on('inboundStateNotification', watchInboundStateNotification(state)),
8727
8744
  handleRemoteSoftMute(call),
8728
8745
  ];
8729
- if (call.ringing) {
8730
- // these events are only relevant when the call is ringing
8731
- eventHandlers.push(registerRingingCallEventHandlers(call));
8732
- }
8733
8746
  return () => {
8734
8747
  eventHandlers.forEach((unsubscribe) => unsubscribe());
8735
8748
  };
@@ -11521,6 +11534,21 @@ class Call {
11521
11534
  });
11522
11535
  }
11523
11536
  }));
11537
+ if (this.ringing) {
11538
+ // if the call is ringing, we need to register the ringing call effects
11539
+ this.handleRingingCall();
11540
+ }
11541
+ else {
11542
+ // if the call is not ringing, we need to register the ringing call subscriptions
11543
+ // to handle the case when the call gets ringing flag after creation event
11544
+ this.leaveCallHooks.add(
11545
+ // "ringing" mode effects and event handlers
11546
+ createSubscription(this.ringingSubject, (isRinging) => {
11547
+ if (!isRinging)
11548
+ return;
11549
+ this.handleRingingCall();
11550
+ }));
11551
+ }
11524
11552
  this.leaveCallHooks.add(
11525
11553
  // cancel auto-drop when call is accepted or rejected
11526
11554
  createSubscription(this.state.session$, (session) => {
@@ -11542,53 +11570,49 @@ class Call {
11542
11570
  });
11543
11571
  }
11544
11572
  }));
11545
- this.leaveCallHooks.add(
11546
- // "ringing" mode effects and event handlers
11547
- createSubscription(this.ringingSubject, (isRinging) => {
11548
- if (!isRinging)
11549
- return;
11550
- const callSession = this.state.session;
11551
- const receiver_id = this.clientStore.connectedUser?.id;
11552
- const ended_at = callSession?.ended_at;
11553
- const created_by_id = this.state.createdBy?.id;
11554
- const rejected_by = callSession?.rejected_by;
11555
- const accepted_by = callSession?.accepted_by;
11556
- let leaveCallIdle = false;
11557
- if (ended_at) {
11558
- // call was ended before it was accepted or rejected so we should leave it to idle
11573
+ };
11574
+ this.handleRingingCall = () => {
11575
+ const callSession = this.state.session;
11576
+ const receiver_id = this.clientStore.connectedUser?.id;
11577
+ const ended_at = callSession?.ended_at;
11578
+ const created_by_id = this.state.createdBy?.id;
11579
+ const rejected_by = callSession?.rejected_by;
11580
+ const accepted_by = callSession?.accepted_by;
11581
+ let leaveCallIdle = false;
11582
+ if (ended_at) {
11583
+ // call was ended before it was accepted or rejected so we should leave it to idle
11584
+ leaveCallIdle = true;
11585
+ }
11586
+ else if (created_by_id && rejected_by) {
11587
+ if (rejected_by[created_by_id]) {
11588
+ // call was cancelled by the caller
11559
11589
  leaveCallIdle = true;
11560
11590
  }
11561
- else if (created_by_id && rejected_by) {
11562
- if (rejected_by[created_by_id]) {
11563
- // call was cancelled by the caller
11564
- leaveCallIdle = true;
11565
- }
11566
- }
11567
- else if (receiver_id && rejected_by) {
11568
- if (rejected_by[receiver_id]) {
11569
- // call was rejected by the receiver in some other device
11570
- leaveCallIdle = true;
11571
- }
11591
+ }
11592
+ else if (receiver_id && rejected_by) {
11593
+ if (rejected_by[receiver_id]) {
11594
+ // call was rejected by the receiver in some other device
11595
+ leaveCallIdle = true;
11572
11596
  }
11573
- else if (receiver_id && accepted_by) {
11574
- if (accepted_by[receiver_id]) {
11575
- // call was accepted by the receiver in some other device
11576
- leaveCallIdle = true;
11577
- }
11597
+ }
11598
+ else if (receiver_id && accepted_by) {
11599
+ if (accepted_by[receiver_id]) {
11600
+ // call was accepted by the receiver in some other device
11601
+ leaveCallIdle = true;
11578
11602
  }
11579
- if (leaveCallIdle) {
11580
- if (this.state.callingState !== CallingState.IDLE) {
11581
- this.state.setCallingState(CallingState.IDLE);
11582
- }
11603
+ }
11604
+ if (leaveCallIdle) {
11605
+ if (this.state.callingState !== CallingState.IDLE) {
11606
+ this.state.setCallingState(CallingState.IDLE);
11583
11607
  }
11584
- else {
11585
- if (this.state.callingState === CallingState.IDLE) {
11586
- this.state.setCallingState(CallingState.RINGING);
11587
- }
11588
- this.scheduleAutoDrop();
11589
- this.leaveCallHooks.add(registerRingingCallEventHandlers(this));
11608
+ }
11609
+ else {
11610
+ if (this.state.callingState === CallingState.IDLE) {
11611
+ this.state.setCallingState(CallingState.RINGING);
11590
11612
  }
11591
- }));
11613
+ this.scheduleAutoDrop();
11614
+ this.leaveCallHooks.add(registerRingingCallEventHandlers(this));
11615
+ }
11592
11616
  };
11593
11617
  this.handleOwnCapabilitiesUpdated = async (ownCapabilities) => {
11594
11618
  // update the permission context.
@@ -12787,6 +12811,13 @@ class Call {
12787
12811
  user_id: userId,
12788
12812
  });
12789
12813
  };
12814
+ /**
12815
+ * Kicks the user with the given `userId`.
12816
+ * @param data the kick request.
12817
+ */
12818
+ this.kickUser = async (data) => {
12819
+ return this.streamClient.post(`${this.streamClientBasePath}/kick`, data);
12820
+ };
12790
12821
  /**
12791
12822
  * Mutes the current user.
12792
12823
  *
@@ -14538,7 +14569,7 @@ class StreamClient {
14538
14569
  this.getUserAgent = () => {
14539
14570
  if (!this.cachedUserAgent) {
14540
14571
  const { clientAppIdentifier = {} } = this.options;
14541
- const { sdkName = 'js', sdkVersion = "1.27.5", ...extras } = clientAppIdentifier;
14572
+ const { sdkName = 'js', sdkVersion = "1.28.1", ...extras } = clientAppIdentifier;
14542
14573
  this.cachedUserAgent = [
14543
14574
  `stream-video-${sdkName}-v${sdkVersion}`,
14544
14575
  ...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
@@ -15103,5 +15134,5 @@ class StreamVideoClient {
15103
15134
  }
15104
15135
  StreamVideoClient._instances = new Map();
15105
15136
 
15106
- export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, FrameRecordingSettingsRequestModeEnum, FrameRecordingSettingsRequestQualityEnum, FrameRecordingSettingsResponseModeEnum, InputMediaDeviceManager, InputMediaDeviceManagerState, 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, getLogLevel, getLogger, getScreenShareStream, getSdkInfo, getVideoBrowserPermission, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio, hasPausedTrack, hasScreenShare, hasScreenShareAudio, hasVideo, isPinned, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, resolveDeviceId, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setPowerState, setSdkInfo, setThermalState, setWebRTCInfo, speakerLayoutSortPreset, speaking };
15137
+ export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, FrameRecordingSettingsRequestModeEnum, FrameRecordingSettingsRequestQualityEnum, FrameRecordingSettingsResponseModeEnum, IngressAudioEncodingOptionsRequestChannelsEnum, IngressVideoLayerRequestCodecEnum, InputMediaDeviceManager, InputMediaDeviceManagerState, 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, getLogLevel, getLogger, getScreenShareStream, getSdkInfo, getVideoBrowserPermission, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio, hasPausedTrack, hasScreenShare, hasScreenShareAudio, hasVideo, isPinned, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, resolveDeviceId, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setPowerState, setSdkInfo, setThermalState, setWebRTCInfo, speakerLayoutSortPreset, speaking };
15107
15138
  //# sourceMappingURL=index.browser.es.js.map