@stream-io/video-client 1.0.5 → 1.0.7
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 +88 -29
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +99 -32
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +88 -29
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +3 -3
- package/dist/src/gen/coordinator/index.d.ts +3204 -1800
- package/dist/src/gen/shims.d.ts +3 -0
- package/dist/src/helpers/participantUtils.d.ts +31 -0
- package/dist/src/rtc/videoLayers.d.ts +3 -3
- package/index.ts +2 -0
- package/package.json +1 -1
- package/src/Call.ts +22 -21
- package/src/coordinator/connection/connection.ts +2 -5
- package/src/gen/coordinator/index.ts +3199 -1808
- package/src/gen/shims.ts +4 -0
- package/src/helpers/DynascaleManager.ts +3 -6
- package/src/helpers/participantUtils.ts +42 -0
- package/src/rtc/Publisher.ts +5 -2
- package/src/rtc/videoLayers.ts +4 -4
- package/src/sorting/participants.ts +5 -10
- package/src/store/CallState.ts +11 -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.7](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.0.6...@stream-io/video-client-1.0.7) (2024-05-21)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* align with the latest openapi ([#1343](https://github.com/GetStream/stream-video-js/issues/1343)) ([2cb71cc](https://github.com/GetStream/stream-video-js/commit/2cb71cc599f46e248a4af9b4ea79f5938d7c508c))
|
|
11
|
+
|
|
12
|
+
### [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)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* **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))
|
|
18
|
+
|
|
5
19
|
### [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
20
|
|
|
7
21
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -13,17 +13,49 @@ import { fromByteArray } from 'base64-js';
|
|
|
13
13
|
/**
|
|
14
14
|
* @export
|
|
15
15
|
*/
|
|
16
|
-
const
|
|
16
|
+
const AudioSettingsRequestDefaultDeviceEnum = {
|
|
17
17
|
SPEAKER: 'speaker',
|
|
18
18
|
EARPIECE: 'earpiece',
|
|
19
19
|
};
|
|
20
20
|
/**
|
|
21
21
|
* @export
|
|
22
22
|
*/
|
|
23
|
-
const
|
|
23
|
+
const AudioSettingsResponseDefaultDeviceEnum = {
|
|
24
24
|
SPEAKER: 'speaker',
|
|
25
25
|
EARPIECE: 'earpiece',
|
|
26
26
|
};
|
|
27
|
+
/**
|
|
28
|
+
* @export
|
|
29
|
+
*/
|
|
30
|
+
const BlockListOptionsBehaviorEnum = {
|
|
31
|
+
FLAG: 'flag',
|
|
32
|
+
BLOCK: 'block',
|
|
33
|
+
SHADOW_BLOCK: 'shadow_block',
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* @export
|
|
37
|
+
*/
|
|
38
|
+
const ChannelConfigWithInfoAutomodEnum = {
|
|
39
|
+
DISABLED: 'disabled',
|
|
40
|
+
SIMPLE: 'simple',
|
|
41
|
+
AI: 'AI',
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* @export
|
|
45
|
+
*/
|
|
46
|
+
const ChannelConfigWithInfoAutomodBehaviorEnum = {
|
|
47
|
+
FLAG: 'flag',
|
|
48
|
+
BLOCK: 'block',
|
|
49
|
+
SHADOW_BLOCK: 'shadow_block',
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* @export
|
|
53
|
+
*/
|
|
54
|
+
const ChannelConfigWithInfoBlocklistBehaviorEnum = {
|
|
55
|
+
FLAG: 'flag',
|
|
56
|
+
BLOCK: 'block',
|
|
57
|
+
SHADOW_BLOCK: 'shadow_block',
|
|
58
|
+
};
|
|
27
59
|
/**
|
|
28
60
|
* @export
|
|
29
61
|
*/
|
|
@@ -41,14 +73,6 @@ const NoiseCancellationSettingsModeEnum = {
|
|
|
41
73
|
DISABLED: 'disabled',
|
|
42
74
|
AUTO_ON: 'auto-on',
|
|
43
75
|
};
|
|
44
|
-
/**
|
|
45
|
-
* @export
|
|
46
|
-
*/
|
|
47
|
-
const NoiseCancellationSettingsRequestModeEnum = {
|
|
48
|
-
AVAILABLE: 'available',
|
|
49
|
-
DISABLED: 'disabled',
|
|
50
|
-
AUTO_ON: 'auto-on',
|
|
51
|
-
};
|
|
52
76
|
/**
|
|
53
77
|
* All possibility of string to use
|
|
54
78
|
* @export
|
|
@@ -101,7 +125,7 @@ const RecordSettingsRequestQualityEnum = {
|
|
|
101
125
|
/**
|
|
102
126
|
* @export
|
|
103
127
|
*/
|
|
104
|
-
const
|
|
128
|
+
const TranscriptionSettingsRequestModeEnum = {
|
|
105
129
|
AVAILABLE: 'available',
|
|
106
130
|
DISABLED: 'disabled',
|
|
107
131
|
AUTO_ON: 'auto-on',
|
|
@@ -109,7 +133,7 @@ const TranscriptionSettingsModeEnum = {
|
|
|
109
133
|
/**
|
|
110
134
|
* @export
|
|
111
135
|
*/
|
|
112
|
-
const
|
|
136
|
+
const TranscriptionSettingsResponseModeEnum = {
|
|
113
137
|
AVAILABLE: 'available',
|
|
114
138
|
DISABLED: 'disabled',
|
|
115
139
|
AUTO_ON: 'auto-on',
|
|
@@ -117,7 +141,7 @@ const TranscriptionSettingsRequestModeEnum = {
|
|
|
117
141
|
/**
|
|
118
142
|
* @export
|
|
119
143
|
*/
|
|
120
|
-
const
|
|
144
|
+
const VideoSettingsRequestCameraFacingEnum = {
|
|
121
145
|
FRONT: 'front',
|
|
122
146
|
BACK: 'back',
|
|
123
147
|
EXTERNAL: 'external',
|
|
@@ -125,7 +149,7 @@ const VideoSettingsCameraFacingEnum = {
|
|
|
125
149
|
/**
|
|
126
150
|
* @export
|
|
127
151
|
*/
|
|
128
|
-
const
|
|
152
|
+
const VideoSettingsResponseCameraFacingEnum = {
|
|
129
153
|
FRONT: 'front',
|
|
130
154
|
BACK: 'back',
|
|
131
155
|
EXTERNAL: 'external',
|
|
@@ -6825,6 +6849,37 @@ const noopComparator = () => {
|
|
|
6825
6849
|
return () => 0;
|
|
6826
6850
|
};
|
|
6827
6851
|
|
|
6852
|
+
/**
|
|
6853
|
+
* Check if a participant has a video.
|
|
6854
|
+
*
|
|
6855
|
+
* @param p the participant to check.
|
|
6856
|
+
*/
|
|
6857
|
+
const hasVideo = (p) => p.publishedTracks.includes(TrackType.VIDEO);
|
|
6858
|
+
/**
|
|
6859
|
+
* Check if a participant has audio.
|
|
6860
|
+
*
|
|
6861
|
+
* @param p the participant to check.
|
|
6862
|
+
*/
|
|
6863
|
+
const hasAudio = (p) => p.publishedTracks.includes(TrackType.AUDIO);
|
|
6864
|
+
/**
|
|
6865
|
+
* Check if a participant is screen sharing.
|
|
6866
|
+
*
|
|
6867
|
+
* @param p the participant to check.
|
|
6868
|
+
*/
|
|
6869
|
+
const hasScreenShare = (p) => p.publishedTracks.includes(TrackType.SCREEN_SHARE);
|
|
6870
|
+
/**
|
|
6871
|
+
* Check if a participant is screen sharing audio.
|
|
6872
|
+
*
|
|
6873
|
+
* @param p the participant to check.
|
|
6874
|
+
*/
|
|
6875
|
+
const hasScreenShareAudio = (p) => p.publishedTracks.includes(TrackType.SCREEN_SHARE_AUDIO);
|
|
6876
|
+
/**
|
|
6877
|
+
* Check if the participant is pinned.
|
|
6878
|
+
*
|
|
6879
|
+
* @param p the participant.
|
|
6880
|
+
*/
|
|
6881
|
+
const isPinned = (p) => !!p.pin && (p.pin.isLocalPin || p.pin.pinnedAt > 0);
|
|
6882
|
+
|
|
6828
6883
|
/**
|
|
6829
6884
|
* A comparator which sorts participants by the fact that they are the dominant speaker or not.
|
|
6830
6885
|
*
|
|
@@ -6955,9 +7010,6 @@ const name = (a, b) => {
|
|
|
6955
7010
|
return 0;
|
|
6956
7011
|
};
|
|
6957
7012
|
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
7013
|
|
|
6962
7014
|
// a comparator decorator which applies the decorated comparator only if the
|
|
6963
7015
|
// participant is invisible.
|
|
@@ -7492,7 +7544,7 @@ class CallState {
|
|
|
7492
7544
|
this.remoteParticipants$ = this.participants$.pipe(map$1((participants) => participants.filter((p) => !p.isLocalParticipant)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
7493
7545
|
this.pinnedParticipants$ = this.participants$.pipe(map$1((participants) => participants.filter((p) => !!p.pin)), shareReplay({ bufferSize: 1, refCount: true }));
|
|
7494
7546
|
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
|
|
7547
|
+
this.hasOngoingScreenShare$ = this.participants$.pipe(map$1((participants) => participants.some((p) => hasScreenShare(p))), distinctUntilChanged(), shareReplay({ bufferSize: 1, refCount: true }));
|
|
7496
7548
|
// dates
|
|
7497
7549
|
this.createdAt$ = this.createdAtSubject.asObservable();
|
|
7498
7550
|
this.endedAt$ = this.endedAtSubject.asObservable();
|
|
@@ -7551,6 +7603,14 @@ class CallState {
|
|
|
7551
7603
|
'connection.error': undefined,
|
|
7552
7604
|
'connection.ok': undefined,
|
|
7553
7605
|
'health.check': undefined,
|
|
7606
|
+
'user.banned': undefined,
|
|
7607
|
+
'user.deactivated': undefined,
|
|
7608
|
+
'user.deleted': undefined,
|
|
7609
|
+
'user.muted': undefined,
|
|
7610
|
+
'user.presence.changed': undefined,
|
|
7611
|
+
'user.reactivated': undefined,
|
|
7612
|
+
'user.unbanned': undefined,
|
|
7613
|
+
'user.updated': undefined,
|
|
7554
7614
|
custom: undefined,
|
|
7555
7615
|
// events that update call state:
|
|
7556
7616
|
'call.accepted': (e) => this.updateFromCallResponse(e.call),
|
|
@@ -8176,7 +8236,8 @@ class Publisher {
|
|
|
8176
8236
|
};
|
|
8177
8237
|
if (!transceiver) {
|
|
8178
8238
|
const { settings } = this.state;
|
|
8179
|
-
const targetResolution = settings?.video
|
|
8239
|
+
const targetResolution = settings?.video
|
|
8240
|
+
.target_resolution;
|
|
8180
8241
|
const screenShareBitrate = settings?.screensharing.target_resolution?.bitrate;
|
|
8181
8242
|
const videoEncodings = trackType === TrackType.VIDEO
|
|
8182
8243
|
? findOptimalVideoLayers(track, targetResolution)
|
|
@@ -8538,7 +8599,8 @@ class Publisher {
|
|
|
8538
8599
|
this.getCurrentTrackInfos = (sdp) => {
|
|
8539
8600
|
sdp = sdp || this.pc.localDescription?.sdp;
|
|
8540
8601
|
const { settings } = this.state;
|
|
8541
|
-
const targetResolution = settings?.video
|
|
8602
|
+
const targetResolution = settings?.video
|
|
8603
|
+
.target_resolution;
|
|
8542
8604
|
return this.pc
|
|
8543
8605
|
.getTransceivers()
|
|
8544
8606
|
.filter((t) => t.direction === 'sendonly' && t.sender.track)
|
|
@@ -10362,9 +10424,7 @@ class DynascaleManager {
|
|
|
10362
10424
|
const publishedTracksSubscription = boundParticipant.isLocalParticipant
|
|
10363
10425
|
? null
|
|
10364
10426
|
: participant$
|
|
10365
|
-
.pipe(distinctUntilKeyChanged('publishedTracks'), map$1((p) =>
|
|
10366
|
-
? TrackType.VIDEO
|
|
10367
|
-
: TrackType.SCREEN_SHARE)), distinctUntilChanged())
|
|
10427
|
+
.pipe(distinctUntilKeyChanged('publishedTracks'), map$1((p) => trackType === 'videoTrack' ? hasVideo(p) : hasScreenShare(p)), distinctUntilChanged())
|
|
10368
10428
|
.subscribe((isPublishing) => {
|
|
10369
10429
|
if (isPublishing) {
|
|
10370
10430
|
// the participant just started to publish a track
|
|
@@ -12943,7 +13003,7 @@ class Call {
|
|
|
12943
13003
|
// NOTE: audio tracks don't have to be requested explicitly
|
|
12944
13004
|
// as the SFU will implicitly subscribe us to all of them,
|
|
12945
13005
|
// once they become available.
|
|
12946
|
-
if (p.videoDimension && p
|
|
13006
|
+
if (p.videoDimension && hasVideo(p)) {
|
|
12947
13007
|
subscriptions.push({
|
|
12948
13008
|
userId: p.userId,
|
|
12949
13009
|
sessionId: p.sessionId,
|
|
@@ -12951,8 +13011,7 @@ class Call {
|
|
|
12951
13011
|
dimension: p.videoDimension,
|
|
12952
13012
|
});
|
|
12953
13013
|
}
|
|
12954
|
-
if (p.screenShareDimension &&
|
|
12955
|
-
p.publishedTracks.includes(TrackType.SCREEN_SHARE)) {
|
|
13014
|
+
if (p.screenShareDimension && hasScreenShare(p)) {
|
|
12956
13015
|
subscriptions.push({
|
|
12957
13016
|
userId: p.userId,
|
|
12958
13017
|
sessionId: p.sessionId,
|
|
@@ -12960,7 +13019,7 @@ class Call {
|
|
|
12960
13019
|
dimension: p.screenShareDimension,
|
|
12961
13020
|
});
|
|
12962
13021
|
}
|
|
12963
|
-
if (p
|
|
13022
|
+
if (hasScreenShareAudio(p)) {
|
|
12964
13023
|
subscriptions.push({
|
|
12965
13024
|
userId: p.userId,
|
|
12966
13025
|
sessionId: p.sessionId,
|
|
@@ -15204,7 +15263,7 @@ class StreamClient {
|
|
|
15204
15263
|
});
|
|
15205
15264
|
};
|
|
15206
15265
|
this.getUserAgent = () => {
|
|
15207
|
-
const version = "1.0.
|
|
15266
|
+
const version = "1.0.7" ;
|
|
15208
15267
|
return (this.userAgent ||
|
|
15209
15268
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
15210
15269
|
};
|
|
@@ -15680,5 +15739,5 @@ class StreamVideoClient {
|
|
|
15680
15739
|
}
|
|
15681
15740
|
}
|
|
15682
15741
|
|
|
15683
|
-
export {
|
|
15742
|
+
export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, BlockListOptionsBehaviorEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, ChannelConfigWithInfoAutomodBehaviorEnum, ChannelConfigWithInfoAutomodEnum, ChannelConfigWithInfoBlocklistBehaviorEnum, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, InputMediaDeviceManager, InputMediaDeviceManagerState, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsRequestModeEnum, TranscriptionSettingsResponseModeEnum, VideoSettingsRequestCameraFacingEnum, VideoSettingsResponseCameraFacingEnum, 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
15743
|
//# sourceMappingURL=index.browser.es.js.map
|