@stream-io/video-client 1.6.4 → 1.7.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 +14 -0
- package/dist/index.browser.es.js +34 -3838
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +34 -3838
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +34 -3838
- package/dist/index.es.js.map +1 -1
- package/dist/src/coordinator/connection/client.d.ts +0 -1
- package/dist/src/gen/google/protobuf/struct.d.ts +1 -11
- package/dist/src/gen/google/protobuf/timestamp.d.ts +1 -4
- package/dist/src/gen/video/sfu/event/events.d.ts +0 -106
- package/dist/src/gen/video/sfu/models/models.d.ts +0 -55
- package/dist/src/gen/video/sfu/signal_rpc/signal.d.ts +0 -64
- package/dist/src/stats/types.d.ts +1 -0
- package/package.json +6 -6
- package/src/coordinator/connection/client.ts +0 -6
- package/src/devices/InputMediaDeviceManager.ts +20 -14
- package/src/gen/google/protobuf/struct.ts +1 -286
- package/src/gen/google/protobuf/timestamp.ts +2 -78
- package/src/gen/video/sfu/event/events.ts +2 -2930
- package/src/gen/video/sfu/models/models.ts +2 -1553
- package/src/gen/video/sfu/signal_rpc/signal.client.ts +1 -1
- package/src/gen/video/sfu/signal_rpc/signal.ts +2 -1480
- package/src/stats/stateStoreStatsReporter.ts +4 -1
- package/src/stats/types.ts +1 -0
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Error, PeerType, TrackInfo, TrackType, VideoDimension } from '../models/models';
|
|
2
2
|
import { ServiceType } from '@protobuf-ts/runtime-rpc';
|
|
3
|
-
import type { BinaryReadOptions, BinaryWriteOptions, IBinaryReader, IBinaryWriter, PartialMessage } from '@protobuf-ts/runtime';
|
|
4
3
|
import { MessageType } from '@protobuf-ts/runtime';
|
|
5
4
|
/**
|
|
6
5
|
* @generated from protobuf message stream.video.sfu.signal.StartNoiseCancellationRequest
|
|
@@ -273,9 +272,6 @@ export interface SetPublisherResponse {
|
|
|
273
272
|
}
|
|
274
273
|
declare class StartNoiseCancellationRequest$Type extends MessageType<StartNoiseCancellationRequest> {
|
|
275
274
|
constructor();
|
|
276
|
-
create(value?: PartialMessage<StartNoiseCancellationRequest>): StartNoiseCancellationRequest;
|
|
277
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StartNoiseCancellationRequest): StartNoiseCancellationRequest;
|
|
278
|
-
internalBinaryWrite(message: StartNoiseCancellationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
279
275
|
}
|
|
280
276
|
/**
|
|
281
277
|
* @generated MessageType for protobuf message stream.video.sfu.signal.StartNoiseCancellationRequest
|
|
@@ -283,9 +279,6 @@ declare class StartNoiseCancellationRequest$Type extends MessageType<StartNoiseC
|
|
|
283
279
|
export declare const StartNoiseCancellationRequest: StartNoiseCancellationRequest$Type;
|
|
284
280
|
declare class StartNoiseCancellationResponse$Type extends MessageType<StartNoiseCancellationResponse> {
|
|
285
281
|
constructor();
|
|
286
|
-
create(value?: PartialMessage<StartNoiseCancellationResponse>): StartNoiseCancellationResponse;
|
|
287
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StartNoiseCancellationResponse): StartNoiseCancellationResponse;
|
|
288
|
-
internalBinaryWrite(message: StartNoiseCancellationResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
289
282
|
}
|
|
290
283
|
/**
|
|
291
284
|
* @generated MessageType for protobuf message stream.video.sfu.signal.StartNoiseCancellationResponse
|
|
@@ -293,9 +286,6 @@ declare class StartNoiseCancellationResponse$Type extends MessageType<StartNoise
|
|
|
293
286
|
export declare const StartNoiseCancellationResponse: StartNoiseCancellationResponse$Type;
|
|
294
287
|
declare class StopNoiseCancellationRequest$Type extends MessageType<StopNoiseCancellationRequest> {
|
|
295
288
|
constructor();
|
|
296
|
-
create(value?: PartialMessage<StopNoiseCancellationRequest>): StopNoiseCancellationRequest;
|
|
297
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StopNoiseCancellationRequest): StopNoiseCancellationRequest;
|
|
298
|
-
internalBinaryWrite(message: StopNoiseCancellationRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
299
289
|
}
|
|
300
290
|
/**
|
|
301
291
|
* @generated MessageType for protobuf message stream.video.sfu.signal.StopNoiseCancellationRequest
|
|
@@ -303,9 +293,6 @@ declare class StopNoiseCancellationRequest$Type extends MessageType<StopNoiseCan
|
|
|
303
293
|
export declare const StopNoiseCancellationRequest: StopNoiseCancellationRequest$Type;
|
|
304
294
|
declare class StopNoiseCancellationResponse$Type extends MessageType<StopNoiseCancellationResponse> {
|
|
305
295
|
constructor();
|
|
306
|
-
create(value?: PartialMessage<StopNoiseCancellationResponse>): StopNoiseCancellationResponse;
|
|
307
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: StopNoiseCancellationResponse): StopNoiseCancellationResponse;
|
|
308
|
-
internalBinaryWrite(message: StopNoiseCancellationResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
309
296
|
}
|
|
310
297
|
/**
|
|
311
298
|
* @generated MessageType for protobuf message stream.video.sfu.signal.StopNoiseCancellationResponse
|
|
@@ -313,9 +300,6 @@ declare class StopNoiseCancellationResponse$Type extends MessageType<StopNoiseCa
|
|
|
313
300
|
export declare const StopNoiseCancellationResponse: StopNoiseCancellationResponse$Type;
|
|
314
301
|
declare class SendStatsRequest$Type extends MessageType<SendStatsRequest> {
|
|
315
302
|
constructor();
|
|
316
|
-
create(value?: PartialMessage<SendStatsRequest>): SendStatsRequest;
|
|
317
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendStatsRequest): SendStatsRequest;
|
|
318
|
-
internalBinaryWrite(message: SendStatsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
319
303
|
}
|
|
320
304
|
/**
|
|
321
305
|
* @generated MessageType for protobuf message stream.video.sfu.signal.SendStatsRequest
|
|
@@ -323,9 +307,6 @@ declare class SendStatsRequest$Type extends MessageType<SendStatsRequest> {
|
|
|
323
307
|
export declare const SendStatsRequest: SendStatsRequest$Type;
|
|
324
308
|
declare class SendStatsResponse$Type extends MessageType<SendStatsResponse> {
|
|
325
309
|
constructor();
|
|
326
|
-
create(value?: PartialMessage<SendStatsResponse>): SendStatsResponse;
|
|
327
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendStatsResponse): SendStatsResponse;
|
|
328
|
-
internalBinaryWrite(message: SendStatsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
329
310
|
}
|
|
330
311
|
/**
|
|
331
312
|
* @generated MessageType for protobuf message stream.video.sfu.signal.SendStatsResponse
|
|
@@ -333,9 +314,6 @@ declare class SendStatsResponse$Type extends MessageType<SendStatsResponse> {
|
|
|
333
314
|
export declare const SendStatsResponse: SendStatsResponse$Type;
|
|
334
315
|
declare class ICERestartRequest$Type extends MessageType<ICERestartRequest> {
|
|
335
316
|
constructor();
|
|
336
|
-
create(value?: PartialMessage<ICERestartRequest>): ICERestartRequest;
|
|
337
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ICERestartRequest): ICERestartRequest;
|
|
338
|
-
internalBinaryWrite(message: ICERestartRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
339
317
|
}
|
|
340
318
|
/**
|
|
341
319
|
* @generated MessageType for protobuf message stream.video.sfu.signal.ICERestartRequest
|
|
@@ -343,9 +321,6 @@ declare class ICERestartRequest$Type extends MessageType<ICERestartRequest> {
|
|
|
343
321
|
export declare const ICERestartRequest: ICERestartRequest$Type;
|
|
344
322
|
declare class ICERestartResponse$Type extends MessageType<ICERestartResponse> {
|
|
345
323
|
constructor();
|
|
346
|
-
create(value?: PartialMessage<ICERestartResponse>): ICERestartResponse;
|
|
347
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ICERestartResponse): ICERestartResponse;
|
|
348
|
-
internalBinaryWrite(message: ICERestartResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
349
324
|
}
|
|
350
325
|
/**
|
|
351
326
|
* @generated MessageType for protobuf message stream.video.sfu.signal.ICERestartResponse
|
|
@@ -353,9 +328,6 @@ declare class ICERestartResponse$Type extends MessageType<ICERestartResponse> {
|
|
|
353
328
|
export declare const ICERestartResponse: ICERestartResponse$Type;
|
|
354
329
|
declare class UpdateMuteStatesRequest$Type extends MessageType<UpdateMuteStatesRequest> {
|
|
355
330
|
constructor();
|
|
356
|
-
create(value?: PartialMessage<UpdateMuteStatesRequest>): UpdateMuteStatesRequest;
|
|
357
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateMuteStatesRequest): UpdateMuteStatesRequest;
|
|
358
|
-
internalBinaryWrite(message: UpdateMuteStatesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
359
331
|
}
|
|
360
332
|
/**
|
|
361
333
|
* @generated MessageType for protobuf message stream.video.sfu.signal.UpdateMuteStatesRequest
|
|
@@ -363,9 +335,6 @@ declare class UpdateMuteStatesRequest$Type extends MessageType<UpdateMuteStatesR
|
|
|
363
335
|
export declare const UpdateMuteStatesRequest: UpdateMuteStatesRequest$Type;
|
|
364
336
|
declare class UpdateMuteStatesResponse$Type extends MessageType<UpdateMuteStatesResponse> {
|
|
365
337
|
constructor();
|
|
366
|
-
create(value?: PartialMessage<UpdateMuteStatesResponse>): UpdateMuteStatesResponse;
|
|
367
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateMuteStatesResponse): UpdateMuteStatesResponse;
|
|
368
|
-
internalBinaryWrite(message: UpdateMuteStatesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
369
338
|
}
|
|
370
339
|
/**
|
|
371
340
|
* @generated MessageType for protobuf message stream.video.sfu.signal.UpdateMuteStatesResponse
|
|
@@ -373,9 +342,6 @@ declare class UpdateMuteStatesResponse$Type extends MessageType<UpdateMuteStates
|
|
|
373
342
|
export declare const UpdateMuteStatesResponse: UpdateMuteStatesResponse$Type;
|
|
374
343
|
declare class TrackMuteState$Type extends MessageType<TrackMuteState> {
|
|
375
344
|
constructor();
|
|
376
|
-
create(value?: PartialMessage<TrackMuteState>): TrackMuteState;
|
|
377
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackMuteState): TrackMuteState;
|
|
378
|
-
internalBinaryWrite(message: TrackMuteState, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
379
345
|
}
|
|
380
346
|
/**
|
|
381
347
|
* @generated MessageType for protobuf message stream.video.sfu.signal.TrackMuteState
|
|
@@ -383,9 +349,6 @@ declare class TrackMuteState$Type extends MessageType<TrackMuteState> {
|
|
|
383
349
|
export declare const TrackMuteState: TrackMuteState$Type;
|
|
384
350
|
declare class AudioMuteChanged$Type extends MessageType<AudioMuteChanged> {
|
|
385
351
|
constructor();
|
|
386
|
-
create(value?: PartialMessage<AudioMuteChanged>): AudioMuteChanged;
|
|
387
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AudioMuteChanged): AudioMuteChanged;
|
|
388
|
-
internalBinaryWrite(message: AudioMuteChanged, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
389
352
|
}
|
|
390
353
|
/**
|
|
391
354
|
* @generated MessageType for protobuf message stream.video.sfu.signal.AudioMuteChanged
|
|
@@ -393,9 +356,6 @@ declare class AudioMuteChanged$Type extends MessageType<AudioMuteChanged> {
|
|
|
393
356
|
export declare const AudioMuteChanged: AudioMuteChanged$Type;
|
|
394
357
|
declare class VideoMuteChanged$Type extends MessageType<VideoMuteChanged> {
|
|
395
358
|
constructor();
|
|
396
|
-
create(value?: PartialMessage<VideoMuteChanged>): VideoMuteChanged;
|
|
397
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: VideoMuteChanged): VideoMuteChanged;
|
|
398
|
-
internalBinaryWrite(message: VideoMuteChanged, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
399
359
|
}
|
|
400
360
|
/**
|
|
401
361
|
* @generated MessageType for protobuf message stream.video.sfu.signal.VideoMuteChanged
|
|
@@ -403,9 +363,6 @@ declare class VideoMuteChanged$Type extends MessageType<VideoMuteChanged> {
|
|
|
403
363
|
export declare const VideoMuteChanged: VideoMuteChanged$Type;
|
|
404
364
|
declare class UpdateSubscriptionsRequest$Type extends MessageType<UpdateSubscriptionsRequest> {
|
|
405
365
|
constructor();
|
|
406
|
-
create(value?: PartialMessage<UpdateSubscriptionsRequest>): UpdateSubscriptionsRequest;
|
|
407
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateSubscriptionsRequest): UpdateSubscriptionsRequest;
|
|
408
|
-
internalBinaryWrite(message: UpdateSubscriptionsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
409
366
|
}
|
|
410
367
|
/**
|
|
411
368
|
* @generated MessageType for protobuf message stream.video.sfu.signal.UpdateSubscriptionsRequest
|
|
@@ -413,9 +370,6 @@ declare class UpdateSubscriptionsRequest$Type extends MessageType<UpdateSubscrip
|
|
|
413
370
|
export declare const UpdateSubscriptionsRequest: UpdateSubscriptionsRequest$Type;
|
|
414
371
|
declare class UpdateSubscriptionsResponse$Type extends MessageType<UpdateSubscriptionsResponse> {
|
|
415
372
|
constructor();
|
|
416
|
-
create(value?: PartialMessage<UpdateSubscriptionsResponse>): UpdateSubscriptionsResponse;
|
|
417
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateSubscriptionsResponse): UpdateSubscriptionsResponse;
|
|
418
|
-
internalBinaryWrite(message: UpdateSubscriptionsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
419
373
|
}
|
|
420
374
|
/**
|
|
421
375
|
* @generated MessageType for protobuf message stream.video.sfu.signal.UpdateSubscriptionsResponse
|
|
@@ -423,9 +377,6 @@ declare class UpdateSubscriptionsResponse$Type extends MessageType<UpdateSubscri
|
|
|
423
377
|
export declare const UpdateSubscriptionsResponse: UpdateSubscriptionsResponse$Type;
|
|
424
378
|
declare class TrackSubscriptionDetails$Type extends MessageType<TrackSubscriptionDetails> {
|
|
425
379
|
constructor();
|
|
426
|
-
create(value?: PartialMessage<TrackSubscriptionDetails>): TrackSubscriptionDetails;
|
|
427
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackSubscriptionDetails): TrackSubscriptionDetails;
|
|
428
|
-
internalBinaryWrite(message: TrackSubscriptionDetails, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
429
380
|
}
|
|
430
381
|
/**
|
|
431
382
|
* @generated MessageType for protobuf message stream.video.sfu.signal.TrackSubscriptionDetails
|
|
@@ -433,9 +384,6 @@ declare class TrackSubscriptionDetails$Type extends MessageType<TrackSubscriptio
|
|
|
433
384
|
export declare const TrackSubscriptionDetails: TrackSubscriptionDetails$Type;
|
|
434
385
|
declare class SendAnswerRequest$Type extends MessageType<SendAnswerRequest> {
|
|
435
386
|
constructor();
|
|
436
|
-
create(value?: PartialMessage<SendAnswerRequest>): SendAnswerRequest;
|
|
437
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendAnswerRequest): SendAnswerRequest;
|
|
438
|
-
internalBinaryWrite(message: SendAnswerRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
439
387
|
}
|
|
440
388
|
/**
|
|
441
389
|
* @generated MessageType for protobuf message stream.video.sfu.signal.SendAnswerRequest
|
|
@@ -443,9 +391,6 @@ declare class SendAnswerRequest$Type extends MessageType<SendAnswerRequest> {
|
|
|
443
391
|
export declare const SendAnswerRequest: SendAnswerRequest$Type;
|
|
444
392
|
declare class SendAnswerResponse$Type extends MessageType<SendAnswerResponse> {
|
|
445
393
|
constructor();
|
|
446
|
-
create(value?: PartialMessage<SendAnswerResponse>): SendAnswerResponse;
|
|
447
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendAnswerResponse): SendAnswerResponse;
|
|
448
|
-
internalBinaryWrite(message: SendAnswerResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
449
394
|
}
|
|
450
395
|
/**
|
|
451
396
|
* @generated MessageType for protobuf message stream.video.sfu.signal.SendAnswerResponse
|
|
@@ -453,9 +398,6 @@ declare class SendAnswerResponse$Type extends MessageType<SendAnswerResponse> {
|
|
|
453
398
|
export declare const SendAnswerResponse: SendAnswerResponse$Type;
|
|
454
399
|
declare class ICETrickleResponse$Type extends MessageType<ICETrickleResponse> {
|
|
455
400
|
constructor();
|
|
456
|
-
create(value?: PartialMessage<ICETrickleResponse>): ICETrickleResponse;
|
|
457
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ICETrickleResponse): ICETrickleResponse;
|
|
458
|
-
internalBinaryWrite(message: ICETrickleResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
459
401
|
}
|
|
460
402
|
/**
|
|
461
403
|
* @generated MessageType for protobuf message stream.video.sfu.signal.ICETrickleResponse
|
|
@@ -463,9 +405,6 @@ declare class ICETrickleResponse$Type extends MessageType<ICETrickleResponse> {
|
|
|
463
405
|
export declare const ICETrickleResponse: ICETrickleResponse$Type;
|
|
464
406
|
declare class SetPublisherRequest$Type extends MessageType<SetPublisherRequest> {
|
|
465
407
|
constructor();
|
|
466
|
-
create(value?: PartialMessage<SetPublisherRequest>): SetPublisherRequest;
|
|
467
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetPublisherRequest): SetPublisherRequest;
|
|
468
|
-
internalBinaryWrite(message: SetPublisherRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
469
408
|
}
|
|
470
409
|
/**
|
|
471
410
|
* @generated MessageType for protobuf message stream.video.sfu.signal.SetPublisherRequest
|
|
@@ -473,9 +412,6 @@ declare class SetPublisherRequest$Type extends MessageType<SetPublisherRequest>
|
|
|
473
412
|
export declare const SetPublisherRequest: SetPublisherRequest$Type;
|
|
474
413
|
declare class SetPublisherResponse$Type extends MessageType<SetPublisherResponse> {
|
|
475
414
|
constructor();
|
|
476
|
-
create(value?: PartialMessage<SetPublisherResponse>): SetPublisherResponse;
|
|
477
|
-
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetPublisherResponse): SetPublisherResponse;
|
|
478
|
-
internalBinaryWrite(message: SetPublisherResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
479
415
|
}
|
|
480
416
|
/**
|
|
481
417
|
* @generated MessageType for protobuf message stream.video.sfu.signal.SetPublisherResponse
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stream-io/video-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"packageManager": "yarn@3.2.4",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.es.js",
|
|
@@ -43,10 +43,10 @@
|
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@openapitools/openapi-generator-cli": "^2.13.4",
|
|
46
|
-
"@rollup/plugin-replace": "^5.0.
|
|
46
|
+
"@rollup/plugin-replace": "^5.0.7",
|
|
47
47
|
"@rollup/plugin-typescript": "^11.1.6",
|
|
48
|
-
"@stream-io/audio-filters-web": "^0.2.
|
|
49
|
-
"@stream-io/node-sdk": "^0.4.
|
|
48
|
+
"@stream-io/audio-filters-web": "^0.2.2",
|
|
49
|
+
"@stream-io/node-sdk": "^0.4.3",
|
|
50
50
|
"@types/sdp-transform": "^2.4.7",
|
|
51
51
|
"@types/ua-parser-js": "^0.7.37",
|
|
52
52
|
"@vitest/coverage-v8": "^0.34.4",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"happy-dom": "^11.0.2",
|
|
55
55
|
"prettier": "^3.3.2",
|
|
56
56
|
"rimraf": "^5.0.7",
|
|
57
|
-
"rollup": "^
|
|
57
|
+
"rollup": "^4.22.0",
|
|
58
58
|
"typescript": "^5.5.2",
|
|
59
|
-
"vite": "^
|
|
59
|
+
"vite": "^5.4.6",
|
|
60
60
|
"vitest": "^1.0.0",
|
|
61
61
|
"vitest-mock-extended": "^1.2.1"
|
|
62
62
|
}
|
|
@@ -47,7 +47,6 @@ export class StreamClient {
|
|
|
47
47
|
axiosInstance: AxiosInstance;
|
|
48
48
|
baseURL?: string;
|
|
49
49
|
browser: boolean;
|
|
50
|
-
cleaningIntervalRef?: NodeJS.Timeout;
|
|
51
50
|
clientID?: string;
|
|
52
51
|
key: string;
|
|
53
52
|
listeners: Partial<
|
|
@@ -323,11 +322,6 @@ export class StreamClient {
|
|
|
323
322
|
* https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent
|
|
324
323
|
*/
|
|
325
324
|
closeConnection = async (timeout?: number) => {
|
|
326
|
-
if (this.cleaningIntervalRef != null) {
|
|
327
|
-
clearInterval(this.cleaningIntervalRef);
|
|
328
|
-
this.cleaningIntervalRef = undefined;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
325
|
await Promise.all([
|
|
332
326
|
this.wsConnection?.disconnect(timeout),
|
|
333
327
|
this.wsFallback?.disconnect(timeout),
|
|
@@ -223,10 +223,12 @@ export abstract class InputMediaDeviceManager<
|
|
|
223
223
|
};
|
|
224
224
|
|
|
225
225
|
protected async applySettingsToStream() {
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
226
|
+
await withCancellation(this.statusChangeConcurrencyTag, async () => {
|
|
227
|
+
if (this.enabled) {
|
|
228
|
+
await this.muteStream();
|
|
229
|
+
await this.unmuteStream();
|
|
230
|
+
}
|
|
231
|
+
});
|
|
230
232
|
}
|
|
231
233
|
|
|
232
234
|
protected abstract getDevices(): Observable<MediaDeviceInfo[]>;
|
|
@@ -394,17 +396,21 @@ export abstract class InputMediaDeviceManager<
|
|
|
394
396
|
}
|
|
395
397
|
if (this.state.mediaStream !== stream) {
|
|
396
398
|
this.state.setMediaStream(stream, await rootStream);
|
|
399
|
+
const handleTrackEnded = async () => {
|
|
400
|
+
await this.statusChangeSettled();
|
|
401
|
+
if (this.enabled) {
|
|
402
|
+
this.isTrackStoppedDueToTrackEnd = true;
|
|
403
|
+
setTimeout(() => {
|
|
404
|
+
this.isTrackStoppedDueToTrackEnd = false;
|
|
405
|
+
}, 2000);
|
|
406
|
+
await this.disable();
|
|
407
|
+
}
|
|
408
|
+
};
|
|
397
409
|
this.getTracks().forEach((track) => {
|
|
398
|
-
track.addEventListener('ended',
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
setTimeout(() => {
|
|
403
|
-
this.isTrackStoppedDueToTrackEnd = false;
|
|
404
|
-
}, 2000);
|
|
405
|
-
await this.disable();
|
|
406
|
-
}
|
|
407
|
-
});
|
|
410
|
+
track.addEventListener('ended', handleTrackEnded);
|
|
411
|
+
this.subscriptions.push(() =>
|
|
412
|
+
track.removeEventListener('ended', handleTrackEnded),
|
|
413
|
+
);
|
|
408
414
|
});
|
|
409
415
|
}
|
|
410
416
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
// @generated by protobuf-ts 2.9.4 with parameter long_type_string,client_generic,server_none,eslint_disable
|
|
2
|
+
// @generated by protobuf-ts 2.9.4 with parameter long_type_string,client_generic,server_none,eslint_disable,optimize_code_size
|
|
3
3
|
// @generated from protobuf file "google/protobuf/struct.proto" (package "google.protobuf", syntax proto3)
|
|
4
4
|
// tslint:disable
|
|
5
5
|
//
|
|
@@ -34,23 +34,15 @@
|
|
|
34
34
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
35
35
|
//
|
|
36
36
|
import type {
|
|
37
|
-
BinaryReadOptions,
|
|
38
|
-
BinaryWriteOptions,
|
|
39
|
-
IBinaryReader,
|
|
40
|
-
IBinaryWriter,
|
|
41
37
|
JsonObject,
|
|
42
38
|
JsonReadOptions,
|
|
43
39
|
JsonValue,
|
|
44
40
|
JsonWriteOptions,
|
|
45
|
-
PartialMessage,
|
|
46
41
|
} from '@protobuf-ts/runtime';
|
|
47
42
|
import {
|
|
48
43
|
isJsonObject,
|
|
49
44
|
MessageType,
|
|
50
|
-
reflectionMergePartial,
|
|
51
45
|
typeofJsonValue,
|
|
52
|
-
UnknownFieldHandler,
|
|
53
|
-
WireType,
|
|
54
46
|
} from '@protobuf-ts/runtime';
|
|
55
47
|
|
|
56
48
|
/**
|
|
@@ -224,97 +216,6 @@ class Struct$Type extends MessageType<Struct> {
|
|
|
224
216
|
}
|
|
225
217
|
return target;
|
|
226
218
|
}
|
|
227
|
-
create(value?: PartialMessage<Struct>): Struct {
|
|
228
|
-
const message = globalThis.Object.create(this.messagePrototype!);
|
|
229
|
-
message.fields = {};
|
|
230
|
-
if (value !== undefined)
|
|
231
|
-
reflectionMergePartial<Struct>(this, message, value);
|
|
232
|
-
return message;
|
|
233
|
-
}
|
|
234
|
-
internalBinaryRead(
|
|
235
|
-
reader: IBinaryReader,
|
|
236
|
-
length: number,
|
|
237
|
-
options: BinaryReadOptions,
|
|
238
|
-
target?: Struct,
|
|
239
|
-
): Struct {
|
|
240
|
-
let message = target ?? this.create(),
|
|
241
|
-
end = reader.pos + length;
|
|
242
|
-
while (reader.pos < end) {
|
|
243
|
-
let [fieldNo, wireType] = reader.tag();
|
|
244
|
-
switch (fieldNo) {
|
|
245
|
-
case /* map<string, google.protobuf.Value> fields */ 1:
|
|
246
|
-
this.binaryReadMap1(message.fields, reader, options);
|
|
247
|
-
break;
|
|
248
|
-
default:
|
|
249
|
-
let u = options.readUnknownField;
|
|
250
|
-
if (u === 'throw')
|
|
251
|
-
throw new globalThis.Error(
|
|
252
|
-
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
|
|
253
|
-
);
|
|
254
|
-
let d = reader.skip(wireType);
|
|
255
|
-
if (u !== false)
|
|
256
|
-
(u === true ? UnknownFieldHandler.onRead : u)(
|
|
257
|
-
this.typeName,
|
|
258
|
-
message,
|
|
259
|
-
fieldNo,
|
|
260
|
-
wireType,
|
|
261
|
-
d,
|
|
262
|
-
);
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
return message;
|
|
266
|
-
}
|
|
267
|
-
private binaryReadMap1(
|
|
268
|
-
map: Struct['fields'],
|
|
269
|
-
reader: IBinaryReader,
|
|
270
|
-
options: BinaryReadOptions,
|
|
271
|
-
): void {
|
|
272
|
-
let len = reader.uint32(),
|
|
273
|
-
end = reader.pos + len,
|
|
274
|
-
key: keyof Struct['fields'] | undefined,
|
|
275
|
-
val: Struct['fields'][any] | undefined;
|
|
276
|
-
while (reader.pos < end) {
|
|
277
|
-
let [fieldNo, wireType] = reader.tag();
|
|
278
|
-
switch (fieldNo) {
|
|
279
|
-
case 1:
|
|
280
|
-
key = reader.string();
|
|
281
|
-
break;
|
|
282
|
-
case 2:
|
|
283
|
-
val = Value.internalBinaryRead(reader, reader.uint32(), options);
|
|
284
|
-
break;
|
|
285
|
-
default:
|
|
286
|
-
throw new globalThis.Error(
|
|
287
|
-
'unknown map entry field for field google.protobuf.Struct.fields',
|
|
288
|
-
);
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
map[key ?? ''] = val ?? Value.create();
|
|
292
|
-
}
|
|
293
|
-
internalBinaryWrite(
|
|
294
|
-
message: Struct,
|
|
295
|
-
writer: IBinaryWriter,
|
|
296
|
-
options: BinaryWriteOptions,
|
|
297
|
-
): IBinaryWriter {
|
|
298
|
-
/* map<string, google.protobuf.Value> fields = 1; */
|
|
299
|
-
for (let k of globalThis.Object.keys(message.fields)) {
|
|
300
|
-
writer
|
|
301
|
-
.tag(1, WireType.LengthDelimited)
|
|
302
|
-
.fork()
|
|
303
|
-
.tag(1, WireType.LengthDelimited)
|
|
304
|
-
.string(k);
|
|
305
|
-
writer.tag(2, WireType.LengthDelimited).fork();
|
|
306
|
-
Value.internalBinaryWrite(message.fields[k], writer, options);
|
|
307
|
-
writer.join().join();
|
|
308
|
-
}
|
|
309
|
-
let u = options.writeUnknownFields;
|
|
310
|
-
if (u !== false)
|
|
311
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(
|
|
312
|
-
this.typeName,
|
|
313
|
-
message,
|
|
314
|
-
writer,
|
|
315
|
-
);
|
|
316
|
-
return writer;
|
|
317
|
-
}
|
|
318
219
|
}
|
|
319
220
|
/**
|
|
320
221
|
* @generated MessageType for protobuf message google.protobuf.Struct
|
|
@@ -444,129 +345,6 @@ class Value$Type extends MessageType<Value> {
|
|
|
444
345
|
}
|
|
445
346
|
return target;
|
|
446
347
|
}
|
|
447
|
-
create(value?: PartialMessage<Value>): Value {
|
|
448
|
-
const message = globalThis.Object.create(this.messagePrototype!);
|
|
449
|
-
message.kind = { oneofKind: undefined };
|
|
450
|
-
if (value !== undefined)
|
|
451
|
-
reflectionMergePartial<Value>(this, message, value);
|
|
452
|
-
return message;
|
|
453
|
-
}
|
|
454
|
-
internalBinaryRead(
|
|
455
|
-
reader: IBinaryReader,
|
|
456
|
-
length: number,
|
|
457
|
-
options: BinaryReadOptions,
|
|
458
|
-
target?: Value,
|
|
459
|
-
): Value {
|
|
460
|
-
let message = target ?? this.create(),
|
|
461
|
-
end = reader.pos + length;
|
|
462
|
-
while (reader.pos < end) {
|
|
463
|
-
let [fieldNo, wireType] = reader.tag();
|
|
464
|
-
switch (fieldNo) {
|
|
465
|
-
case /* google.protobuf.NullValue null_value */ 1:
|
|
466
|
-
message.kind = {
|
|
467
|
-
oneofKind: 'nullValue',
|
|
468
|
-
nullValue: reader.int32(),
|
|
469
|
-
};
|
|
470
|
-
break;
|
|
471
|
-
case /* double number_value */ 2:
|
|
472
|
-
message.kind = {
|
|
473
|
-
oneofKind: 'numberValue',
|
|
474
|
-
numberValue: reader.double(),
|
|
475
|
-
};
|
|
476
|
-
break;
|
|
477
|
-
case /* string string_value */ 3:
|
|
478
|
-
message.kind = {
|
|
479
|
-
oneofKind: 'stringValue',
|
|
480
|
-
stringValue: reader.string(),
|
|
481
|
-
};
|
|
482
|
-
break;
|
|
483
|
-
case /* bool bool_value */ 4:
|
|
484
|
-
message.kind = {
|
|
485
|
-
oneofKind: 'boolValue',
|
|
486
|
-
boolValue: reader.bool(),
|
|
487
|
-
};
|
|
488
|
-
break;
|
|
489
|
-
case /* google.protobuf.Struct struct_value */ 5:
|
|
490
|
-
message.kind = {
|
|
491
|
-
oneofKind: 'structValue',
|
|
492
|
-
structValue: Struct.internalBinaryRead(
|
|
493
|
-
reader,
|
|
494
|
-
reader.uint32(),
|
|
495
|
-
options,
|
|
496
|
-
(message.kind as any).structValue,
|
|
497
|
-
),
|
|
498
|
-
};
|
|
499
|
-
break;
|
|
500
|
-
case /* google.protobuf.ListValue list_value */ 6:
|
|
501
|
-
message.kind = {
|
|
502
|
-
oneofKind: 'listValue',
|
|
503
|
-
listValue: ListValue.internalBinaryRead(
|
|
504
|
-
reader,
|
|
505
|
-
reader.uint32(),
|
|
506
|
-
options,
|
|
507
|
-
(message.kind as any).listValue,
|
|
508
|
-
),
|
|
509
|
-
};
|
|
510
|
-
break;
|
|
511
|
-
default:
|
|
512
|
-
let u = options.readUnknownField;
|
|
513
|
-
if (u === 'throw')
|
|
514
|
-
throw new globalThis.Error(
|
|
515
|
-
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
|
|
516
|
-
);
|
|
517
|
-
let d = reader.skip(wireType);
|
|
518
|
-
if (u !== false)
|
|
519
|
-
(u === true ? UnknownFieldHandler.onRead : u)(
|
|
520
|
-
this.typeName,
|
|
521
|
-
message,
|
|
522
|
-
fieldNo,
|
|
523
|
-
wireType,
|
|
524
|
-
d,
|
|
525
|
-
);
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
return message;
|
|
529
|
-
}
|
|
530
|
-
internalBinaryWrite(
|
|
531
|
-
message: Value,
|
|
532
|
-
writer: IBinaryWriter,
|
|
533
|
-
options: BinaryWriteOptions,
|
|
534
|
-
): IBinaryWriter {
|
|
535
|
-
/* google.protobuf.NullValue null_value = 1; */
|
|
536
|
-
if (message.kind.oneofKind === 'nullValue')
|
|
537
|
-
writer.tag(1, WireType.Varint).int32(message.kind.nullValue);
|
|
538
|
-
/* double number_value = 2; */
|
|
539
|
-
if (message.kind.oneofKind === 'numberValue')
|
|
540
|
-
writer.tag(2, WireType.Bit64).double(message.kind.numberValue);
|
|
541
|
-
/* string string_value = 3; */
|
|
542
|
-
if (message.kind.oneofKind === 'stringValue')
|
|
543
|
-
writer.tag(3, WireType.LengthDelimited).string(message.kind.stringValue);
|
|
544
|
-
/* bool bool_value = 4; */
|
|
545
|
-
if (message.kind.oneofKind === 'boolValue')
|
|
546
|
-
writer.tag(4, WireType.Varint).bool(message.kind.boolValue);
|
|
547
|
-
/* google.protobuf.Struct struct_value = 5; */
|
|
548
|
-
if (message.kind.oneofKind === 'structValue')
|
|
549
|
-
Struct.internalBinaryWrite(
|
|
550
|
-
message.kind.structValue,
|
|
551
|
-
writer.tag(5, WireType.LengthDelimited).fork(),
|
|
552
|
-
options,
|
|
553
|
-
).join();
|
|
554
|
-
/* google.protobuf.ListValue list_value = 6; */
|
|
555
|
-
if (message.kind.oneofKind === 'listValue')
|
|
556
|
-
ListValue.internalBinaryWrite(
|
|
557
|
-
message.kind.listValue,
|
|
558
|
-
writer.tag(6, WireType.LengthDelimited).fork(),
|
|
559
|
-
options,
|
|
560
|
-
).join();
|
|
561
|
-
let u = options.writeUnknownFields;
|
|
562
|
-
if (u !== false)
|
|
563
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(
|
|
564
|
-
this.typeName,
|
|
565
|
-
message,
|
|
566
|
-
writer,
|
|
567
|
-
);
|
|
568
|
-
return writer;
|
|
569
|
-
}
|
|
570
348
|
}
|
|
571
349
|
/**
|
|
572
350
|
* @generated MessageType for protobuf message google.protobuf.Value
|
|
@@ -611,69 +389,6 @@ class ListValue$Type extends MessageType<ListValue> {
|
|
|
611
389
|
target.values.push(...values);
|
|
612
390
|
return target;
|
|
613
391
|
}
|
|
614
|
-
create(value?: PartialMessage<ListValue>): ListValue {
|
|
615
|
-
const message = globalThis.Object.create(this.messagePrototype!);
|
|
616
|
-
message.values = [];
|
|
617
|
-
if (value !== undefined)
|
|
618
|
-
reflectionMergePartial<ListValue>(this, message, value);
|
|
619
|
-
return message;
|
|
620
|
-
}
|
|
621
|
-
internalBinaryRead(
|
|
622
|
-
reader: IBinaryReader,
|
|
623
|
-
length: number,
|
|
624
|
-
options: BinaryReadOptions,
|
|
625
|
-
target?: ListValue,
|
|
626
|
-
): ListValue {
|
|
627
|
-
let message = target ?? this.create(),
|
|
628
|
-
end = reader.pos + length;
|
|
629
|
-
while (reader.pos < end) {
|
|
630
|
-
let [fieldNo, wireType] = reader.tag();
|
|
631
|
-
switch (fieldNo) {
|
|
632
|
-
case /* repeated google.protobuf.Value values */ 1:
|
|
633
|
-
message.values.push(
|
|
634
|
-
Value.internalBinaryRead(reader, reader.uint32(), options),
|
|
635
|
-
);
|
|
636
|
-
break;
|
|
637
|
-
default:
|
|
638
|
-
let u = options.readUnknownField;
|
|
639
|
-
if (u === 'throw')
|
|
640
|
-
throw new globalThis.Error(
|
|
641
|
-
`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`,
|
|
642
|
-
);
|
|
643
|
-
let d = reader.skip(wireType);
|
|
644
|
-
if (u !== false)
|
|
645
|
-
(u === true ? UnknownFieldHandler.onRead : u)(
|
|
646
|
-
this.typeName,
|
|
647
|
-
message,
|
|
648
|
-
fieldNo,
|
|
649
|
-
wireType,
|
|
650
|
-
d,
|
|
651
|
-
);
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
return message;
|
|
655
|
-
}
|
|
656
|
-
internalBinaryWrite(
|
|
657
|
-
message: ListValue,
|
|
658
|
-
writer: IBinaryWriter,
|
|
659
|
-
options: BinaryWriteOptions,
|
|
660
|
-
): IBinaryWriter {
|
|
661
|
-
/* repeated google.protobuf.Value values = 1; */
|
|
662
|
-
for (let i = 0; i < message.values.length; i++)
|
|
663
|
-
Value.internalBinaryWrite(
|
|
664
|
-
message.values[i],
|
|
665
|
-
writer.tag(1, WireType.LengthDelimited).fork(),
|
|
666
|
-
options,
|
|
667
|
-
).join();
|
|
668
|
-
let u = options.writeUnknownFields;
|
|
669
|
-
if (u !== false)
|
|
670
|
-
(u == true ? UnknownFieldHandler.onWrite : u)(
|
|
671
|
-
this.typeName,
|
|
672
|
-
message,
|
|
673
|
-
writer,
|
|
674
|
-
);
|
|
675
|
-
return writer;
|
|
676
|
-
}
|
|
677
392
|
}
|
|
678
393
|
/**
|
|
679
394
|
* @generated MessageType for protobuf message google.protobuf.ListValue
|