@stream-io/video-client 1.16.2 → 1.16.4
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 +62 -26
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +63 -25
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +62 -26
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +11 -6
- package/dist/src/gen/coordinator/index.d.ts +122 -7
- package/dist/src/rtc/BasePeerConnection.d.ts +1 -1
- package/dist/src/rtc/Publisher.d.ts +8 -0
- package/package.json +1 -1
- package/src/Call.ts +29 -23
- package/src/gen/coordinator/index.ts +128 -7
- package/src/rtc/BasePeerConnection.ts +2 -2
- package/src/rtc/Publisher.ts +19 -0
- package/src/rtc/__tests__/Publisher.test.ts +10 -0
- package/src/rtc/__tests__/mocks/webrtc.mocks.ts +1 -1
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.16.4](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.16.3...@stream-io/video-client-1.16.4) (2025-02-07)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* ensure tracks are stopped when disposing a Publisher ([#1676](https://github.com/GetStream/stream-video-js/issues/1676)) ([948f672](https://github.com/GetStream/stream-video-js/commit/948f672243e1f2a0e9499184ee31db4bc88f9952))
|
|
11
|
+
|
|
12
|
+
## [1.16.3](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.16.2...@stream-io/video-client-1.16.3) (2025-02-06)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* relaxed validation for submitting feedback ([#1673](https://github.com/GetStream/stream-video-js/issues/1673)) ([98685b9](https://github.com/GetStream/stream-video-js/commit/98685b9fcf3c3b0309a7072d51cde4657e028528))
|
|
18
|
+
|
|
5
19
|
## [1.16.2](https://github.com/GetStream/stream-video-js/compare/@stream-io/video-client-1.16.1...@stream-io/video-client-1.16.2) (2025-02-05)
|
|
6
20
|
|
|
7
21
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -31,6 +31,22 @@ const CreateDeviceRequestPushProviderEnum = {
|
|
|
31
31
|
HUAWEI: 'huawei',
|
|
32
32
|
XIAOMI: 'xiaomi',
|
|
33
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* @export
|
|
36
|
+
*/
|
|
37
|
+
const FrameRecordingSettingsRequestModeEnum = {
|
|
38
|
+
AVAILABLE: 'available',
|
|
39
|
+
DISABLED: 'disabled',
|
|
40
|
+
AUTO_ON: 'auto-on',
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* @export
|
|
44
|
+
*/
|
|
45
|
+
const FrameRecordingSettingsResponseModeEnum = {
|
|
46
|
+
AVAILABLE: 'available',
|
|
47
|
+
DISABLED: 'disabled',
|
|
48
|
+
AUTO_ON: 'auto-on',
|
|
49
|
+
};
|
|
34
50
|
/**
|
|
35
51
|
* @export
|
|
36
52
|
*/
|
|
@@ -72,10 +88,12 @@ const OwnCapability = {
|
|
|
72
88
|
SEND_VIDEO: 'send-video',
|
|
73
89
|
START_BROADCAST_CALL: 'start-broadcast-call',
|
|
74
90
|
START_CLOSED_CAPTIONS_CALL: 'start-closed-captions-call',
|
|
91
|
+
START_FRAME_RECORD_CALL: 'start-frame-record-call',
|
|
75
92
|
START_RECORD_CALL: 'start-record-call',
|
|
76
93
|
START_TRANSCRIPTION_CALL: 'start-transcription-call',
|
|
77
94
|
STOP_BROADCAST_CALL: 'stop-broadcast-call',
|
|
78
95
|
STOP_CLOSED_CAPTIONS_CALL: 'stop-closed-captions-call',
|
|
96
|
+
STOP_FRAME_RECORD_CALL: 'stop-frame-record-call',
|
|
79
97
|
STOP_RECORD_CALL: 'stop-record-call',
|
|
80
98
|
STOP_TRANSCRIPTION_CALL: 'stop-transcription-call',
|
|
81
99
|
UPDATE_CALL: 'update-call',
|
|
@@ -5185,15 +5203,6 @@ class BasePeerConnection {
|
|
|
5185
5203
|
this.isIceRestarting = false;
|
|
5186
5204
|
this.isDisposed = false;
|
|
5187
5205
|
this.subscriptions = [];
|
|
5188
|
-
/**
|
|
5189
|
-
* Disposes the `RTCPeerConnection` instance.
|
|
5190
|
-
*/
|
|
5191
|
-
this.dispose = () => {
|
|
5192
|
-
this.onUnrecoverableError = undefined;
|
|
5193
|
-
this.isDisposed = true;
|
|
5194
|
-
this.detachEventHandlers();
|
|
5195
|
-
this.pc.close();
|
|
5196
|
-
};
|
|
5197
5206
|
/**
|
|
5198
5207
|
* Handles events synchronously.
|
|
5199
5208
|
* Consecutive events are queued and executed one after the other.
|
|
@@ -5330,6 +5339,15 @@ class BasePeerConnection {
|
|
|
5330
5339
|
this.pc.addEventListener('icegatheringstatechange', this.onIceGatherChange);
|
|
5331
5340
|
this.pc.addEventListener('signalingstatechange', this.onSignalingChange);
|
|
5332
5341
|
}
|
|
5342
|
+
/**
|
|
5343
|
+
* Disposes the `RTCPeerConnection` instance.
|
|
5344
|
+
*/
|
|
5345
|
+
dispose() {
|
|
5346
|
+
this.onUnrecoverableError = undefined;
|
|
5347
|
+
this.isDisposed = true;
|
|
5348
|
+
this.detachEventHandlers();
|
|
5349
|
+
this.pc.close();
|
|
5350
|
+
}
|
|
5333
5351
|
/**
|
|
5334
5352
|
* Detaches the event handlers from the `RTCPeerConnection`.
|
|
5335
5353
|
*/
|
|
@@ -5690,7 +5708,9 @@ class Publisher extends BasePeerConnection {
|
|
|
5690
5708
|
this.addTransceiver(trackToPublish, publishOption);
|
|
5691
5709
|
}
|
|
5692
5710
|
else {
|
|
5711
|
+
const previousTrack = transceiver.sender.track;
|
|
5693
5712
|
await transceiver.sender.replaceTrack(trackToPublish);
|
|
5713
|
+
previousTrack?.stop();
|
|
5694
5714
|
}
|
|
5695
5715
|
}
|
|
5696
5716
|
};
|
|
@@ -5782,6 +5802,14 @@ class Publisher extends BasePeerConnection {
|
|
|
5782
5802
|
transceiver.sender.track?.stop();
|
|
5783
5803
|
}
|
|
5784
5804
|
};
|
|
5805
|
+
/**
|
|
5806
|
+
* Stops all the cloned tracks that are being published to the SFU.
|
|
5807
|
+
*/
|
|
5808
|
+
this.stopAllTracks = () => {
|
|
5809
|
+
for (const { transceiver } of this.transceiverCache.items()) {
|
|
5810
|
+
transceiver.sender.track?.stop();
|
|
5811
|
+
}
|
|
5812
|
+
};
|
|
5785
5813
|
this.changePublishQuality = async (videoSender) => {
|
|
5786
5814
|
const { trackType, layers, publishOptionId } = videoSender;
|
|
5787
5815
|
const enabledLayers = layers.filter((l) => l.active);
|
|
@@ -5990,6 +6018,13 @@ class Publisher extends BasePeerConnection {
|
|
|
5990
6018
|
// abort any ongoing negotiation
|
|
5991
6019
|
withCancellation('publisher.negotiate', () => Promise.resolve());
|
|
5992
6020
|
}
|
|
6021
|
+
/**
|
|
6022
|
+
* Disposes this Publisher instance.
|
|
6023
|
+
*/
|
|
6024
|
+
dispose() {
|
|
6025
|
+
super.dispose();
|
|
6026
|
+
this.stopAllTracks();
|
|
6027
|
+
}
|
|
5993
6028
|
}
|
|
5994
6029
|
|
|
5995
6030
|
/**
|
|
@@ -7413,7 +7448,7 @@ const aggregate = (stats) => {
|
|
|
7413
7448
|
return report;
|
|
7414
7449
|
};
|
|
7415
7450
|
|
|
7416
|
-
const version = "1.16.
|
|
7451
|
+
const version = "1.16.4";
|
|
7417
7452
|
const [major, minor, patch] = version.split('.');
|
|
7418
7453
|
let sdkInfo = {
|
|
7419
7454
|
type: SdkType.PLAIN_JAVASCRIPT,
|
|
@@ -11540,6 +11575,19 @@ class Call {
|
|
|
11540
11575
|
this.stopRTMPBroadcast = async (name) => {
|
|
11541
11576
|
return this.streamClient.post(`${this.streamClientBasePath}/rtmp_broadcasts/${name}/stop`);
|
|
11542
11577
|
};
|
|
11578
|
+
/**
|
|
11579
|
+
* Starts frame by frame recording.
|
|
11580
|
+
* Sends call.frame_recording_started events
|
|
11581
|
+
*/
|
|
11582
|
+
this.startFrameRecording = async (data) => {
|
|
11583
|
+
return this.streamClient.post(`${this.streamClientBasePath}/start_frame_recording`, data);
|
|
11584
|
+
};
|
|
11585
|
+
/**
|
|
11586
|
+
* Stops frame recording.
|
|
11587
|
+
*/
|
|
11588
|
+
this.stopFrameRecording = async () => {
|
|
11589
|
+
return this.streamClient.post(`${this.streamClientBasePath}/stop_frame_recording`);
|
|
11590
|
+
};
|
|
11543
11591
|
/**
|
|
11544
11592
|
* Updates the call settings or custom data.
|
|
11545
11593
|
*
|
|
@@ -11697,25 +11745,13 @@ class Call {
|
|
|
11697
11745
|
* @param rating Rating between 1 and 5 denoting the experience of the user in the call
|
|
11698
11746
|
* @param reason The reason/description for the rating
|
|
11699
11747
|
* @param custom Custom data
|
|
11700
|
-
* @returns
|
|
11701
11748
|
*/
|
|
11702
11749
|
this.submitFeedback = async (rating, { reason, custom, } = {}) => {
|
|
11703
|
-
if (rating < 1 || rating > 5) {
|
|
11704
|
-
throw new Error('Rating must be between 1 and 5');
|
|
11705
|
-
}
|
|
11706
|
-
const callSessionId = this.state.session?.id;
|
|
11707
|
-
if (!callSessionId) {
|
|
11708
|
-
throw new Error('Feedback can be submitted only in the context of a call session');
|
|
11709
|
-
}
|
|
11710
11750
|
const { sdkName, sdkVersion, ...platform } = getSdkSignature(getClientDetails());
|
|
11711
|
-
|
|
11712
|
-
// until we relax the backend validation, we'll send N/A
|
|
11713
|
-
const userSessionId = this.sfuClient?.sessionId ?? 'N/A';
|
|
11714
|
-
const endpoint = `${this.streamClientBasePath}/feedback/${callSessionId}`;
|
|
11715
|
-
return this.streamClient.post(endpoint, {
|
|
11751
|
+
return this.streamClient.post(`${this.streamClientBasePath}/feedback`, {
|
|
11716
11752
|
rating,
|
|
11717
11753
|
reason,
|
|
11718
|
-
user_session_id:
|
|
11754
|
+
user_session_id: this.sfuClient?.sessionId,
|
|
11719
11755
|
sdk: sdkName,
|
|
11720
11756
|
sdk_version: sdkVersion,
|
|
11721
11757
|
custom: {
|
|
@@ -13020,7 +13056,7 @@ class StreamClient {
|
|
|
13020
13056
|
return await this.wsConnection.connect(this.defaultWSTimeout);
|
|
13021
13057
|
};
|
|
13022
13058
|
this.getUserAgent = () => {
|
|
13023
|
-
const version = "1.16.
|
|
13059
|
+
const version = "1.16.4";
|
|
13024
13060
|
return (this.userAgent ||
|
|
13025
13061
|
`stream-video-javascript-client-${this.node ? 'node' : 'browser'}-${version}`);
|
|
13026
13062
|
};
|
|
@@ -13529,5 +13565,5 @@ class StreamVideoClient {
|
|
|
13529
13565
|
}
|
|
13530
13566
|
StreamVideoClient._instanceMap = new Map();
|
|
13531
13567
|
|
|
13532
|
-
export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, InputMediaDeviceManager, InputMediaDeviceManagerState, LayoutSettingsRequestNameEnum, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RTMPBroadcastRequestQualityEnum, RTMPSettingsRequestQualityEnum, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, 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, getDeviceInfo, getDeviceState, getLogLevel, getLogger, getOSInfo, getScreenShareStream, getSdkInfo, getVideoBrowserPermission, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio, hasScreenShare, hasScreenShareAudio, hasVideo, isPinned, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setPowerState, setSdkInfo, setThermalState, setWebRTCInfo, speakerLayoutSortPreset, speaking };
|
|
13568
|
+
export { AudioSettingsRequestDefaultDeviceEnum, AudioSettingsResponseDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CameraManager, CameraManagerState, CreateDeviceRequestPushProviderEnum, DebounceType, DynascaleManager, ErrorFromResponse, FrameRecordingSettingsRequestModeEnum, FrameRecordingSettingsResponseModeEnum, InputMediaDeviceManager, InputMediaDeviceManagerState, LayoutSettingsRequestNameEnum, MicrophoneManager, MicrophoneManagerState, NoiseCancellationSettingsModeEnum, OwnCapability, RTMPBroadcastRequestQualityEnum, RTMPSettingsRequestQualityEnum, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, ScreenShareManager, ScreenShareState, events as SfuEvents, models as SfuModels, SpeakerManager, SpeakerState, 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, getDeviceInfo, getDeviceState, getLogLevel, getLogger, getOSInfo, getScreenShareStream, getSdkInfo, getVideoBrowserPermission, getVideoDevices, getVideoStream, getWebRTCInfo, hasAudio, hasScreenShare, hasScreenShareAudio, hasVideo, isPinned, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, paginatedLayoutSortPreset, pinned, publishingAudio, publishingVideo, reactionType, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setPowerState, setSdkInfo, setThermalState, setWebRTCInfo, speakerLayoutSortPreset, speaking };
|
|
13533
13569
|
//# sourceMappingURL=index.browser.es.js.map
|