@stream-io/video-client 1.59.0 → 1.59.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 +7 -0
- package/dist/index.browser.es.js +52 -9
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +52 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +52 -9
- package/dist/index.es.js.map +1 -1
- package/dist/src/coordinator/connection/utils.d.ts +10 -0
- package/dist/src/sorting/participants.d.ts +13 -0
- package/package.json +1 -1
- package/src/__tests__/StreamVideoClient.ringing.test.ts +32 -20
- package/src/coordinator/connection/__tests__/eventListenerIsolation.test.ts +115 -0
- package/src/coordinator/connection/client.ts +3 -2
- package/src/coordinator/connection/utils.ts +28 -0
- package/src/sorting/__tests__/presets.test.ts +188 -3
- package/src/sorting/__tests__/sorting.test.ts +22 -1
- package/src/sorting/participants.ts +20 -0
- package/src/sorting/presets.ts +4 -0
- package/src/store/__tests__/CallState.test.ts +2 -2
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.59.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.59.0...@stream-io/video-client-1.59.1) (2026-09-04)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- **client:** isolate coordinator event listener errors from the dispatch loop ([#2404](https://github.com/GetStream/stream-video-js/issues/2404)) ([4ab49de](https://github.com/GetStream/stream-video-js/commit/4ab49decc4bbc70b0fc35d6b92f2bd18922a105c)), closes [GetStream/stream-chat-js#1850](https://github.com/GetStream/stream-chat-js/issues/1850)
|
|
10
|
+
- **client:** keep passive participants out of the spotlight ([#2405](https://github.com/GetStream/stream-video-js/issues/2405)) ([0713650](https://github.com/GetStream/stream-video-js/commit/0713650fa90caa8a82ce0bee75acf4dbaaad33e9))
|
|
11
|
+
|
|
5
12
|
## [1.59.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.58.0...@stream-io/video-client-1.59.0) (2026-08-28)
|
|
6
13
|
|
|
7
14
|
### Features
|
package/dist/index.browser.es.js
CHANGED
|
@@ -4411,6 +4411,28 @@ function isErrorResponse(res) {
|
|
|
4411
4411
|
function isCloseEvent(res) {
|
|
4412
4412
|
return res.code !== undefined;
|
|
4413
4413
|
}
|
|
4414
|
+
/**
|
|
4415
|
+
* Invokes a single event listener in isolation, so that a faulty listener
|
|
4416
|
+
* cannot abort the dispatch loop nor the bookkeeping that follows it.
|
|
4417
|
+
*
|
|
4418
|
+
* @param listener the listener to invoke.
|
|
4419
|
+
* @param event the event to pass to the listener.
|
|
4420
|
+
* @param logger the logger to report listener failures with.
|
|
4421
|
+
*/
|
|
4422
|
+
const invokeEventListener = (listener, event, logger) => {
|
|
4423
|
+
try {
|
|
4424
|
+
const result = listener(event);
|
|
4425
|
+
if (result && typeof result.then === 'function') {
|
|
4426
|
+
Promise.resolve(result).catch((error) => report(logger, error, event));
|
|
4427
|
+
}
|
|
4428
|
+
}
|
|
4429
|
+
catch (error) {
|
|
4430
|
+
report(logger, error, event);
|
|
4431
|
+
}
|
|
4432
|
+
};
|
|
4433
|
+
const report = (logger, error, event) => {
|
|
4434
|
+
logger.error('Unhandled error in event listener', error, event);
|
|
4435
|
+
};
|
|
4414
4436
|
|
|
4415
4437
|
/**
|
|
4416
4438
|
* Checks whether we are using React Native
|
|
@@ -5059,7 +5081,7 @@ const toIceCandidate = (iceTrickle) => {
|
|
|
5059
5081
|
}
|
|
5060
5082
|
};
|
|
5061
5083
|
|
|
5062
|
-
const version = "1.59.
|
|
5084
|
+
const version = "1.59.1";
|
|
5063
5085
|
const [major, minor, patch] = version.split('.');
|
|
5064
5086
|
let sdkInfo = {
|
|
5065
5087
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -5908,6 +5930,27 @@ const publishingAudio = (a, b) => {
|
|
|
5908
5930
|
return 1;
|
|
5909
5931
|
return 0;
|
|
5910
5932
|
};
|
|
5933
|
+
/**
|
|
5934
|
+
* A comparator which prioritizes participants who are publishing any track
|
|
5935
|
+
* over participants who are not publishing at all.
|
|
5936
|
+
*
|
|
5937
|
+
* Unlike `publishingVideo` and `publishingAudio`, this comparator does not
|
|
5938
|
+
* distinguish between track types. Muting the microphone or turning off the
|
|
5939
|
+
* camera does not change a participant's rank as long as they still publish
|
|
5940
|
+
* something, which keeps the ordering stable across ordinary device toggles.
|
|
5941
|
+
*
|
|
5942
|
+
* @param a the first participant.
|
|
5943
|
+
* @param b the second participant.
|
|
5944
|
+
*/
|
|
5945
|
+
const publishing = (a, b) => {
|
|
5946
|
+
const hasA = a.publishedTracks.length > 0;
|
|
5947
|
+
const hasB = b.publishedTracks.length > 0;
|
|
5948
|
+
if (hasA && !hasB)
|
|
5949
|
+
return -1;
|
|
5950
|
+
if (!hasA && hasB)
|
|
5951
|
+
return 1;
|
|
5952
|
+
return 0;
|
|
5953
|
+
};
|
|
5911
5954
|
/**
|
|
5912
5955
|
* A comparator which prioritizes participants who are pinned.
|
|
5913
5956
|
*
|
|
@@ -6018,11 +6061,11 @@ const withVideoIngressSource = withParticipantSource(ParticipantSource.RTMP, Par
|
|
|
6018
6061
|
/**
|
|
6019
6062
|
* The default sorting preset.
|
|
6020
6063
|
*/
|
|
6021
|
-
const defaultSortPreset = combineComparators(screenSharing, pinned, ifInvisibleBy(combineComparators(dominantSpeaker, speaking, reactionType('raised-hand'), publishingVideo, publishingAudio)));
|
|
6064
|
+
const defaultSortPreset = combineComparators(screenSharing, pinned, publishing, ifInvisibleBy(combineComparators(dominantSpeaker, speaking, reactionType('raised-hand'), publishingVideo, publishingAudio)));
|
|
6022
6065
|
/**
|
|
6023
6066
|
* The sorting preset for speaker layout.
|
|
6024
6067
|
*/
|
|
6025
|
-
const speakerLayoutSortPreset = combineComparators(screenSharing, pinned, dominantSpeaker, ifInvisibleBy(combineComparators(speaking, reactionType('raised-hand'), withVideoIngressSource, publishingVideo, publishingAudio)));
|
|
6068
|
+
const speakerLayoutSortPreset = combineComparators(screenSharing, pinned, dominantSpeaker, publishing, ifInvisibleBy(combineComparators(speaking, reactionType('raised-hand'), withVideoIngressSource, publishingVideo, publishingAudio)));
|
|
6026
6069
|
/**
|
|
6027
6070
|
* The sorting preset for layouts that don't render all participants but
|
|
6028
6071
|
* instead, render them in pages.
|
|
@@ -6031,7 +6074,7 @@ const paginatedLayoutSortPreset = combineComparators(pinned, ifInvisibleOrUnknow
|
|
|
6031
6074
|
/**
|
|
6032
6075
|
* The sorting preset for livestreams and audio rooms.
|
|
6033
6076
|
*/
|
|
6034
|
-
const livestreamOrAudioRoomSortPreset = combineComparators(ifInvisibleOrUnknownBy(combineComparators(dominantSpeaker, speaking, reactionType('raised-hand'), withVideoIngressSource, publishingVideo, publishingAudio)), role('admin', 'host', 'speaker'));
|
|
6077
|
+
const livestreamOrAudioRoomSortPreset = combineComparators(publishing, ifInvisibleOrUnknownBy(combineComparators(dominantSpeaker, speaking, reactionType('raised-hand'), withVideoIngressSource, publishingVideo, publishingAudio)), role('admin', 'host', 'speaker'));
|
|
6035
6078
|
|
|
6036
6079
|
/**
|
|
6037
6080
|
* Returns the default egress object - when no egress data is available.
|
|
@@ -18992,11 +19035,11 @@ class StreamClient {
|
|
|
18992
19035
|
return;
|
|
18993
19036
|
// call generic listeners
|
|
18994
19037
|
for (const listener of this.listeners.all || []) {
|
|
18995
|
-
listener
|
|
19038
|
+
invokeEventListener(listener, event, this.logger);
|
|
18996
19039
|
}
|
|
18997
19040
|
// call type specific listeners
|
|
18998
19041
|
for (const listener of this.listeners[event.type] || []) {
|
|
18999
|
-
listener
|
|
19042
|
+
invokeEventListener(listener, event, this.logger);
|
|
19000
19043
|
}
|
|
19001
19044
|
};
|
|
19002
19045
|
/**
|
|
@@ -19016,11 +19059,11 @@ class StreamClient {
|
|
|
19016
19059
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
19017
19060
|
};
|
|
19018
19061
|
getSdkVersion = () => this.options.clientAppIdentifier?.sdkVersion ||
|
|
19019
|
-
"1.59.
|
|
19062
|
+
"1.59.1";
|
|
19020
19063
|
getUserAgent = () => {
|
|
19021
19064
|
if (!this.cachedUserAgent) {
|
|
19022
19065
|
const { clientAppIdentifier = {} } = this.options;
|
|
19023
|
-
const { sdkName = 'js', sdkVersion = "1.59.
|
|
19066
|
+
const { sdkName = 'js', sdkVersion = "1.59.1", ...extras } = clientAppIdentifier;
|
|
19024
19067
|
this.cachedUserAgent = [
|
|
19025
19068
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
19026
19069
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|
|
@@ -20773,5 +20816,5 @@ class EncryptionManager extends TypedEventEmitter {
|
|
|
20773
20816
|
};
|
|
20774
20817
|
}
|
|
20775
20818
|
|
|
20776
|
-
export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, browsers as Browsers, Call, CallRecordingFailedEventRecordingTypeEnum, CallRecordingReadyEventRecordingTypeEnum, CallRecordingStartedEventRecordingTypeEnum, CallRecordingStoppedEventRecordingTypeEnum, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DEFAULT_LOOPBACK_RECORDING_DURATION_MS, DebounceType, DeviceManager, DeviceManagerState, DynascaleManager, EncryptionManager, EncryptionSettingsRequestModeEnum, EncryptionSettingsResponseModeEnum, ErrorFromResponse, FrameRecordingSettingsRequestModeEnum, FrameRecordingSettingsRequestQualityEnum, FrameRecordingSettingsResponseModeEnum, HLSSettingsRequestQualityTracksEnum, IndividualRecordingSettingsRequestModeEnum, IndividualRecordingSettingsRequestOutputTypesEnum, IndividualRecordingSettingsResponseModeEnum, IngressAudioEncodingOptionsRequestChannelsEnum, IngressSourceRequestFpsEnum, IngressVideoLayerRequestCodecEnum, LOOPBACK_STREAMS_WAIT_TIMEOUT_MS, LayoutSettingsRequestNameEnum, LoopbackStreamsTimeoutError, MAX_LOOPBACK_RECORDING_DURATION_MS, MIN_LOOPBACK_RECORDING_DURATION_MS, MediaStreamRecorder, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RTMPBroadcastRequestQualityEnum, RTMPSettingsRequestQualityEnum, RawRecordingSettingsRequestModeEnum, RawRecordingSettingsResponseModeEnum, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, RequestPermissionRequestPermissionsEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, SfuJoinError, models as SfuModels, SfuTimeoutError, SpeakerManager, SpeakerState, StartClosedCaptionsRequestLanguageEnum, StartTranscriptionRequestLanguageEnum, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsRequestClosedCaptionModeEnum, TranscriptionSettingsRequestLanguageEnum, TranscriptionSettingsRequestModeEnum, TranscriptionSettingsResponseClosedCaptionModeEnum, TranscriptionSettingsResponseLanguageEnum, TranscriptionSettingsResponseModeEnum, TranslationSettingsLanguagesEnum, UpdateUserPermissionsRequestGrantPermissionsEnum, UpdateUserPermissionsRequestRevokePermissionsEnum, VideoSettingsRequestCameraFacingEnum, VideoSettingsResponseCameraFacingEnum, ViewportTracker, VisibilityState, WSAuthMessageProductsEnum, checkIfAudioOutputChangeSupported, clampLoopbackRecordingDuration, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, deviceIds$, disposeOfMediaStream, dominantSpeaker, enableLoopbackAudio, getAudioBrowserPermission, getAudioDevices, getAudioOutputDevices, getAudioStream, getCallMediaEngineProvider, getClientDetails, getDeviceState, getLoopbackStreams, getLoopbackTracks, getScreenShareStream, getSdkInfo, getVideoBrowserPermission, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio$1 as hasAudio, hasInterruptedTrack, hasPausedTrack, hasScreenShare, hasScreenShareAudio, hasVideo, humanize, isPinned, livestreamOrAudioRoomSortPreset, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, resolveDeviceId, role, screenSharing, setCallMediaEngineProvider, setDeviceInfo, setOSInfo, setPowerState, setSdkInfo, setThermalState, setWebRTCInfo, speakerLayoutSortPreset, speaking, videoLoggerSystem, waitForLoopbackStreams, withLoopbackAudioEnabled, withParticipantSource };
|
|
20819
|
+
export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, browsers as Browsers, Call, CallRecordingFailedEventRecordingTypeEnum, CallRecordingReadyEventRecordingTypeEnum, CallRecordingStartedEventRecordingTypeEnum, CallRecordingStoppedEventRecordingTypeEnum, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DEFAULT_LOOPBACK_RECORDING_DURATION_MS, DebounceType, DeviceManager, DeviceManagerState, DynascaleManager, EncryptionManager, EncryptionSettingsRequestModeEnum, EncryptionSettingsResponseModeEnum, ErrorFromResponse, FrameRecordingSettingsRequestModeEnum, FrameRecordingSettingsRequestQualityEnum, FrameRecordingSettingsResponseModeEnum, HLSSettingsRequestQualityTracksEnum, IndividualRecordingSettingsRequestModeEnum, IndividualRecordingSettingsRequestOutputTypesEnum, IndividualRecordingSettingsResponseModeEnum, IngressAudioEncodingOptionsRequestChannelsEnum, IngressSourceRequestFpsEnum, IngressVideoLayerRequestCodecEnum, LOOPBACK_STREAMS_WAIT_TIMEOUT_MS, LayoutSettingsRequestNameEnum, LoopbackStreamsTimeoutError, MAX_LOOPBACK_RECORDING_DURATION_MS, MIN_LOOPBACK_RECORDING_DURATION_MS, MediaStreamRecorder, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RTMPBroadcastRequestQualityEnum, RTMPSettingsRequestQualityEnum, RawRecordingSettingsRequestModeEnum, RawRecordingSettingsResponseModeEnum, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, RequestPermissionRequestPermissionsEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, SfuJoinError, models as SfuModels, SfuTimeoutError, SpeakerManager, SpeakerState, StartClosedCaptionsRequestLanguageEnum, StartTranscriptionRequestLanguageEnum, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsRequestClosedCaptionModeEnum, TranscriptionSettingsRequestLanguageEnum, TranscriptionSettingsRequestModeEnum, TranscriptionSettingsResponseClosedCaptionModeEnum, TranscriptionSettingsResponseLanguageEnum, TranscriptionSettingsResponseModeEnum, TranslationSettingsLanguagesEnum, UpdateUserPermissionsRequestGrantPermissionsEnum, UpdateUserPermissionsRequestRevokePermissionsEnum, VideoSettingsRequestCameraFacingEnum, VideoSettingsResponseCameraFacingEnum, ViewportTracker, VisibilityState, WSAuthMessageProductsEnum, checkIfAudioOutputChangeSupported, clampLoopbackRecordingDuration, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, deviceIds$, disposeOfMediaStream, dominantSpeaker, enableLoopbackAudio, getAudioBrowserPermission, getAudioDevices, getAudioOutputDevices, getAudioStream, getCallMediaEngineProvider, getClientDetails, getDeviceState, getLoopbackStreams, getLoopbackTracks, getScreenShareStream, getSdkInfo, getVideoBrowserPermission, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio$1 as hasAudio, hasInterruptedTrack, hasPausedTrack, hasScreenShare, hasScreenShareAudio, hasVideo, humanize, isPinned, livestreamOrAudioRoomSortPreset, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishing, publishingAudio, publishingVideo, reactionType, resolveDeviceId, role, screenSharing, setCallMediaEngineProvider, setDeviceInfo, setOSInfo, setPowerState, setSdkInfo, setThermalState, setWebRTCInfo, speakerLayoutSortPreset, speaking, videoLoggerSystem, waitForLoopbackStreams, withLoopbackAudioEnabled, withParticipantSource };
|
|
20777
20820
|
//# sourceMappingURL=index.browser.es.js.map
|