@stream-io/video-client 1.29.0 → 1.30.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 +15 -0
- package/dist/index.browser.es.js +79 -9
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +79 -8
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +79 -9
- package/dist/index.es.js.map +1 -1
- package/dist/src/gen/video/sfu/event/events.d.ts +5 -1
- package/dist/src/gen/video/sfu/models/models.d.ts +35 -0
- package/dist/src/sorting/participants.d.ts +8 -0
- package/package.json +1 -1
- package/src/Call.ts +2 -0
- package/src/__tests__/StreamVideoClient.api.test.ts +1 -1
- package/src/devices/CameraManager.ts +11 -7
- package/src/devices/__tests__/CameraManager.test.ts +19 -0
- package/src/gen/video/sfu/event/events.ts +15 -0
- package/src/gen/video/sfu/models/models.ts +45 -0
- package/src/sorting/participants.ts +15 -0
- package/src/sorting/presets.ts +3 -4
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [1.30.1](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.30.0...@stream-io/video-client-1.30.1) (2025-09-16)
|
|
6
|
+
|
|
7
|
+
### Bug Fixes
|
|
8
|
+
|
|
9
|
+
- don't apply default camera state if video is off ([#1917](https://github.com/GetStream/stream-video-js/issues/1917)) ([9cf1d75](https://github.com/GetStream/stream-video-js/commit/9cf1d752d824a0527fbb187df21d8a020590d4bb))
|
|
10
|
+
- **rn:** set direction state for flip after constraints are applied ([1f03c59](https://github.com/GetStream/stream-video-js/commit/1f03c59b9b3fecc0ff1f7cb6b0eccb083b4a3475))
|
|
11
|
+
|
|
12
|
+
## [1.30.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.29.0...@stream-io/video-client-1.30.0) (2025-09-11)
|
|
13
|
+
|
|
14
|
+
- Skip tests for StreamVideoClient coordinator API ([aabe1d0](https://github.com/GetStream/stream-video-js/commit/aabe1d0ad3e3a95698b422991729e46289ab0277))
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
- Participant Source ([#1896](https://github.com/GetStream/stream-video-js/issues/1896)) ([b1cf710](https://github.com/GetStream/stream-video-js/commit/b1cf710ac3bfda573c0379dac1e6a107d2dbabf6))
|
|
19
|
+
|
|
5
20
|
## [1.29.0](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.28.1...@stream-io/video-client-1.29.0) (2025-09-09)
|
|
6
21
|
|
|
7
22
|
### Features
|
package/dist/index.browser.es.js
CHANGED
|
@@ -925,6 +925,38 @@ var TrackType;
|
|
|
925
925
|
*/
|
|
926
926
|
TrackType[TrackType["SCREEN_SHARE_AUDIO"] = 4] = "SCREEN_SHARE_AUDIO";
|
|
927
927
|
})(TrackType || (TrackType = {}));
|
|
928
|
+
/**
|
|
929
|
+
* must be aligned with kit
|
|
930
|
+
*
|
|
931
|
+
* @generated from protobuf enum stream.video.sfu.models.ParticipantSource
|
|
932
|
+
*/
|
|
933
|
+
var ParticipantSource;
|
|
934
|
+
(function (ParticipantSource) {
|
|
935
|
+
/**
|
|
936
|
+
* @generated from protobuf enum value: PARTICIPANT_SOURCE_WEBRTC_UNSPECIFIED = 0;
|
|
937
|
+
*/
|
|
938
|
+
ParticipantSource[ParticipantSource["WEBRTC_UNSPECIFIED"] = 0] = "WEBRTC_UNSPECIFIED";
|
|
939
|
+
/**
|
|
940
|
+
* @generated from protobuf enum value: PARTICIPANT_SOURCE_RTMP = 1;
|
|
941
|
+
*/
|
|
942
|
+
ParticipantSource[ParticipantSource["RTMP"] = 1] = "RTMP";
|
|
943
|
+
/**
|
|
944
|
+
* @generated from protobuf enum value: PARTICIPANT_SOURCE_WHIP = 2;
|
|
945
|
+
*/
|
|
946
|
+
ParticipantSource[ParticipantSource["WHIP"] = 2] = "WHIP";
|
|
947
|
+
/**
|
|
948
|
+
* @generated from protobuf enum value: PARTICIPANT_SOURCE_SIP = 3;
|
|
949
|
+
*/
|
|
950
|
+
ParticipantSource[ParticipantSource["SIP"] = 3] = "SIP";
|
|
951
|
+
/**
|
|
952
|
+
* @generated from protobuf enum value: PARTICIPANT_SOURCE_RTSP = 4;
|
|
953
|
+
*/
|
|
954
|
+
ParticipantSource[ParticipantSource["RTSP"] = 4] = "RTSP";
|
|
955
|
+
/**
|
|
956
|
+
* @generated from protobuf enum value: PARTICIPANT_SOURCE_SRT = 5;
|
|
957
|
+
*/
|
|
958
|
+
ParticipantSource[ParticipantSource["SRT"] = 5] = "SRT";
|
|
959
|
+
})(ParticipantSource || (ParticipantSource = {}));
|
|
928
960
|
/**
|
|
929
961
|
* @generated from protobuf enum stream.video.sfu.models.ErrorCode
|
|
930
962
|
*/
|
|
@@ -1386,6 +1418,16 @@ class Participant$Type extends MessageType {
|
|
|
1386
1418
|
repeat: 2 /*RepeatType.UNPACKED*/,
|
|
1387
1419
|
T: 9 /*ScalarType.STRING*/,
|
|
1388
1420
|
},
|
|
1421
|
+
{
|
|
1422
|
+
no: 14,
|
|
1423
|
+
name: 'source',
|
|
1424
|
+
kind: 'enum',
|
|
1425
|
+
T: () => [
|
|
1426
|
+
'stream.video.sfu.models.ParticipantSource',
|
|
1427
|
+
ParticipantSource,
|
|
1428
|
+
'PARTICIPANT_SOURCE_',
|
|
1429
|
+
],
|
|
1430
|
+
},
|
|
1389
1431
|
]);
|
|
1390
1432
|
}
|
|
1391
1433
|
}
|
|
@@ -1959,6 +2001,7 @@ var models = /*#__PURE__*/Object.freeze({
|
|
|
1959
2001
|
OS: OS,
|
|
1960
2002
|
Participant: Participant,
|
|
1961
2003
|
ParticipantCount: ParticipantCount,
|
|
2004
|
+
get ParticipantSource () { return ParticipantSource; },
|
|
1962
2005
|
get PeerType () { return PeerType; },
|
|
1963
2006
|
PerformanceStats: PerformanceStats,
|
|
1964
2007
|
Pin: Pin,
|
|
@@ -2961,6 +3004,16 @@ class JoinRequest$Type extends MessageType {
|
|
|
2961
3004
|
'CLIENT_CAPABILITY_',
|
|
2962
3005
|
],
|
|
2963
3006
|
},
|
|
3007
|
+
{
|
|
3008
|
+
no: 12,
|
|
3009
|
+
name: 'source',
|
|
3010
|
+
kind: 'enum',
|
|
3011
|
+
T: () => [
|
|
3012
|
+
'stream.video.sfu.models.ParticipantSource',
|
|
3013
|
+
ParticipantSource,
|
|
3014
|
+
'PARTICIPANT_SOURCE_',
|
|
3015
|
+
],
|
|
3016
|
+
},
|
|
2964
3017
|
]);
|
|
2965
3018
|
}
|
|
2966
3019
|
}
|
|
@@ -4525,6 +4578,19 @@ const pinned = (a, b) => {
|
|
|
4525
4578
|
return 1;
|
|
4526
4579
|
return 0;
|
|
4527
4580
|
};
|
|
4581
|
+
/**
|
|
4582
|
+
* A comparator creator which will set up a comparator which prioritizes
|
|
4583
|
+
* participants who are from a specific source (e.g., WebRTC, RTMP, WHIP...).
|
|
4584
|
+
*
|
|
4585
|
+
* @param source the source to prioritize.
|
|
4586
|
+
*/
|
|
4587
|
+
const withParticipantSource = (source) => (a, b) => {
|
|
4588
|
+
if (a.source === source && b.source !== source)
|
|
4589
|
+
return -1;
|
|
4590
|
+
if (a.source !== source && b.source === source)
|
|
4591
|
+
return 1;
|
|
4592
|
+
return 0;
|
|
4593
|
+
};
|
|
4528
4594
|
/**
|
|
4529
4595
|
* A comparator creator which will set up a comparator which prioritizes
|
|
4530
4596
|
* participants who have a specific reaction.
|
|
@@ -4598,7 +4664,7 @@ const paginatedLayoutSortPreset = combineComparators(pinned, ifInvisibleOrUnknow
|
|
|
4598
4664
|
/**
|
|
4599
4665
|
* The sorting preset for livestreams and audio rooms.
|
|
4600
4666
|
*/
|
|
4601
|
-
const livestreamOrAudioRoomSortPreset = combineComparators(ifInvisibleBy(combineComparators(dominantSpeaker, speaking, reactionType('raised-hand'), publishingVideo, publishingAudio)), role('admin', 'host', 'speaker'));
|
|
4667
|
+
const livestreamOrAudioRoomSortPreset = combineComparators(ifInvisibleBy(combineComparators(dominantSpeaker, speaking, reactionType('raised-hand'), withParticipantSource(ParticipantSource.RTMP), publishingVideo, publishingAudio)), role('admin', 'host', 'speaker'));
|
|
4602
4668
|
|
|
4603
4669
|
/**
|
|
4604
4670
|
* Returns the default egress object - when no egress data is available.
|
|
@@ -5691,7 +5757,7 @@ const getSdkVersion = (sdk) => {
|
|
|
5691
5757
|
return sdk ? `${sdk.major}.${sdk.minor}.${sdk.patch}` : '0.0.0-development';
|
|
5692
5758
|
};
|
|
5693
5759
|
|
|
5694
|
-
const version = "1.
|
|
5760
|
+
const version = "1.30.1";
|
|
5695
5761
|
const [major, minor, patch] = version.split('.');
|
|
5696
5762
|
let sdkInfo = {
|
|
5697
5763
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -10585,16 +10651,17 @@ class CameraManager extends InputMediaDeviceManager {
|
|
|
10585
10651
|
this.logger('warn', 'Setting direction is not supported on this device');
|
|
10586
10652
|
return;
|
|
10587
10653
|
}
|
|
10588
|
-
// providing both device id and direction doesn't work, so we deselect the device
|
|
10589
|
-
this.state.setDirection(direction);
|
|
10590
|
-
this.state.setDevice(undefined);
|
|
10591
10654
|
if (isReactNative()) {
|
|
10592
10655
|
const videoTrack = this.getTracks()[0];
|
|
10593
10656
|
await videoTrack?.applyConstraints({
|
|
10594
10657
|
facingMode: direction === 'front' ? 'user' : 'environment',
|
|
10595
10658
|
});
|
|
10659
|
+
this.state.setDirection(direction);
|
|
10596
10660
|
return;
|
|
10597
10661
|
}
|
|
10662
|
+
// providing both device id and direction doesn't work, so we deselect the device
|
|
10663
|
+
this.state.setDirection(direction);
|
|
10664
|
+
this.state.setDevice(undefined);
|
|
10598
10665
|
this.getTracks().forEach((track) => track.stop());
|
|
10599
10666
|
try {
|
|
10600
10667
|
await this.unmuteStream();
|
|
@@ -10659,7 +10726,7 @@ class CameraManager extends InputMediaDeviceManager {
|
|
|
10659
10726
|
return;
|
|
10660
10727
|
// Wait for any in progress camera operation
|
|
10661
10728
|
await this.statusChangeSettled();
|
|
10662
|
-
const { target_resolution, camera_facing, camera_default_on } = settings;
|
|
10729
|
+
const { target_resolution, camera_facing, camera_default_on, enabled } = settings;
|
|
10663
10730
|
// normalize target resolution to landscape format.
|
|
10664
10731
|
// on mobile devices, the device itself adjusts the resolution to portrait or landscape
|
|
10665
10732
|
// depending on the orientation of the device. using portrait resolution
|
|
@@ -10679,7 +10746,9 @@ class CameraManager extends InputMediaDeviceManager {
|
|
|
10679
10746
|
// The camera is already enabled (e.g. lobby screen). Publish the stream
|
|
10680
10747
|
await this.publishStream(mediaStream);
|
|
10681
10748
|
}
|
|
10682
|
-
else if (this.state.status === undefined &&
|
|
10749
|
+
else if (this.state.status === undefined &&
|
|
10750
|
+
camera_default_on &&
|
|
10751
|
+
enabled) {
|
|
10683
10752
|
// Start camera if backend config specifies, and there is no local setting
|
|
10684
10753
|
await this.enable();
|
|
10685
10754
|
}
|
|
@@ -12045,6 +12114,7 @@ class Call {
|
|
|
12045
12114
|
preferredPublishOptions,
|
|
12046
12115
|
preferredSubscribeOptions,
|
|
12047
12116
|
capabilities: Array.from(this.clientCapabilities),
|
|
12117
|
+
source: ParticipantSource.WEBRTC_UNSPECIFIED,
|
|
12048
12118
|
});
|
|
12049
12119
|
this.currentPublishOptions = publishOptions;
|
|
12050
12120
|
this.fastReconnectDeadlineSeconds = fastReconnectDeadlineSeconds;
|
|
@@ -14594,7 +14664,7 @@ class StreamClient {
|
|
|
14594
14664
|
this.getUserAgent = () => {
|
|
14595
14665
|
if (!this.cachedUserAgent) {
|
|
14596
14666
|
const { clientAppIdentifier = {} } = this.options;
|
|
14597
|
-
const { sdkName = 'js', sdkVersion = "1.
|
|
14667
|
+
const { sdkName = 'js', sdkVersion = "1.30.1", ...extras } = clientAppIdentifier;
|
|
14598
14668
|
this.cachedUserAgent = [
|
|
14599
14669
|
`stream-video-${sdkName}-v${sdkVersion}`,
|
|
14600
14670
|
...Object.entries(extras).map(([key, value]) => `${key}=${value}`),
|
|
@@ -15162,5 +15232,5 @@ class StreamVideoClient {
|
|
|
15162
15232
|
}
|
|
15163
15233
|
StreamVideoClient._instances = new Map();
|
|
15164
15234
|
|
|
15165
|
-
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 };
|
|
15235
|
+
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, withParticipantSource };
|
|
15166
15236
|
//# sourceMappingURL=index.browser.es.js.map
|