@stream-io/video-client 1.0.5 → 1.0.6
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 +38 -13
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +42 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +38 -13
- package/dist/index.es.js.map +1 -1
- package/dist/src/helpers/participantUtils.d.ts +31 -0
- package/index.ts +1 -0
- package/package.json +1 -1
- package/src/Call.ts +8 -7
- package/src/helpers/DynascaleManager.ts +3 -6
- package/src/helpers/participantUtils.ts +42 -0
- package/src/sorting/participants.ts +5 -10
- package/src/store/CallState.ts +3 -6
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.0.6](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.0.5...@stream-io/video-client-1.0.6) (2024-05-16)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* **state:** aligns the participant state with other SDKs ([#1357](https://github.com/GetStream/stream-video-js/issues/1357)) ([146e6ac](https://github.com/GetStream/stream-video-js/commit/146e6acd7296488bc18f4bf5c76e9f2c9bfd97af))
|
|
11
|
+
|
|
5
12
|
### [1.0.5](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.0.4...@stream-io/video-client-1.0.5) (2024-05-16)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -6825,6 +6825,37 @@ const noopComparator = () => {
|
|
|
6825
6825
|
return () => 0;
|
|
6826
6826
|
};
|
|
6827
6827
|
|
|
6828
|
+
/**
|
|
6829
|
+
* Check if a participant has a video.
|
|
6830
|
+
*
|
|
6831
|
+
* @param p the participant to check.
|
|
6832
|
+
*/
|
|
6833
|
+
const hasVideo = (p) => p.publishedTracks.includes(TrackType.VIDEO);
|
|
6834
|
+
/**
|
|
6835
|
+
* Check if a participant has audio.
|
|
6836
|
+
*
|
|
6837
|
+
* @param p the participant to check.
|
|
6838
|
+
*/
|
|
6839
|
+
const hasAudio = (p) => p.publishedTracks.includes(TrackType.AUDIO);
|
|
6840
|
+
/**
|
|
6841
|
+
* Check if a participant is screen sharing.
|
|
6842
|
+
*
|
|
6843
|
+
* @param p the participant to check.
|
|
6844
|
+
*/
|
|
6845
|
+
const hasScreenShare = (p) => p.publishedTracks.includes(TrackType.SCREEN_SHARE);
|
|
6846
|
+
/**
|
|
6847
|
+
* Check if a participant is screen sharing audio.
|
|
6848
|
+
*
|
|
6849
|
+
* @param p the participant to check.
|
|
6850
|
+
*/
|
|
6851
|
+
const hasScreenShareAudio = (p) => p.publishedTracks.includes(TrackType.SCREEN_SHARE_AUDIO);
|
|
6852
|
+
/**
|
|
6853
|
+
* Check if the participant is pinned.
|
|
6854
|
+
*
|
|
6855
|
+
* @param p the participant.
|
|
6856
|
+
*/
|
|
6857
|
+
const isPinned = (p) => !!p.pin && (p.pin.isLocalPin || p.pin.pinnedAt > 0);
|
|
6858
|
+
|
|
6828
6859
|
/**
|
|
6829
6860
|
* A comparator which sorts participants by the fact that they are the dominant speaker or not.
|
|
6830
6861
|
*
|
|
@@ -6955,9 +6986,6 @@ const name = (a, b) => {
|
|
|
6955
6986
|
return 0;
|
|
6956
6987
|
};
|
|
6957
6988
|
const hasAnyRole = (p, roles) => (p.roles || []).some((r) => roles.includes(r));
|
|
6958
|
-
const hasScreenShare = (p) => p.publishedTracks.includes(TrackType.SCREEN_SHARE);
|
|
6959
|
-
const hasVideo = (p) => p.publishedTracks.includes(TrackType.VIDEO);
|
|
6960
|
-
const hasAudio = (p) => p.publishedTracks.includes(TrackType.AUDIO);
|
|
6961
6989
|
|
|
6962
6990
|
// a comparator decorator which applies the decorated comparator only if the
|
|
6963
6991
|
// participant is invisible.
|
|
@@ -7492,7 +7520,7 @@ class CallState {
|
|
|
7492
7520
|
this.remoteParticipants$ = this.participants$.pipe(map$1((participants) => participants.filter((p) => !p.isLocalParticipant)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
7493
7521
|
this.pinnedParticipants$ = this.participants$.pipe(map$1((participants) => participants.filter((p) => !!p.pin)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
7494
7522
|
this.dominantSpeaker$ = this.participants$.pipe(map$1((participants) => participants.find((p) => p.isDominantSpeaker)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
7495
|
-
this.hasOngoingScreenShare$ = this.participants$.pipe(map$1((participants) => participants.some((p) => p
|
|
7523
|
+
this.hasOngoingScreenShare$ = this.participants$.pipe(map$1((participants) => participants.some((p) => hasScreenShare(p))), distinctUntilChanged(), shareReplay({ bufferSize: 1, refCount: true }));
|
|
7496
7524
|
// dates
|
|
7497
7525
|
this.createdAt$ = this.createdAtSubject.asObservable();
|
|
7498
7526
|
this.endedAt$ = this.endedAtSubject.asObservable();
|
|
@@ -10362,9 +10390,7 @@ class DynascaleManager {
|
|
|
10362
10390
|
const publishedTracksSubscription = boundParticipant.isLocalParticipant
|
|
10363
10391
|
? null
|
|
10364
10392
|
: participant$
|
|
10365
|
-
.pipe(distinctUntilKeyChanged('publishedTracks'), map$1((p) =>
|
|
10366
|
-
? TrackType.VIDEO
|
|
10367
|
-
: TrackType.SCREEN_SHARE)), distinctUntilChanged())
|
|
10393
|
+
.pipe(distinctUntilKeyChanged('publishedTracks'), map$1((p) => trackType === 'videoTrack' ? hasVideo(p) : hasScreenShare(p)), distinctUntilChanged())
|
|
10368
10394
|
.subscribe((isPublishing) => {
|
|
10369
10395
|
if (isPublishing) {
|
|
10370
10396
|
// the participant just started to publish a track
|
|
@@ -12943,7 +12969,7 @@ class Call {
|
|
|
12943
12969
|
// NOTE: audio tracks don't have to be requested explicitly
|
|
12944
12970
|
// as the SFU will implicitly subscribe us to all of them,
|
|
12945
12971
|
// once they become available.
|
|
12946
|
-
if (p.videoDimension && p
|
|
12972
|
+
if (p.videoDimension && hasVideo(p)) {
|
|
12947
12973
|
subscriptions.push({
|
|
12948
12974
|
userId: p.userId,
|
|
12949
12975
|
sessionId: p.sessionId,
|
|
@@ -12951,8 +12977,7 @@ class Call {
|
|
|
12951
12977
|
dimension: p.videoDimension,
|
|
12952
12978
|
});
|
|
12953
12979
|
}
|
|
12954
|
-
if (p.screenShareDimension &&
|
|
12955
|
-
p.publishedTracks.includes(TrackType.SCREEN_SHARE)) {
|
|
12980
|
+
if (p.screenShareDimension && hasScreenShare(p)) {
|
|
12956
12981
|
subscriptions.push({
|
|
12957
12982
|
userId: p.userId,
|
|
12958
12983
|
sessionId: p.sessionId,
|
|
@@ -12960,7 +12985,7 @@ class Call {
|
|
|
12960
12985
|
dimension: p.screenShareDimension,
|
|
12961
12986
|
});
|
|
12962
12987
|
}
|
|
12963
|
-
if (p
|
|
12988
|
+
if (hasScreenShareAudio(p)) {
|
|
12964
12989
|
subscriptions.push({
|
|
12965
12990
|
userId: p.userId,
|
|
12966
12991
|
sessionId: p.sessionId,
|
|
@@ -15204,7 +15229,7 @@ class StreamClient {
|
|
|
15204
15229
|
});
|
|
15205
15230
|
};
|
|
15206
15231
|
this.getUserAgent = () => {
|
|
15207
|
-
const version = "1.0.
|
|
15232
|
+
const version = "1.0.6" ;
|
|
15208
15233
|
return (this.userAgent ||
|
|
15209
15234
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
15210
15235
|
};
|
|
@@ -15680,5 +15705,5 @@ class StreamVideoClient {
|
|
|
15680
15705
|
}
|
|
15681
15706
|
}
|
|
15682
15707
|
|
|
15683
|
-
export { AudioSettingsDefaultDeviceEnum, AudioSettingsRequestDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, InputMediaDeviceManager, InputMediaDeviceManagerState, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, NoiseCancellationSettingsRequestModeEnum, OwnCapability, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsModeEnum, TranscriptionSettingsRequestModeEnum, VideoSettingsCameraFacingEnum, VideoSettingsRequestCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, deviceIds$, disposeOfMediaStream, dominantSpeaker, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceInfo, getLogger, getOSInfo, getScreenShareStream, getSdkInfo, getVideoDevices, getVideoStream, getWebRTCInfo, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setSdkInfo, setWebRTCInfo, speakerLayoutSortPreset, speaking };
|
|
15708
|
+
export { AudioSettingsDefaultDeviceEnum, AudioSettingsRequestDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, InputMediaDeviceManager, InputMediaDeviceManagerState, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, NoiseCancellationSettingsRequestModeEnum, OwnCapability, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsModeEnum, TranscriptionSettingsRequestModeEnum, VideoSettingsCameraFacingEnum, VideoSettingsRequestCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, deviceIds$, disposeOfMediaStream, dominantSpeaker, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceInfo, getLogger, getOSInfo, getScreenShareStream, getSdkInfo, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio, hasScreenShare, hasScreenShareAudio, hasVideo, isPinned, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setSdkInfo, setWebRTCInfo, speakerLayoutSortPreset, speaking };
|
|
15684
15709
|
//# sourceMappingURL=index.browser.es.js.map
|