@stream-io/video-client 1.0.4 → 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 +14 -0
- package/dist/index.browser.es.js +39 -13
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +43 -12
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +39 -13
- package/dist/index.es.js.map +1 -1
- package/dist/src/gen/coordinator/index.d.ts +214 -0
- 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/devices/InputMediaDeviceManager.ts +1 -0
- package/src/gen/coordinator/index.ts +214 -0
- 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,20 @@
|
|
|
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
|
+
|
|
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)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* correctly handle pending state reset ([4ea47da](https://github.com/GetStream/stream-video-js/commit/4ea47da969f00925e1df144ec2f33cd07ac2f63f))
|
|
18
|
+
|
|
5
19
|
### [1.0.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.0.3...@stream-io/video-client-1.0.4) (2024-05-14)
|
|
6
20
|
|
|
7
21
|
|
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
|
|
@@ -11213,6 +11239,7 @@ class InputMediaDeviceManager {
|
|
|
11213
11239
|
resetStatusChangeRequest() {
|
|
11214
11240
|
this.statusChangePromise = undefined;
|
|
11215
11241
|
this.statusChangeAbortController = undefined;
|
|
11242
|
+
this.state.setPendingStatus(this.state.status);
|
|
11216
11243
|
}
|
|
11217
11244
|
}
|
|
11218
11245
|
|
|
@@ -12942,7 +12969,7 @@ class Call {
|
|
|
12942
12969
|
// NOTE: audio tracks don't have to be requested explicitly
|
|
12943
12970
|
// as the SFU will implicitly subscribe us to all of them,
|
|
12944
12971
|
// once they become available.
|
|
12945
|
-
if (p.videoDimension && p
|
|
12972
|
+
if (p.videoDimension && hasVideo(p)) {
|
|
12946
12973
|
subscriptions.push({
|
|
12947
12974
|
userId: p.userId,
|
|
12948
12975
|
sessionId: p.sessionId,
|
|
@@ -12950,8 +12977,7 @@ class Call {
|
|
|
12950
12977
|
dimension: p.videoDimension,
|
|
12951
12978
|
});
|
|
12952
12979
|
}
|
|
12953
|
-
if (p.screenShareDimension &&
|
|
12954
|
-
p.publishedTracks.includes(TrackType.SCREEN_SHARE)) {
|
|
12980
|
+
if (p.screenShareDimension && hasScreenShare(p)) {
|
|
12955
12981
|
subscriptions.push({
|
|
12956
12982
|
userId: p.userId,
|
|
12957
12983
|
sessionId: p.sessionId,
|
|
@@ -12959,7 +12985,7 @@ class Call {
|
|
|
12959
12985
|
dimension: p.screenShareDimension,
|
|
12960
12986
|
});
|
|
12961
12987
|
}
|
|
12962
|
-
if (p
|
|
12988
|
+
if (hasScreenShareAudio(p)) {
|
|
12963
12989
|
subscriptions.push({
|
|
12964
12990
|
userId: p.userId,
|
|
12965
12991
|
sessionId: p.sessionId,
|
|
@@ -15203,7 +15229,7 @@ class StreamClient {
|
|
|
15203
15229
|
});
|
|
15204
15230
|
};
|
|
15205
15231
|
this.getUserAgent = () => {
|
|
15206
|
-
const version = "1.0.
|
|
15232
|
+
const version = "1.0.6" ;
|
|
15207
15233
|
return (this.userAgent ||
|
|
15208
15234
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
15209
15235
|
};
|
|
@@ -15679,5 +15705,5 @@ class StreamVideoClient {
|
|
|
15679
15705
|
}
|
|
15680
15706
|
}
|
|
15681
15707
|
|
|
15682
|
-
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 };
|
|
15683
15709
|
//# sourceMappingURL=index.browser.es.js.map
|