@stream-io/video-client 1.31.0 → 1.33.0
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 +21 -0
- package/dist/index.browser.es.js +350 -83
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +351 -84
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +350 -83
- package/dist/index.es.js.map +1 -1
- package/dist/src/Call.d.ts +3 -2
- package/dist/src/StreamVideoClient.d.ts +2 -0
- package/dist/src/coordinator/connection/types.d.ts +4 -0
- package/dist/src/devices/AudioDeviceManager.d.ts +25 -0
- package/dist/src/devices/AudioDeviceManagerState.d.ts +24 -0
- package/dist/src/devices/CameraManager.d.ts +2 -2
- package/dist/src/devices/CameraManagerState.d.ts +3 -4
- package/dist/src/devices/{InputMediaDeviceManager.d.ts → DeviceManager.d.ts} +6 -6
- package/dist/src/devices/{InputMediaDeviceManagerState.d.ts → DeviceManagerState.d.ts} +4 -4
- package/dist/src/devices/MicrophoneManager.d.ts +5 -3
- package/dist/src/devices/MicrophoneManagerState.d.ts +6 -10
- package/dist/src/devices/ScreenShareManager.d.ts +4 -2
- package/dist/src/devices/ScreenShareState.d.ts +6 -2
- package/dist/src/devices/SpeakerState.d.ts +4 -4
- package/dist/src/devices/index.d.ts +2 -2
- package/dist/src/gen/coordinator/index.d.ts +169 -2
- package/dist/src/gen/video/sfu/event/events.d.ts +8 -0
- package/dist/src/gen/video/sfu/models/models.d.ts +43 -0
- package/dist/src/rtc/BasePeerConnection.d.ts +2 -12
- package/dist/src/rtc/Publisher.d.ts +9 -6
- package/dist/src/rtc/Subscriber.d.ts +2 -1
- package/dist/src/rtc/TransceiverCache.d.ts +10 -11
- package/dist/src/rtc/index.d.ts +1 -1
- package/dist/src/rtc/{videoLayers.d.ts → layers.d.ts} +7 -1
- package/dist/src/rtc/types.d.ts +31 -0
- package/package.json +3 -2
- package/src/Call.ts +19 -12
- package/src/StreamVideoClient.ts +42 -3
- package/src/__tests__/Call.publishing.test.ts +14 -3
- package/src/__tests__/StreamVideoClient.api.test.ts +1 -1
- package/src/coordinator/connection/types.ts +5 -0
- package/src/devices/AudioDeviceManager.ts +61 -0
- package/src/devices/AudioDeviceManagerState.ts +44 -0
- package/src/devices/CameraManager.ts +4 -4
- package/src/devices/CameraManagerState.ts +9 -8
- package/src/devices/{InputMediaDeviceManager.ts → DeviceManager.ts} +11 -8
- package/src/devices/{InputMediaDeviceManagerState.ts → DeviceManagerState.ts} +7 -4
- package/src/devices/MicrophoneManager.ts +26 -6
- package/src/devices/MicrophoneManagerState.ts +18 -19
- package/src/devices/ScreenShareManager.ts +23 -4
- package/src/devices/ScreenShareState.ts +11 -3
- package/src/devices/SpeakerState.ts +6 -14
- package/src/devices/__tests__/CameraManager.test.ts +1 -0
- package/src/devices/__tests__/{InputMediaDeviceManager.test.ts → DeviceManager.test.ts} +4 -4
- package/src/devices/__tests__/{InputMediaDeviceManagerFilters.test.ts → DeviceManagerFilters.test.ts} +4 -4
- package/src/devices/__tests__/{InputMediaDeviceManagerState.test.ts → DeviceManagerState.test.ts} +2 -2
- package/src/devices/__tests__/MicrophoneManager.test.ts +41 -1
- package/src/devices/__tests__/NoiseCancellationStub.ts +3 -1
- package/src/devices/__tests__/ScreenShareManager.test.ts +5 -1
- package/src/devices/index.ts +2 -2
- package/src/events/__tests__/internal.test.ts +25 -11
- package/src/gen/coordinator/index.ts +169 -2
- package/src/gen/video/sfu/event/events.ts +14 -0
- package/src/gen/video/sfu/models/models.ts +65 -0
- package/src/rtc/BasePeerConnection.ts +1 -16
- package/src/rtc/Publisher.ts +74 -31
- package/src/rtc/Subscriber.ts +2 -4
- package/src/rtc/TransceiverCache.ts +23 -27
- package/src/rtc/__tests__/Publisher.test.ts +61 -29
- package/src/rtc/__tests__/{videoLayers.test.ts → layers.test.ts} +76 -1
- package/src/rtc/index.ts +2 -1
- package/src/rtc/{videoLayers.ts → layers.ts} +28 -7
- package/src/rtc/types.ts +44 -0
- package/src/sorting/presets.ts +2 -2
- package/src/store/CallState.ts +36 -10
- package/src/store/__tests__/CallState.test.ts +20 -2
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { describe, expect, it, vi } from 'vitest';
|
|
2
|
+
import { fromPartial } from '@total-typescript/shoehorn';
|
|
2
3
|
import { Call } from '../../Call';
|
|
3
4
|
import { Dispatcher } from '../../rtc';
|
|
4
5
|
import { CallState } from '../../store';
|
|
@@ -30,13 +31,12 @@ describe('internal events', () => {
|
|
|
30
31
|
dispatcher.dispatch({
|
|
31
32
|
eventPayload: {
|
|
32
33
|
oneofKind: 'connectionQualityChanged',
|
|
33
|
-
// @ts-expect-error incomplete data
|
|
34
34
|
connectionQualityChanged: {
|
|
35
35
|
connectionQualityUpdates: [
|
|
36
|
-
{
|
|
36
|
+
fromPartial({
|
|
37
37
|
sessionId: 'session-1',
|
|
38
38
|
connectionQuality: ConnectionQuality.EXCELLENT,
|
|
39
|
-
},
|
|
39
|
+
}),
|
|
40
40
|
],
|
|
41
41
|
},
|
|
42
42
|
},
|
|
@@ -60,7 +60,6 @@ describe('internal events', () => {
|
|
|
60
60
|
dispatcher.dispatch({
|
|
61
61
|
eventPayload: {
|
|
62
62
|
oneofKind: 'healthCheckResponse',
|
|
63
|
-
// @ts-expect-error incomplete data
|
|
64
63
|
healthCheckResponse: { participantCount: { total: 5, anonymous: 2 } },
|
|
65
64
|
},
|
|
66
65
|
});
|
|
@@ -118,20 +117,35 @@ describe('internal events', () => {
|
|
|
118
117
|
it('handles pinUpdated', () => {
|
|
119
118
|
const state = new CallState();
|
|
120
119
|
state.setParticipants([
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
120
|
+
fromPartial({
|
|
121
|
+
userId: 'u1',
|
|
122
|
+
sessionId: 'session-1',
|
|
123
|
+
publishedTracks: [],
|
|
124
|
+
}),
|
|
125
|
+
fromPartial({
|
|
126
|
+
userId: 'u2',
|
|
127
|
+
sessionId: 'session-2',
|
|
128
|
+
publishedTracks: [],
|
|
129
|
+
}),
|
|
125
130
|
]);
|
|
126
|
-
|
|
127
|
-
|
|
131
|
+
|
|
132
|
+
watchPinsUpdated(state)({
|
|
133
|
+
pins: [{ userId: 'u1', sessionId: 'session-1' }],
|
|
134
|
+
});
|
|
135
|
+
|
|
128
136
|
expect(state.participants).toEqual([
|
|
129
137
|
{
|
|
130
138
|
userId: 'u1',
|
|
131
139
|
sessionId: 'session-1',
|
|
132
140
|
pin: { isLocalPin: false, pinnedAt: expect.any(Number) },
|
|
141
|
+
publishedTracks: [],
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
userId: 'u2',
|
|
145
|
+
sessionId: 'session-2',
|
|
146
|
+
pin: undefined,
|
|
147
|
+
publishedTracks: [],
|
|
133
148
|
},
|
|
134
|
-
{ userId: 'u2', sessionId: 'session-2', pin: undefined },
|
|
135
149
|
]);
|
|
136
150
|
});
|
|
137
151
|
|
|
@@ -86,6 +86,12 @@ export interface AudioSettingsRequest {
|
|
|
86
86
|
* @memberof AudioSettingsRequest
|
|
87
87
|
*/
|
|
88
88
|
default_device: AudioSettingsRequestDefaultDeviceEnum;
|
|
89
|
+
/**
|
|
90
|
+
*
|
|
91
|
+
* @type {boolean}
|
|
92
|
+
* @memberof AudioSettingsRequest
|
|
93
|
+
*/
|
|
94
|
+
hifi_audio_enabled?: boolean;
|
|
89
95
|
/**
|
|
90
96
|
*
|
|
91
97
|
* @type {boolean}
|
|
@@ -146,6 +152,12 @@ export interface AudioSettingsResponse {
|
|
|
146
152
|
* @memberof AudioSettingsResponse
|
|
147
153
|
*/
|
|
148
154
|
default_device: AudioSettingsResponseDefaultDeviceEnum;
|
|
155
|
+
/**
|
|
156
|
+
*
|
|
157
|
+
* @type {boolean}
|
|
158
|
+
* @memberof AudioSettingsResponse
|
|
159
|
+
*/
|
|
160
|
+
hifi_audio_enabled?: boolean;
|
|
149
161
|
/**
|
|
150
162
|
*
|
|
151
163
|
* @type {boolean}
|
|
@@ -408,6 +420,24 @@ export interface CallClosedCaption {
|
|
|
408
420
|
* @memberof CallClosedCaption
|
|
409
421
|
*/
|
|
410
422
|
end_time: string;
|
|
423
|
+
/**
|
|
424
|
+
*
|
|
425
|
+
* @type {string}
|
|
426
|
+
* @memberof CallClosedCaption
|
|
427
|
+
*/
|
|
428
|
+
id: string;
|
|
429
|
+
/**
|
|
430
|
+
*
|
|
431
|
+
* @type {string}
|
|
432
|
+
* @memberof CallClosedCaption
|
|
433
|
+
*/
|
|
434
|
+
language: string;
|
|
435
|
+
/**
|
|
436
|
+
*
|
|
437
|
+
* @type {string}
|
|
438
|
+
* @memberof CallClosedCaption
|
|
439
|
+
*/
|
|
440
|
+
service?: string;
|
|
411
441
|
/**
|
|
412
442
|
*
|
|
413
443
|
* @type {string}
|
|
@@ -426,6 +456,12 @@ export interface CallClosedCaption {
|
|
|
426
456
|
* @memberof CallClosedCaption
|
|
427
457
|
*/
|
|
428
458
|
text: string;
|
|
459
|
+
/**
|
|
460
|
+
*
|
|
461
|
+
* @type {boolean}
|
|
462
|
+
* @memberof CallClosedCaption
|
|
463
|
+
*/
|
|
464
|
+
translated: boolean;
|
|
429
465
|
/**
|
|
430
466
|
*
|
|
431
467
|
* @type {UserResponse}
|
|
@@ -917,6 +953,18 @@ export interface CallIngressResponse {
|
|
|
917
953
|
* @memberof CallIngressResponse
|
|
918
954
|
*/
|
|
919
955
|
rtmp: RTMPIngress;
|
|
956
|
+
/**
|
|
957
|
+
*
|
|
958
|
+
* @type {SRTIngress}
|
|
959
|
+
* @memberof CallIngressResponse
|
|
960
|
+
*/
|
|
961
|
+
srt: SRTIngress;
|
|
962
|
+
/**
|
|
963
|
+
*
|
|
964
|
+
* @type {WHIPIngress}
|
|
965
|
+
* @memberof CallIngressResponse
|
|
966
|
+
*/
|
|
967
|
+
whip: WHIPIngress;
|
|
920
968
|
}
|
|
921
969
|
/**
|
|
922
970
|
* This event is sent when a call is started. Clients receiving this event should start the call.
|
|
@@ -1791,6 +1839,12 @@ export interface CallResponse {
|
|
|
1791
1839
|
* @memberof CallResponse
|
|
1792
1840
|
*/
|
|
1793
1841
|
transcribing: boolean;
|
|
1842
|
+
/**
|
|
1843
|
+
*
|
|
1844
|
+
* @type {boolean}
|
|
1845
|
+
* @memberof CallResponse
|
|
1846
|
+
*/
|
|
1847
|
+
translating: boolean;
|
|
1794
1848
|
/**
|
|
1795
1849
|
* The type of call
|
|
1796
1850
|
* @type {string}
|
|
@@ -2099,6 +2153,12 @@ export interface CallSessionParticipantLeftEvent {
|
|
|
2099
2153
|
* @memberof CallSessionParticipantLeftEvent
|
|
2100
2154
|
*/
|
|
2101
2155
|
participant: CallParticipantResponse;
|
|
2156
|
+
/**
|
|
2157
|
+
* The reason why the participant left the session
|
|
2158
|
+
* @type {string}
|
|
2159
|
+
* @memberof CallSessionParticipantLeftEvent
|
|
2160
|
+
*/
|
|
2161
|
+
reason?: string;
|
|
2102
2162
|
/**
|
|
2103
2163
|
* Call session ID
|
|
2104
2164
|
* @type {string}
|
|
@@ -2732,7 +2792,7 @@ export interface CallUpdatedEvent {
|
|
|
2732
2792
|
*/
|
|
2733
2793
|
created_at: string;
|
|
2734
2794
|
/**
|
|
2735
|
-
* The type of event: "call.
|
|
2795
|
+
* The type of event: "call.updated" in this case
|
|
2736
2796
|
* @type {string}
|
|
2737
2797
|
* @memberof CallUpdatedEvent
|
|
2738
2798
|
*/
|
|
@@ -2835,6 +2895,12 @@ export interface CallUserMutedEvent {
|
|
|
2835
2895
|
* @memberof CallUserMutedEvent
|
|
2836
2896
|
*/
|
|
2837
2897
|
muted_user_ids: Array<string>;
|
|
2898
|
+
/**
|
|
2899
|
+
*
|
|
2900
|
+
* @type {string}
|
|
2901
|
+
* @memberof CallUserMutedEvent
|
|
2902
|
+
*/
|
|
2903
|
+
reason: string;
|
|
2838
2904
|
/**
|
|
2839
2905
|
* The type of event: "call.user_muted" in this case
|
|
2840
2906
|
* @type {string}
|
|
@@ -3787,6 +3853,12 @@ export interface GetCallReportResponse {
|
|
|
3787
3853
|
* @memberof GetCallReportResponse
|
|
3788
3854
|
*/
|
|
3789
3855
|
report: ReportResponse;
|
|
3856
|
+
/**
|
|
3857
|
+
*
|
|
3858
|
+
* @type {CallSessionResponse}
|
|
3859
|
+
* @memberof GetCallReportResponse
|
|
3860
|
+
*/
|
|
3861
|
+
session?: CallSessionResponse;
|
|
3790
3862
|
/**
|
|
3791
3863
|
*
|
|
3792
3864
|
* @type {string}
|
|
@@ -4928,6 +5000,7 @@ export const OwnCapability = {
|
|
|
4928
5000
|
REMOVE_CALL_MEMBER: 'remove-call-member',
|
|
4929
5001
|
SCREENSHARE: 'screenshare',
|
|
4930
5002
|
SEND_AUDIO: 'send-audio',
|
|
5003
|
+
SEND_CLOSED_CAPTIONS_CALL: 'send-closed-captions-call',
|
|
4931
5004
|
SEND_VIDEO: 'send-video',
|
|
4932
5005
|
START_BROADCAST_CALL: 'start-broadcast-call',
|
|
4933
5006
|
START_CLOSED_CAPTIONS_CALL: 'start-closed-captions-call',
|
|
@@ -6184,6 +6257,19 @@ export interface SFUResponse {
|
|
|
6184
6257
|
*/
|
|
6185
6258
|
ws_endpoint: string;
|
|
6186
6259
|
}
|
|
6260
|
+
/**
|
|
6261
|
+
*
|
|
6262
|
+
* @export
|
|
6263
|
+
* @interface SRTIngress
|
|
6264
|
+
*/
|
|
6265
|
+
export interface SRTIngress {
|
|
6266
|
+
/**
|
|
6267
|
+
*
|
|
6268
|
+
* @type {string}
|
|
6269
|
+
* @memberof SRTIngress
|
|
6270
|
+
*/
|
|
6271
|
+
address: string;
|
|
6272
|
+
}
|
|
6187
6273
|
/**
|
|
6188
6274
|
*
|
|
6189
6275
|
* @export
|
|
@@ -6349,6 +6435,25 @@ export interface SortParamRequest {
|
|
|
6349
6435
|
*/
|
|
6350
6436
|
field?: string;
|
|
6351
6437
|
}
|
|
6438
|
+
/**
|
|
6439
|
+
*
|
|
6440
|
+
* @export
|
|
6441
|
+
* @interface SpeechSegmentConfig
|
|
6442
|
+
*/
|
|
6443
|
+
export interface SpeechSegmentConfig {
|
|
6444
|
+
/**
|
|
6445
|
+
*
|
|
6446
|
+
* @type {number}
|
|
6447
|
+
* @memberof SpeechSegmentConfig
|
|
6448
|
+
*/
|
|
6449
|
+
max_speech_caption_ms?: number;
|
|
6450
|
+
/**
|
|
6451
|
+
*
|
|
6452
|
+
* @type {number}
|
|
6453
|
+
* @memberof SpeechSegmentConfig
|
|
6454
|
+
*/
|
|
6455
|
+
silence_duration_ms?: number;
|
|
6456
|
+
}
|
|
6352
6457
|
/**
|
|
6353
6458
|
*
|
|
6354
6459
|
* @export
|
|
@@ -6373,6 +6478,12 @@ export interface StartClosedCaptionsRequest {
|
|
|
6373
6478
|
* @memberof StartClosedCaptionsRequest
|
|
6374
6479
|
*/
|
|
6375
6480
|
language?: StartClosedCaptionsRequestLanguageEnum;
|
|
6481
|
+
/**
|
|
6482
|
+
*
|
|
6483
|
+
* @type {SpeechSegmentConfig}
|
|
6484
|
+
* @memberof StartClosedCaptionsRequest
|
|
6485
|
+
*/
|
|
6486
|
+
speech_segment_config?: SpeechSegmentConfig;
|
|
6376
6487
|
}
|
|
6377
6488
|
|
|
6378
6489
|
/**
|
|
@@ -6937,7 +7048,19 @@ export interface TranscriptionSettingsRequest {
|
|
|
6937
7048
|
* @type {string}
|
|
6938
7049
|
* @memberof TranscriptionSettingsRequest
|
|
6939
7050
|
*/
|
|
6940
|
-
mode
|
|
7051
|
+
mode?: TranscriptionSettingsRequestModeEnum;
|
|
7052
|
+
/**
|
|
7053
|
+
*
|
|
7054
|
+
* @type {SpeechSegmentConfig}
|
|
7055
|
+
* @memberof TranscriptionSettingsRequest
|
|
7056
|
+
*/
|
|
7057
|
+
speech_segment_config?: SpeechSegmentConfig;
|
|
7058
|
+
/**
|
|
7059
|
+
*
|
|
7060
|
+
* @type {TranslationSettings}
|
|
7061
|
+
* @memberof TranscriptionSettingsRequest
|
|
7062
|
+
*/
|
|
7063
|
+
translation?: TranslationSettings;
|
|
6941
7064
|
}
|
|
6942
7065
|
|
|
6943
7066
|
/**
|
|
@@ -7031,6 +7154,18 @@ export interface TranscriptionSettingsResponse {
|
|
|
7031
7154
|
* @memberof TranscriptionSettingsResponse
|
|
7032
7155
|
*/
|
|
7033
7156
|
mode: TranscriptionSettingsResponseModeEnum;
|
|
7157
|
+
/**
|
|
7158
|
+
*
|
|
7159
|
+
* @type {SpeechSegmentConfig}
|
|
7160
|
+
* @memberof TranscriptionSettingsResponse
|
|
7161
|
+
*/
|
|
7162
|
+
speech_segment_config?: SpeechSegmentConfig;
|
|
7163
|
+
/**
|
|
7164
|
+
*
|
|
7165
|
+
* @type {TranslationSettings}
|
|
7166
|
+
* @memberof TranscriptionSettingsResponse
|
|
7167
|
+
*/
|
|
7168
|
+
translation?: TranslationSettings;
|
|
7034
7169
|
}
|
|
7035
7170
|
|
|
7036
7171
|
/**
|
|
@@ -7100,6 +7235,25 @@ export const TranscriptionSettingsResponseModeEnum = {
|
|
|
7100
7235
|
export type TranscriptionSettingsResponseModeEnum =
|
|
7101
7236
|
(typeof TranscriptionSettingsResponseModeEnum)[keyof typeof TranscriptionSettingsResponseModeEnum];
|
|
7102
7237
|
|
|
7238
|
+
/**
|
|
7239
|
+
*
|
|
7240
|
+
* @export
|
|
7241
|
+
* @interface TranslationSettings
|
|
7242
|
+
*/
|
|
7243
|
+
export interface TranslationSettings {
|
|
7244
|
+
/**
|
|
7245
|
+
*
|
|
7246
|
+
* @type {boolean}
|
|
7247
|
+
* @memberof TranslationSettings
|
|
7248
|
+
*/
|
|
7249
|
+
enabled?: boolean;
|
|
7250
|
+
/**
|
|
7251
|
+
*
|
|
7252
|
+
* @type {Array<string>}
|
|
7253
|
+
* @memberof TranslationSettings
|
|
7254
|
+
*/
|
|
7255
|
+
languages?: Array<string>;
|
|
7256
|
+
}
|
|
7103
7257
|
/**
|
|
7104
7258
|
* UnblockUserRequest is the payload for unblocking a user.
|
|
7105
7259
|
* @export
|
|
@@ -7925,6 +8079,19 @@ export const VideoSettingsResponseCameraFacingEnum = {
|
|
|
7925
8079
|
export type VideoSettingsResponseCameraFacingEnum =
|
|
7926
8080
|
(typeof VideoSettingsResponseCameraFacingEnum)[keyof typeof VideoSettingsResponseCameraFacingEnum];
|
|
7927
8081
|
|
|
8082
|
+
/**
|
|
8083
|
+
*
|
|
8084
|
+
* @export
|
|
8085
|
+
* @interface WHIPIngress
|
|
8086
|
+
*/
|
|
8087
|
+
export interface WHIPIngress {
|
|
8088
|
+
/**
|
|
8089
|
+
* URL for a new whip input, every time a new link is created
|
|
8090
|
+
* @type {string}
|
|
8091
|
+
* @memberof WHIPIngress
|
|
8092
|
+
*/
|
|
8093
|
+
address: string;
|
|
8094
|
+
}
|
|
7928
8095
|
/**
|
|
7929
8096
|
* Websocket auth message
|
|
7930
8097
|
* @export
|
|
@@ -471,6 +471,14 @@ export interface JoinRequest {
|
|
|
471
471
|
* @generated from protobuf field: string session_id = 2;
|
|
472
472
|
*/
|
|
473
473
|
sessionId: string;
|
|
474
|
+
/**
|
|
475
|
+
* user_session id can change during reconnects, this helps us to
|
|
476
|
+
* identify the user across reconnects and should remain consistent until the user explicitly
|
|
477
|
+
* disconnects, is kicked or the call is ended.
|
|
478
|
+
*
|
|
479
|
+
* @generated from protobuf field: string unified_session_id = 13;
|
|
480
|
+
*/
|
|
481
|
+
unifiedSessionId: string;
|
|
474
482
|
/**
|
|
475
483
|
* dumb SDP that allow us to extract subscriber's decode codecs
|
|
476
484
|
*
|
|
@@ -1353,6 +1361,12 @@ class JoinRequest$Type extends MessageType<JoinRequest> {
|
|
|
1353
1361
|
super('stream.video.sfu.event.JoinRequest', [
|
|
1354
1362
|
{ no: 1, name: 'token', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
|
|
1355
1363
|
{ no: 2, name: 'session_id', kind: 'scalar', T: 9 /*ScalarType.STRING*/ },
|
|
1364
|
+
{
|
|
1365
|
+
no: 13,
|
|
1366
|
+
name: 'unified_session_id',
|
|
1367
|
+
kind: 'scalar',
|
|
1368
|
+
T: 9 /*ScalarType.STRING*/,
|
|
1369
|
+
},
|
|
1356
1370
|
{
|
|
1357
1371
|
no: 3,
|
|
1358
1372
|
name: 'subscriber_sdp',
|
|
@@ -301,6 +301,12 @@ export interface PublishOption {
|
|
|
301
301
|
* @generated from protobuf field: bool use_single_layer = 9;
|
|
302
302
|
*/
|
|
303
303
|
useSingleLayer: boolean;
|
|
304
|
+
/**
|
|
305
|
+
* Audio bitrate profiles for different audio quality profiles.
|
|
306
|
+
*
|
|
307
|
+
* @generated from protobuf field: repeated stream.video.sfu.models.AudioBitrate audio_bitrate_profiles = 10;
|
|
308
|
+
*/
|
|
309
|
+
audioBitrateProfiles: AudioBitrate[];
|
|
304
310
|
}
|
|
305
311
|
/**
|
|
306
312
|
* @generated from protobuf message stream.video.sfu.models.Codec
|
|
@@ -344,6 +350,19 @@ export interface ICETrickle {
|
|
|
344
350
|
*/
|
|
345
351
|
sessionId: string;
|
|
346
352
|
}
|
|
353
|
+
/**
|
|
354
|
+
* @generated from protobuf message stream.video.sfu.models.AudioBitrate
|
|
355
|
+
*/
|
|
356
|
+
export interface AudioBitrate {
|
|
357
|
+
/**
|
|
358
|
+
* @generated from protobuf field: stream.video.sfu.models.AudioBitrateProfile profile = 1;
|
|
359
|
+
*/
|
|
360
|
+
profile: AudioBitrateProfile;
|
|
361
|
+
/**
|
|
362
|
+
* @generated from protobuf field: int32 bitrate = 2;
|
|
363
|
+
*/
|
|
364
|
+
bitrate: number;
|
|
365
|
+
}
|
|
347
366
|
/**
|
|
348
367
|
* @generated from protobuf message stream.video.sfu.models.TrackInfo
|
|
349
368
|
*/
|
|
@@ -794,6 +813,23 @@ export enum ParticipantSource {
|
|
|
794
813
|
*/
|
|
795
814
|
SRT = 5,
|
|
796
815
|
}
|
|
816
|
+
/**
|
|
817
|
+
* @generated from protobuf enum stream.video.sfu.models.AudioBitrateProfile
|
|
818
|
+
*/
|
|
819
|
+
export enum AudioBitrateProfile {
|
|
820
|
+
/**
|
|
821
|
+
* @generated from protobuf enum value: AUDIO_BITRATE_PROFILE_VOICE_STANDARD_UNSPECIFIED = 0;
|
|
822
|
+
*/
|
|
823
|
+
VOICE_STANDARD_UNSPECIFIED = 0,
|
|
824
|
+
/**
|
|
825
|
+
* @generated from protobuf enum value: AUDIO_BITRATE_PROFILE_VOICE_HIGH_QUALITY = 1;
|
|
826
|
+
*/
|
|
827
|
+
VOICE_HIGH_QUALITY = 1,
|
|
828
|
+
/**
|
|
829
|
+
* @generated from protobuf enum value: AUDIO_BITRATE_PROFILE_MUSIC_HIGH_QUALITY = 2;
|
|
830
|
+
*/
|
|
831
|
+
MUSIC_HIGH_QUALITY = 2,
|
|
832
|
+
}
|
|
797
833
|
/**
|
|
798
834
|
* @generated from protobuf enum stream.video.sfu.models.ErrorCode
|
|
799
835
|
*/
|
|
@@ -1398,6 +1434,13 @@ class PublishOption$Type extends MessageType<PublishOption> {
|
|
|
1398
1434
|
kind: 'scalar',
|
|
1399
1435
|
T: 8 /*ScalarType.BOOL*/,
|
|
1400
1436
|
},
|
|
1437
|
+
{
|
|
1438
|
+
no: 10,
|
|
1439
|
+
name: 'audio_bitrate_profiles',
|
|
1440
|
+
kind: 'message',
|
|
1441
|
+
repeat: 2 /*RepeatType.UNPACKED*/,
|
|
1442
|
+
T: () => AudioBitrate,
|
|
1443
|
+
},
|
|
1401
1444
|
]);
|
|
1402
1445
|
}
|
|
1403
1446
|
}
|
|
@@ -1461,6 +1504,28 @@ class ICETrickle$Type extends MessageType<ICETrickle> {
|
|
|
1461
1504
|
*/
|
|
1462
1505
|
export const ICETrickle = new ICETrickle$Type();
|
|
1463
1506
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
1507
|
+
class AudioBitrate$Type extends MessageType<AudioBitrate> {
|
|
1508
|
+
constructor() {
|
|
1509
|
+
super('stream.video.sfu.models.AudioBitrate', [
|
|
1510
|
+
{
|
|
1511
|
+
no: 1,
|
|
1512
|
+
name: 'profile',
|
|
1513
|
+
kind: 'enum',
|
|
1514
|
+
T: () => [
|
|
1515
|
+
'stream.video.sfu.models.AudioBitrateProfile',
|
|
1516
|
+
AudioBitrateProfile,
|
|
1517
|
+
'AUDIO_BITRATE_PROFILE_',
|
|
1518
|
+
],
|
|
1519
|
+
},
|
|
1520
|
+
{ no: 2, name: 'bitrate', kind: 'scalar', T: 5 /*ScalarType.INT32*/ },
|
|
1521
|
+
]);
|
|
1522
|
+
}
|
|
1523
|
+
}
|
|
1524
|
+
/**
|
|
1525
|
+
* @generated MessageType for protobuf message stream.video.sfu.models.AudioBitrate
|
|
1526
|
+
*/
|
|
1527
|
+
export const AudioBitrate = new AudioBitrate$Type();
|
|
1528
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1464
1529
|
class TrackInfo$Type extends MessageType<TrackInfo> {
|
|
1465
1530
|
constructor() {
|
|
1466
1531
|
super('stream.video.sfu.models.TrackInfo', [
|
|
@@ -16,22 +16,7 @@ import { StreamSfuClient } from '../StreamSfuClient';
|
|
|
16
16
|
import { AllSfuEvents, Dispatcher } from './Dispatcher';
|
|
17
17
|
import { withoutConcurrency } from '../helpers/concurrency';
|
|
18
18
|
import { StatsTracer, Tracer, traceRTCPeerConnection } from '../stats';
|
|
19
|
-
|
|
20
|
-
export type OnReconnectionNeeded = (
|
|
21
|
-
kind: WebsocketReconnectStrategy,
|
|
22
|
-
reason: string,
|
|
23
|
-
) => void;
|
|
24
|
-
|
|
25
|
-
export type BasePeerConnectionOpts = {
|
|
26
|
-
sfuClient: StreamSfuClient;
|
|
27
|
-
state: CallState;
|
|
28
|
-
connectionConfig?: RTCConfiguration;
|
|
29
|
-
dispatcher: Dispatcher;
|
|
30
|
-
onReconnectionNeeded?: OnReconnectionNeeded;
|
|
31
|
-
tag: string;
|
|
32
|
-
enableTracing: boolean;
|
|
33
|
-
iceRestartDelay?: number;
|
|
34
|
-
};
|
|
19
|
+
import { BasePeerConnectionOpts, OnReconnectionNeeded } from './types';
|
|
35
20
|
|
|
36
21
|
/**
|
|
37
22
|
* A base class for the `Publisher` and `Subscriber` classes.
|