livekit-client 0.17.2 → 0.17.5
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/dist/api/SignalClient.d.ts +2 -1
- package/dist/api/SignalClient.js +6 -1
- package/dist/api/SignalClient.js.map +1 -1
- package/dist/proto/google/protobuf/timestamp.d.ts +132 -0
- package/dist/proto/google/protobuf/timestamp.js +108 -0
- package/dist/proto/google/protobuf/timestamp.js.map +1 -0
- package/dist/proto/livekit_models.d.ts +596 -16
- package/dist/proto/livekit_models.js +1012 -642
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_rtc.d.ts +3416 -29
- package/dist/proto/livekit_rtc.js +830 -1210
- package/dist/proto/livekit_rtc.js.map +1 -1
- package/dist/room/Room.d.ts +2 -1
- package/dist/room/Room.js +16 -1
- package/dist/room/Room.js.map +1 -1
- package/dist/room/events.d.ts +12 -2
- package/dist/room/events.js +10 -0
- package/dist/room/events.js.map +1 -1
- package/dist/room/participant/LocalParticipant.d.ts +4 -1
- package/dist/room/participant/LocalParticipant.js +18 -0
- package/dist/room/participant/LocalParticipant.js.map +1 -1
- package/dist/room/participant/Participant.d.ts +5 -1
- package/dist/room/participant/Participant.js +15 -1
- package/dist/room/participant/Participant.js.map +1 -1
- package/dist/room/track/Track.js +10 -3
- package/dist/room/track/Track.js.map +1 -1
- package/dist/room/track/options.d.ts +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/package.json +2 -2
- package/src/api/SignalClient.ts +8 -1
- package/src/proto/google/protobuf/timestamp.ts +232 -0
- package/src/proto/livekit_models.ts +1134 -570
- package/src/proto/livekit_rtc.ts +834 -1135
- package/src/room/Room.ts +30 -9
- package/src/room/events.ts +12 -0
- package/src/room/participant/LocalParticipant.ts +25 -2
- package/src/room/participant/Participant.ts +22 -2
- package/src/room/track/Track.ts +10 -4
- package/src/room/track/options.ts +1 -1
- package/src/version.ts +2 -2
package/src/proto/livekit_rtc.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
/* eslint-disable */
|
2
2
|
import Long from "long";
|
3
|
-
import _m0 from "protobufjs/minimal";
|
3
|
+
import * as _m0 from "protobufjs/minimal";
|
4
4
|
import {
|
5
5
|
TrackType,
|
6
6
|
TrackSource,
|
@@ -152,6 +152,8 @@ export interface SignalResponse {
|
|
152
152
|
subscriptionPermissionUpdate?: SubscriptionPermissionUpdate | undefined;
|
153
153
|
/** update the token the client was using, to prevent an active client from using an expired token */
|
154
154
|
refreshToken: string | undefined;
|
155
|
+
/** server initiated track unpublish */
|
156
|
+
trackUnpublished?: TrackUnpublishedResponse | undefined;
|
155
157
|
}
|
156
158
|
|
157
159
|
export interface AddTrackRequest {
|
@@ -202,6 +204,10 @@ export interface TrackPublishedResponse {
|
|
202
204
|
track?: TrackInfo;
|
203
205
|
}
|
204
206
|
|
207
|
+
export interface TrackUnpublishedResponse {
|
208
|
+
trackSid: string;
|
209
|
+
}
|
210
|
+
|
205
211
|
export interface SessionDescription {
|
206
212
|
/** "answer" | "offer" | "pranswer" | "rollback" */
|
207
213
|
type: string;
|
@@ -328,7 +334,22 @@ export interface SimulateScenario {
|
|
328
334
|
serverLeave: boolean | undefined;
|
329
335
|
}
|
330
336
|
|
331
|
-
|
337
|
+
function createBaseSignalRequest(): SignalRequest {
|
338
|
+
return {
|
339
|
+
offer: undefined,
|
340
|
+
answer: undefined,
|
341
|
+
trickle: undefined,
|
342
|
+
addTrack: undefined,
|
343
|
+
mute: undefined,
|
344
|
+
subscription: undefined,
|
345
|
+
trackSetting: undefined,
|
346
|
+
leave: undefined,
|
347
|
+
updateLayers: undefined,
|
348
|
+
subscriptionPermission: undefined,
|
349
|
+
syncState: undefined,
|
350
|
+
simulate: undefined,
|
351
|
+
};
|
352
|
+
}
|
332
353
|
|
333
354
|
export const SignalRequest = {
|
334
355
|
encode(
|
@@ -401,7 +422,7 @@ export const SignalRequest = {
|
|
401
422
|
decode(input: _m0.Reader | Uint8Array, length?: number): SignalRequest {
|
402
423
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
403
424
|
let end = length === undefined ? reader.len : reader.pos + length;
|
404
|
-
const message =
|
425
|
+
const message = createBaseSignalRequest();
|
405
426
|
while (reader.pos < end) {
|
406
427
|
const tag = reader.uint32();
|
407
428
|
switch (tag >>> 3) {
|
@@ -462,73 +483,44 @@ export const SignalRequest = {
|
|
462
483
|
},
|
463
484
|
|
464
485
|
fromJSON(object: any): SignalRequest {
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
} else {
|
504
|
-
message.leave = undefined;
|
505
|
-
}
|
506
|
-
if (object.updateLayers !== undefined && object.updateLayers !== null) {
|
507
|
-
message.updateLayers = UpdateVideoLayers.fromJSON(object.updateLayers);
|
508
|
-
} else {
|
509
|
-
message.updateLayers = undefined;
|
510
|
-
}
|
511
|
-
if (
|
512
|
-
object.subscriptionPermission !== undefined &&
|
513
|
-
object.subscriptionPermission !== null
|
514
|
-
) {
|
515
|
-
message.subscriptionPermission = SubscriptionPermission.fromJSON(
|
516
|
-
object.subscriptionPermission
|
517
|
-
);
|
518
|
-
} else {
|
519
|
-
message.subscriptionPermission = undefined;
|
520
|
-
}
|
521
|
-
if (object.syncState !== undefined && object.syncState !== null) {
|
522
|
-
message.syncState = SyncState.fromJSON(object.syncState);
|
523
|
-
} else {
|
524
|
-
message.syncState = undefined;
|
525
|
-
}
|
526
|
-
if (object.simulate !== undefined && object.simulate !== null) {
|
527
|
-
message.simulate = SimulateScenario.fromJSON(object.simulate);
|
528
|
-
} else {
|
529
|
-
message.simulate = undefined;
|
530
|
-
}
|
531
|
-
return message;
|
486
|
+
return {
|
487
|
+
offer: isSet(object.offer)
|
488
|
+
? SessionDescription.fromJSON(object.offer)
|
489
|
+
: undefined,
|
490
|
+
answer: isSet(object.answer)
|
491
|
+
? SessionDescription.fromJSON(object.answer)
|
492
|
+
: undefined,
|
493
|
+
trickle: isSet(object.trickle)
|
494
|
+
? TrickleRequest.fromJSON(object.trickle)
|
495
|
+
: undefined,
|
496
|
+
addTrack: isSet(object.addTrack)
|
497
|
+
? AddTrackRequest.fromJSON(object.addTrack)
|
498
|
+
: undefined,
|
499
|
+
mute: isSet(object.mute)
|
500
|
+
? MuteTrackRequest.fromJSON(object.mute)
|
501
|
+
: undefined,
|
502
|
+
subscription: isSet(object.subscription)
|
503
|
+
? UpdateSubscription.fromJSON(object.subscription)
|
504
|
+
: undefined,
|
505
|
+
trackSetting: isSet(object.trackSetting)
|
506
|
+
? UpdateTrackSettings.fromJSON(object.trackSetting)
|
507
|
+
: undefined,
|
508
|
+
leave: isSet(object.leave)
|
509
|
+
? LeaveRequest.fromJSON(object.leave)
|
510
|
+
: undefined,
|
511
|
+
updateLayers: isSet(object.updateLayers)
|
512
|
+
? UpdateVideoLayers.fromJSON(object.updateLayers)
|
513
|
+
: undefined,
|
514
|
+
subscriptionPermission: isSet(object.subscriptionPermission)
|
515
|
+
? SubscriptionPermission.fromJSON(object.subscriptionPermission)
|
516
|
+
: undefined,
|
517
|
+
syncState: isSet(object.syncState)
|
518
|
+
? SyncState.fromJSON(object.syncState)
|
519
|
+
: undefined,
|
520
|
+
simulate: isSet(object.simulate)
|
521
|
+
? SimulateScenario.fromJSON(object.simulate)
|
522
|
+
: undefined,
|
523
|
+
};
|
532
524
|
},
|
533
525
|
|
534
526
|
toJSON(message: SignalRequest): unknown {
|
@@ -584,82 +576,83 @@ export const SignalRequest = {
|
|
584
576
|
return obj;
|
585
577
|
},
|
586
578
|
|
587
|
-
fromPartial
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
if (object.leave !== undefined && object.leave !== null) {
|
629
|
-
message.leave = LeaveRequest.fromPartial(object.leave);
|
630
|
-
} else {
|
631
|
-
message.leave = undefined;
|
632
|
-
}
|
633
|
-
if (object.updateLayers !== undefined && object.updateLayers !== null) {
|
634
|
-
message.updateLayers = UpdateVideoLayers.fromPartial(object.updateLayers);
|
635
|
-
} else {
|
636
|
-
message.updateLayers = undefined;
|
637
|
-
}
|
638
|
-
if (
|
579
|
+
fromPartial<I extends Exact<DeepPartial<SignalRequest>, I>>(
|
580
|
+
object: I
|
581
|
+
): SignalRequest {
|
582
|
+
const message = createBaseSignalRequest();
|
583
|
+
message.offer =
|
584
|
+
object.offer !== undefined && object.offer !== null
|
585
|
+
? SessionDescription.fromPartial(object.offer)
|
586
|
+
: undefined;
|
587
|
+
message.answer =
|
588
|
+
object.answer !== undefined && object.answer !== null
|
589
|
+
? SessionDescription.fromPartial(object.answer)
|
590
|
+
: undefined;
|
591
|
+
message.trickle =
|
592
|
+
object.trickle !== undefined && object.trickle !== null
|
593
|
+
? TrickleRequest.fromPartial(object.trickle)
|
594
|
+
: undefined;
|
595
|
+
message.addTrack =
|
596
|
+
object.addTrack !== undefined && object.addTrack !== null
|
597
|
+
? AddTrackRequest.fromPartial(object.addTrack)
|
598
|
+
: undefined;
|
599
|
+
message.mute =
|
600
|
+
object.mute !== undefined && object.mute !== null
|
601
|
+
? MuteTrackRequest.fromPartial(object.mute)
|
602
|
+
: undefined;
|
603
|
+
message.subscription =
|
604
|
+
object.subscription !== undefined && object.subscription !== null
|
605
|
+
? UpdateSubscription.fromPartial(object.subscription)
|
606
|
+
: undefined;
|
607
|
+
message.trackSetting =
|
608
|
+
object.trackSetting !== undefined && object.trackSetting !== null
|
609
|
+
? UpdateTrackSettings.fromPartial(object.trackSetting)
|
610
|
+
: undefined;
|
611
|
+
message.leave =
|
612
|
+
object.leave !== undefined && object.leave !== null
|
613
|
+
? LeaveRequest.fromPartial(object.leave)
|
614
|
+
: undefined;
|
615
|
+
message.updateLayers =
|
616
|
+
object.updateLayers !== undefined && object.updateLayers !== null
|
617
|
+
? UpdateVideoLayers.fromPartial(object.updateLayers)
|
618
|
+
: undefined;
|
619
|
+
message.subscriptionPermission =
|
639
620
|
object.subscriptionPermission !== undefined &&
|
640
621
|
object.subscriptionPermission !== null
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
message.syncState = undefined;
|
652
|
-
}
|
653
|
-
if (object.simulate !== undefined && object.simulate !== null) {
|
654
|
-
message.simulate = SimulateScenario.fromPartial(object.simulate);
|
655
|
-
} else {
|
656
|
-
message.simulate = undefined;
|
657
|
-
}
|
622
|
+
? SubscriptionPermission.fromPartial(object.subscriptionPermission)
|
623
|
+
: undefined;
|
624
|
+
message.syncState =
|
625
|
+
object.syncState !== undefined && object.syncState !== null
|
626
|
+
? SyncState.fromPartial(object.syncState)
|
627
|
+
: undefined;
|
628
|
+
message.simulate =
|
629
|
+
object.simulate !== undefined && object.simulate !== null
|
630
|
+
? SimulateScenario.fromPartial(object.simulate)
|
631
|
+
: undefined;
|
658
632
|
return message;
|
659
633
|
},
|
660
634
|
};
|
661
635
|
|
662
|
-
|
636
|
+
function createBaseSignalResponse(): SignalResponse {
|
637
|
+
return {
|
638
|
+
join: undefined,
|
639
|
+
answer: undefined,
|
640
|
+
offer: undefined,
|
641
|
+
trickle: undefined,
|
642
|
+
update: undefined,
|
643
|
+
trackPublished: undefined,
|
644
|
+
leave: undefined,
|
645
|
+
mute: undefined,
|
646
|
+
speakersChanged: undefined,
|
647
|
+
roomUpdate: undefined,
|
648
|
+
connectionQuality: undefined,
|
649
|
+
streamStateUpdate: undefined,
|
650
|
+
subscribedQualityUpdate: undefined,
|
651
|
+
subscriptionPermissionUpdate: undefined,
|
652
|
+
refreshToken: undefined,
|
653
|
+
trackUnpublished: undefined,
|
654
|
+
};
|
655
|
+
}
|
663
656
|
|
664
657
|
export const SignalResponse = {
|
665
658
|
encode(
|
@@ -738,13 +731,19 @@ export const SignalResponse = {
|
|
738
731
|
if (message.refreshToken !== undefined) {
|
739
732
|
writer.uint32(130).string(message.refreshToken);
|
740
733
|
}
|
734
|
+
if (message.trackUnpublished !== undefined) {
|
735
|
+
TrackUnpublishedResponse.encode(
|
736
|
+
message.trackUnpublished,
|
737
|
+
writer.uint32(138).fork()
|
738
|
+
).ldelim();
|
739
|
+
}
|
741
740
|
return writer;
|
742
741
|
},
|
743
742
|
|
744
743
|
decode(input: _m0.Reader | Uint8Array, length?: number): SignalResponse {
|
745
744
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
746
745
|
let end = length === undefined ? reader.len : reader.pos + length;
|
747
|
-
const message =
|
746
|
+
const message = createBaseSignalResponse();
|
748
747
|
while (reader.pos < end) {
|
749
748
|
const tag = reader.uint32();
|
750
749
|
switch (tag >>> 3) {
|
@@ -809,6 +808,12 @@ export const SignalResponse = {
|
|
809
808
|
case 16:
|
810
809
|
message.refreshToken = reader.string();
|
811
810
|
break;
|
811
|
+
case 17:
|
812
|
+
message.trackUnpublished = TrackUnpublishedResponse.decode(
|
813
|
+
reader,
|
814
|
+
reader.uint32()
|
815
|
+
);
|
816
|
+
break;
|
812
817
|
default:
|
813
818
|
reader.skipType(tag & 7);
|
814
819
|
break;
|
@@ -818,111 +823,56 @@ export const SignalResponse = {
|
|
818
823
|
},
|
819
824
|
|
820
825
|
fromJSON(object: any): SignalResponse {
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
)
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
861
|
-
|
862
|
-
|
863
|
-
|
864
|
-
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
} else {
|
872
|
-
message.speakersChanged = undefined;
|
873
|
-
}
|
874
|
-
if (object.roomUpdate !== undefined && object.roomUpdate !== null) {
|
875
|
-
message.roomUpdate = RoomUpdate.fromJSON(object.roomUpdate);
|
876
|
-
} else {
|
877
|
-
message.roomUpdate = undefined;
|
878
|
-
}
|
879
|
-
if (
|
880
|
-
object.connectionQuality !== undefined &&
|
881
|
-
object.connectionQuality !== null
|
882
|
-
) {
|
883
|
-
message.connectionQuality = ConnectionQualityUpdate.fromJSON(
|
884
|
-
object.connectionQuality
|
885
|
-
);
|
886
|
-
} else {
|
887
|
-
message.connectionQuality = undefined;
|
888
|
-
}
|
889
|
-
if (
|
890
|
-
object.streamStateUpdate !== undefined &&
|
891
|
-
object.streamStateUpdate !== null
|
892
|
-
) {
|
893
|
-
message.streamStateUpdate = StreamStateUpdate.fromJSON(
|
894
|
-
object.streamStateUpdate
|
895
|
-
);
|
896
|
-
} else {
|
897
|
-
message.streamStateUpdate = undefined;
|
898
|
-
}
|
899
|
-
if (
|
900
|
-
object.subscribedQualityUpdate !== undefined &&
|
901
|
-
object.subscribedQualityUpdate !== null
|
902
|
-
) {
|
903
|
-
message.subscribedQualityUpdate = SubscribedQualityUpdate.fromJSON(
|
904
|
-
object.subscribedQualityUpdate
|
905
|
-
);
|
906
|
-
} else {
|
907
|
-
message.subscribedQualityUpdate = undefined;
|
908
|
-
}
|
909
|
-
if (
|
910
|
-
object.subscriptionPermissionUpdate !== undefined &&
|
911
|
-
object.subscriptionPermissionUpdate !== null
|
912
|
-
) {
|
913
|
-
message.subscriptionPermissionUpdate =
|
914
|
-
SubscriptionPermissionUpdate.fromJSON(
|
915
|
-
object.subscriptionPermissionUpdate
|
916
|
-
);
|
917
|
-
} else {
|
918
|
-
message.subscriptionPermissionUpdate = undefined;
|
919
|
-
}
|
920
|
-
if (object.refreshToken !== undefined && object.refreshToken !== null) {
|
921
|
-
message.refreshToken = String(object.refreshToken);
|
922
|
-
} else {
|
923
|
-
message.refreshToken = undefined;
|
924
|
-
}
|
925
|
-
return message;
|
826
|
+
return {
|
827
|
+
join: isSet(object.join) ? JoinResponse.fromJSON(object.join) : undefined,
|
828
|
+
answer: isSet(object.answer)
|
829
|
+
? SessionDescription.fromJSON(object.answer)
|
830
|
+
: undefined,
|
831
|
+
offer: isSet(object.offer)
|
832
|
+
? SessionDescription.fromJSON(object.offer)
|
833
|
+
: undefined,
|
834
|
+
trickle: isSet(object.trickle)
|
835
|
+
? TrickleRequest.fromJSON(object.trickle)
|
836
|
+
: undefined,
|
837
|
+
update: isSet(object.update)
|
838
|
+
? ParticipantUpdate.fromJSON(object.update)
|
839
|
+
: undefined,
|
840
|
+
trackPublished: isSet(object.trackPublished)
|
841
|
+
? TrackPublishedResponse.fromJSON(object.trackPublished)
|
842
|
+
: undefined,
|
843
|
+
leave: isSet(object.leave)
|
844
|
+
? LeaveRequest.fromJSON(object.leave)
|
845
|
+
: undefined,
|
846
|
+
mute: isSet(object.mute)
|
847
|
+
? MuteTrackRequest.fromJSON(object.mute)
|
848
|
+
: undefined,
|
849
|
+
speakersChanged: isSet(object.speakersChanged)
|
850
|
+
? SpeakersChanged.fromJSON(object.speakersChanged)
|
851
|
+
: undefined,
|
852
|
+
roomUpdate: isSet(object.roomUpdate)
|
853
|
+
? RoomUpdate.fromJSON(object.roomUpdate)
|
854
|
+
: undefined,
|
855
|
+
connectionQuality: isSet(object.connectionQuality)
|
856
|
+
? ConnectionQualityUpdate.fromJSON(object.connectionQuality)
|
857
|
+
: undefined,
|
858
|
+
streamStateUpdate: isSet(object.streamStateUpdate)
|
859
|
+
? StreamStateUpdate.fromJSON(object.streamStateUpdate)
|
860
|
+
: undefined,
|
861
|
+
subscribedQualityUpdate: isSet(object.subscribedQualityUpdate)
|
862
|
+
? SubscribedQualityUpdate.fromJSON(object.subscribedQualityUpdate)
|
863
|
+
: undefined,
|
864
|
+
subscriptionPermissionUpdate: isSet(object.subscriptionPermissionUpdate)
|
865
|
+
? SubscriptionPermissionUpdate.fromJSON(
|
866
|
+
object.subscriptionPermissionUpdate
|
867
|
+
)
|
868
|
+
: undefined,
|
869
|
+
refreshToken: isSet(object.refreshToken)
|
870
|
+
? String(object.refreshToken)
|
871
|
+
: undefined,
|
872
|
+
trackUnpublished: isSet(object.trackUnpublished)
|
873
|
+
? TrackUnpublishedResponse.fromJSON(object.trackUnpublished)
|
874
|
+
: undefined,
|
875
|
+
};
|
926
876
|
},
|
927
877
|
|
928
878
|
toJSON(message: SignalResponse): unknown {
|
@@ -985,124 +935,101 @@ export const SignalResponse = {
|
|
985
935
|
: undefined);
|
986
936
|
message.refreshToken !== undefined &&
|
987
937
|
(obj.refreshToken = message.refreshToken);
|
938
|
+
message.trackUnpublished !== undefined &&
|
939
|
+
(obj.trackUnpublished = message.trackUnpublished
|
940
|
+
? TrackUnpublishedResponse.toJSON(message.trackUnpublished)
|
941
|
+
: undefined);
|
988
942
|
return obj;
|
989
943
|
},
|
990
944
|
|
991
|
-
fromPartial
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
object.speakersChanged !== undefined &&
|
1037
|
-
object.speakersChanged !== null
|
1038
|
-
) {
|
1039
|
-
message.speakersChanged = SpeakersChanged.fromPartial(
|
1040
|
-
object.speakersChanged
|
1041
|
-
);
|
1042
|
-
} else {
|
1043
|
-
message.speakersChanged = undefined;
|
1044
|
-
}
|
1045
|
-
if (object.roomUpdate !== undefined && object.roomUpdate !== null) {
|
1046
|
-
message.roomUpdate = RoomUpdate.fromPartial(object.roomUpdate);
|
1047
|
-
} else {
|
1048
|
-
message.roomUpdate = undefined;
|
1049
|
-
}
|
1050
|
-
if (
|
945
|
+
fromPartial<I extends Exact<DeepPartial<SignalResponse>, I>>(
|
946
|
+
object: I
|
947
|
+
): SignalResponse {
|
948
|
+
const message = createBaseSignalResponse();
|
949
|
+
message.join =
|
950
|
+
object.join !== undefined && object.join !== null
|
951
|
+
? JoinResponse.fromPartial(object.join)
|
952
|
+
: undefined;
|
953
|
+
message.answer =
|
954
|
+
object.answer !== undefined && object.answer !== null
|
955
|
+
? SessionDescription.fromPartial(object.answer)
|
956
|
+
: undefined;
|
957
|
+
message.offer =
|
958
|
+
object.offer !== undefined && object.offer !== null
|
959
|
+
? SessionDescription.fromPartial(object.offer)
|
960
|
+
: undefined;
|
961
|
+
message.trickle =
|
962
|
+
object.trickle !== undefined && object.trickle !== null
|
963
|
+
? TrickleRequest.fromPartial(object.trickle)
|
964
|
+
: undefined;
|
965
|
+
message.update =
|
966
|
+
object.update !== undefined && object.update !== null
|
967
|
+
? ParticipantUpdate.fromPartial(object.update)
|
968
|
+
: undefined;
|
969
|
+
message.trackPublished =
|
970
|
+
object.trackPublished !== undefined && object.trackPublished !== null
|
971
|
+
? TrackPublishedResponse.fromPartial(object.trackPublished)
|
972
|
+
: undefined;
|
973
|
+
message.leave =
|
974
|
+
object.leave !== undefined && object.leave !== null
|
975
|
+
? LeaveRequest.fromPartial(object.leave)
|
976
|
+
: undefined;
|
977
|
+
message.mute =
|
978
|
+
object.mute !== undefined && object.mute !== null
|
979
|
+
? MuteTrackRequest.fromPartial(object.mute)
|
980
|
+
: undefined;
|
981
|
+
message.speakersChanged =
|
982
|
+
object.speakersChanged !== undefined && object.speakersChanged !== null
|
983
|
+
? SpeakersChanged.fromPartial(object.speakersChanged)
|
984
|
+
: undefined;
|
985
|
+
message.roomUpdate =
|
986
|
+
object.roomUpdate !== undefined && object.roomUpdate !== null
|
987
|
+
? RoomUpdate.fromPartial(object.roomUpdate)
|
988
|
+
: undefined;
|
989
|
+
message.connectionQuality =
|
1051
990
|
object.connectionQuality !== undefined &&
|
1052
991
|
object.connectionQuality !== null
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
);
|
1057
|
-
} else {
|
1058
|
-
message.connectionQuality = undefined;
|
1059
|
-
}
|
1060
|
-
if (
|
992
|
+
? ConnectionQualityUpdate.fromPartial(object.connectionQuality)
|
993
|
+
: undefined;
|
994
|
+
message.streamStateUpdate =
|
1061
995
|
object.streamStateUpdate !== undefined &&
|
1062
996
|
object.streamStateUpdate !== null
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
);
|
1067
|
-
} else {
|
1068
|
-
message.streamStateUpdate = undefined;
|
1069
|
-
}
|
1070
|
-
if (
|
997
|
+
? StreamStateUpdate.fromPartial(object.streamStateUpdate)
|
998
|
+
: undefined;
|
999
|
+
message.subscribedQualityUpdate =
|
1071
1000
|
object.subscribedQualityUpdate !== undefined &&
|
1072
1001
|
object.subscribedQualityUpdate !== null
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
);
|
1077
|
-
} else {
|
1078
|
-
message.subscribedQualityUpdate = undefined;
|
1079
|
-
}
|
1080
|
-
if (
|
1002
|
+
? SubscribedQualityUpdate.fromPartial(object.subscribedQualityUpdate)
|
1003
|
+
: undefined;
|
1004
|
+
message.subscriptionPermissionUpdate =
|
1081
1005
|
object.subscriptionPermissionUpdate !== undefined &&
|
1082
1006
|
object.subscriptionPermissionUpdate !== null
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
);
|
1088
|
-
} else {
|
1089
|
-
message.subscriptionPermissionUpdate = undefined;
|
1090
|
-
}
|
1007
|
+
? SubscriptionPermissionUpdate.fromPartial(
|
1008
|
+
object.subscriptionPermissionUpdate
|
1009
|
+
)
|
1010
|
+
: undefined;
|
1091
1011
|
message.refreshToken = object.refreshToken ?? undefined;
|
1012
|
+
message.trackUnpublished =
|
1013
|
+
object.trackUnpublished !== undefined && object.trackUnpublished !== null
|
1014
|
+
? TrackUnpublishedResponse.fromPartial(object.trackUnpublished)
|
1015
|
+
: undefined;
|
1092
1016
|
return message;
|
1093
1017
|
},
|
1094
1018
|
};
|
1095
1019
|
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1020
|
+
function createBaseAddTrackRequest(): AddTrackRequest {
|
1021
|
+
return {
|
1022
|
+
cid: "",
|
1023
|
+
name: "",
|
1024
|
+
type: 0,
|
1025
|
+
width: 0,
|
1026
|
+
height: 0,
|
1027
|
+
muted: false,
|
1028
|
+
disableDtx: false,
|
1029
|
+
source: 0,
|
1030
|
+
layers: [],
|
1031
|
+
};
|
1032
|
+
}
|
1106
1033
|
|
1107
1034
|
export const AddTrackRequest = {
|
1108
1035
|
encode(
|
@@ -1142,8 +1069,7 @@ export const AddTrackRequest = {
|
|
1142
1069
|
decode(input: _m0.Reader | Uint8Array, length?: number): AddTrackRequest {
|
1143
1070
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1144
1071
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1145
|
-
const message =
|
1146
|
-
message.layers = [];
|
1072
|
+
const message = createBaseAddTrackRequest();
|
1147
1073
|
while (reader.pos < end) {
|
1148
1074
|
const tag = reader.uint32();
|
1149
1075
|
switch (tag >>> 3) {
|
@@ -1183,54 +1109,19 @@ export const AddTrackRequest = {
|
|
1183
1109
|
},
|
1184
1110
|
|
1185
1111
|
fromJSON(object: any): AddTrackRequest {
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
message.type = trackTypeFromJSON(object.type);
|
1200
|
-
} else {
|
1201
|
-
message.type = 0;
|
1202
|
-
}
|
1203
|
-
if (object.width !== undefined && object.width !== null) {
|
1204
|
-
message.width = Number(object.width);
|
1205
|
-
} else {
|
1206
|
-
message.width = 0;
|
1207
|
-
}
|
1208
|
-
if (object.height !== undefined && object.height !== null) {
|
1209
|
-
message.height = Number(object.height);
|
1210
|
-
} else {
|
1211
|
-
message.height = 0;
|
1212
|
-
}
|
1213
|
-
if (object.muted !== undefined && object.muted !== null) {
|
1214
|
-
message.muted = Boolean(object.muted);
|
1215
|
-
} else {
|
1216
|
-
message.muted = false;
|
1217
|
-
}
|
1218
|
-
if (object.disableDtx !== undefined && object.disableDtx !== null) {
|
1219
|
-
message.disableDtx = Boolean(object.disableDtx);
|
1220
|
-
} else {
|
1221
|
-
message.disableDtx = false;
|
1222
|
-
}
|
1223
|
-
if (object.source !== undefined && object.source !== null) {
|
1224
|
-
message.source = trackSourceFromJSON(object.source);
|
1225
|
-
} else {
|
1226
|
-
message.source = 0;
|
1227
|
-
}
|
1228
|
-
if (object.layers !== undefined && object.layers !== null) {
|
1229
|
-
for (const e of object.layers) {
|
1230
|
-
message.layers.push(VideoLayer.fromJSON(e));
|
1231
|
-
}
|
1232
|
-
}
|
1233
|
-
return message;
|
1112
|
+
return {
|
1113
|
+
cid: isSet(object.cid) ? String(object.cid) : "",
|
1114
|
+
name: isSet(object.name) ? String(object.name) : "",
|
1115
|
+
type: isSet(object.type) ? trackTypeFromJSON(object.type) : 0,
|
1116
|
+
width: isSet(object.width) ? Number(object.width) : 0,
|
1117
|
+
height: isSet(object.height) ? Number(object.height) : 0,
|
1118
|
+
muted: isSet(object.muted) ? Boolean(object.muted) : false,
|
1119
|
+
disableDtx: isSet(object.disableDtx) ? Boolean(object.disableDtx) : false,
|
1120
|
+
source: isSet(object.source) ? trackSourceFromJSON(object.source) : 0,
|
1121
|
+
layers: Array.isArray(object?.layers)
|
1122
|
+
? object.layers.map((e: any) => VideoLayer.fromJSON(e))
|
1123
|
+
: [],
|
1124
|
+
};
|
1234
1125
|
},
|
1235
1126
|
|
1236
1127
|
toJSON(message: AddTrackRequest): unknown {
|
@@ -1238,8 +1129,8 @@ export const AddTrackRequest = {
|
|
1238
1129
|
message.cid !== undefined && (obj.cid = message.cid);
|
1239
1130
|
message.name !== undefined && (obj.name = message.name);
|
1240
1131
|
message.type !== undefined && (obj.type = trackTypeToJSON(message.type));
|
1241
|
-
message.width !== undefined && (obj.width = message.width);
|
1242
|
-
message.height !== undefined && (obj.height = message.height);
|
1132
|
+
message.width !== undefined && (obj.width = Math.round(message.width));
|
1133
|
+
message.height !== undefined && (obj.height = Math.round(message.height));
|
1243
1134
|
message.muted !== undefined && (obj.muted = message.muted);
|
1244
1135
|
message.disableDtx !== undefined && (obj.disableDtx = message.disableDtx);
|
1245
1136
|
message.source !== undefined &&
|
@@ -1254,8 +1145,10 @@ export const AddTrackRequest = {
|
|
1254
1145
|
return obj;
|
1255
1146
|
},
|
1256
1147
|
|
1257
|
-
fromPartial
|
1258
|
-
|
1148
|
+
fromPartial<I extends Exact<DeepPartial<AddTrackRequest>, I>>(
|
1149
|
+
object: I
|
1150
|
+
): AddTrackRequest {
|
1151
|
+
const message = createBaseAddTrackRequest();
|
1259
1152
|
message.cid = object.cid ?? "";
|
1260
1153
|
message.name = object.name ?? "";
|
1261
1154
|
message.type = object.type ?? 0;
|
@@ -1264,17 +1157,14 @@ export const AddTrackRequest = {
|
|
1264
1157
|
message.muted = object.muted ?? false;
|
1265
1158
|
message.disableDtx = object.disableDtx ?? false;
|
1266
1159
|
message.source = object.source ?? 0;
|
1267
|
-
message.layers = [];
|
1268
|
-
if (object.layers !== undefined && object.layers !== null) {
|
1269
|
-
for (const e of object.layers) {
|
1270
|
-
message.layers.push(VideoLayer.fromPartial(e));
|
1271
|
-
}
|
1272
|
-
}
|
1160
|
+
message.layers = object.layers?.map((e) => VideoLayer.fromPartial(e)) || [];
|
1273
1161
|
return message;
|
1274
1162
|
},
|
1275
1163
|
};
|
1276
1164
|
|
1277
|
-
|
1165
|
+
function createBaseTrickleRequest(): TrickleRequest {
|
1166
|
+
return { candidateInit: "", target: 0 };
|
1167
|
+
}
|
1278
1168
|
|
1279
1169
|
export const TrickleRequest = {
|
1280
1170
|
encode(
|
@@ -1293,7 +1183,7 @@ export const TrickleRequest = {
|
|
1293
1183
|
decode(input: _m0.Reader | Uint8Array, length?: number): TrickleRequest {
|
1294
1184
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1295
1185
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1296
|
-
const message =
|
1186
|
+
const message = createBaseTrickleRequest();
|
1297
1187
|
while (reader.pos < end) {
|
1298
1188
|
const tag = reader.uint32();
|
1299
1189
|
switch (tag >>> 3) {
|
@@ -1312,18 +1202,12 @@ export const TrickleRequest = {
|
|
1312
1202
|
},
|
1313
1203
|
|
1314
1204
|
fromJSON(object: any): TrickleRequest {
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
}
|
1321
|
-
if (object.target !== undefined && object.target !== null) {
|
1322
|
-
message.target = signalTargetFromJSON(object.target);
|
1323
|
-
} else {
|
1324
|
-
message.target = 0;
|
1325
|
-
}
|
1326
|
-
return message;
|
1205
|
+
return {
|
1206
|
+
candidateInit: isSet(object.candidateInit)
|
1207
|
+
? String(object.candidateInit)
|
1208
|
+
: "",
|
1209
|
+
target: isSet(object.target) ? signalTargetFromJSON(object.target) : 0,
|
1210
|
+
};
|
1327
1211
|
},
|
1328
1212
|
|
1329
1213
|
toJSON(message: TrickleRequest): unknown {
|
@@ -1335,15 +1219,19 @@ export const TrickleRequest = {
|
|
1335
1219
|
return obj;
|
1336
1220
|
},
|
1337
1221
|
|
1338
|
-
fromPartial
|
1339
|
-
|
1222
|
+
fromPartial<I extends Exact<DeepPartial<TrickleRequest>, I>>(
|
1223
|
+
object: I
|
1224
|
+
): TrickleRequest {
|
1225
|
+
const message = createBaseTrickleRequest();
|
1340
1226
|
message.candidateInit = object.candidateInit ?? "";
|
1341
1227
|
message.target = object.target ?? 0;
|
1342
1228
|
return message;
|
1343
1229
|
},
|
1344
1230
|
};
|
1345
1231
|
|
1346
|
-
|
1232
|
+
function createBaseMuteTrackRequest(): MuteTrackRequest {
|
1233
|
+
return { sid: "", muted: false };
|
1234
|
+
}
|
1347
1235
|
|
1348
1236
|
export const MuteTrackRequest = {
|
1349
1237
|
encode(
|
@@ -1362,7 +1250,7 @@ export const MuteTrackRequest = {
|
|
1362
1250
|
decode(input: _m0.Reader | Uint8Array, length?: number): MuteTrackRequest {
|
1363
1251
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1364
1252
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1365
|
-
const message =
|
1253
|
+
const message = createBaseMuteTrackRequest();
|
1366
1254
|
while (reader.pos < end) {
|
1367
1255
|
const tag = reader.uint32();
|
1368
1256
|
switch (tag >>> 3) {
|
@@ -1381,18 +1269,10 @@ export const MuteTrackRequest = {
|
|
1381
1269
|
},
|
1382
1270
|
|
1383
1271
|
fromJSON(object: any): MuteTrackRequest {
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
}
|
1388
|
-
message.sid = "";
|
1389
|
-
}
|
1390
|
-
if (object.muted !== undefined && object.muted !== null) {
|
1391
|
-
message.muted = Boolean(object.muted);
|
1392
|
-
} else {
|
1393
|
-
message.muted = false;
|
1394
|
-
}
|
1395
|
-
return message;
|
1272
|
+
return {
|
1273
|
+
sid: isSet(object.sid) ? String(object.sid) : "",
|
1274
|
+
muted: isSet(object.muted) ? Boolean(object.muted) : false,
|
1275
|
+
};
|
1396
1276
|
},
|
1397
1277
|
|
1398
1278
|
toJSON(message: MuteTrackRequest): unknown {
|
@@ -1402,20 +1282,29 @@ export const MuteTrackRequest = {
|
|
1402
1282
|
return obj;
|
1403
1283
|
},
|
1404
1284
|
|
1405
|
-
fromPartial
|
1406
|
-
|
1285
|
+
fromPartial<I extends Exact<DeepPartial<MuteTrackRequest>, I>>(
|
1286
|
+
object: I
|
1287
|
+
): MuteTrackRequest {
|
1288
|
+
const message = createBaseMuteTrackRequest();
|
1407
1289
|
message.sid = object.sid ?? "";
|
1408
1290
|
message.muted = object.muted ?? false;
|
1409
1291
|
return message;
|
1410
1292
|
},
|
1411
1293
|
};
|
1412
1294
|
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1295
|
+
function createBaseJoinResponse(): JoinResponse {
|
1296
|
+
return {
|
1297
|
+
room: undefined,
|
1298
|
+
participant: undefined,
|
1299
|
+
otherParticipants: [],
|
1300
|
+
serverVersion: "",
|
1301
|
+
iceServers: [],
|
1302
|
+
subscriberPrimary: false,
|
1303
|
+
alternativeUrl: "",
|
1304
|
+
clientConfiguration: undefined,
|
1305
|
+
serverRegion: "",
|
1306
|
+
};
|
1307
|
+
}
|
1419
1308
|
|
1420
1309
|
export const JoinResponse = {
|
1421
1310
|
encode(
|
@@ -1461,9 +1350,7 @@ export const JoinResponse = {
|
|
1461
1350
|
decode(input: _m0.Reader | Uint8Array, length?: number): JoinResponse {
|
1462
1351
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1463
1352
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1464
|
-
const message =
|
1465
|
-
message.otherParticipants = [];
|
1466
|
-
message.iceServers = [];
|
1353
|
+
const message = createBaseJoinResponse();
|
1467
1354
|
while (reader.pos < end) {
|
1468
1355
|
const tag = reader.uint32();
|
1469
1356
|
switch (tag >>> 3) {
|
@@ -1508,66 +1395,33 @@ export const JoinResponse = {
|
|
1508
1395
|
},
|
1509
1396
|
|
1510
1397
|
fromJSON(object: any): JoinResponse {
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
object.
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
for (const e of object.iceServers) {
|
1539
|
-
message.iceServers.push(ICEServer.fromJSON(e));
|
1540
|
-
}
|
1541
|
-
}
|
1542
|
-
if (
|
1543
|
-
object.subscriberPrimary !== undefined &&
|
1544
|
-
object.subscriberPrimary !== null
|
1545
|
-
) {
|
1546
|
-
message.subscriberPrimary = Boolean(object.subscriberPrimary);
|
1547
|
-
} else {
|
1548
|
-
message.subscriberPrimary = false;
|
1549
|
-
}
|
1550
|
-
if (object.alternativeUrl !== undefined && object.alternativeUrl !== null) {
|
1551
|
-
message.alternativeUrl = String(object.alternativeUrl);
|
1552
|
-
} else {
|
1553
|
-
message.alternativeUrl = "";
|
1554
|
-
}
|
1555
|
-
if (
|
1556
|
-
object.clientConfiguration !== undefined &&
|
1557
|
-
object.clientConfiguration !== null
|
1558
|
-
) {
|
1559
|
-
message.clientConfiguration = ClientConfiguration.fromJSON(
|
1560
|
-
object.clientConfiguration
|
1561
|
-
);
|
1562
|
-
} else {
|
1563
|
-
message.clientConfiguration = undefined;
|
1564
|
-
}
|
1565
|
-
if (object.serverRegion !== undefined && object.serverRegion !== null) {
|
1566
|
-
message.serverRegion = String(object.serverRegion);
|
1567
|
-
} else {
|
1568
|
-
message.serverRegion = "";
|
1569
|
-
}
|
1570
|
-
return message;
|
1398
|
+
return {
|
1399
|
+
room: isSet(object.room) ? Room.fromJSON(object.room) : undefined,
|
1400
|
+
participant: isSet(object.participant)
|
1401
|
+
? ParticipantInfo.fromJSON(object.participant)
|
1402
|
+
: undefined,
|
1403
|
+
otherParticipants: Array.isArray(object?.otherParticipants)
|
1404
|
+
? object.otherParticipants.map((e: any) => ParticipantInfo.fromJSON(e))
|
1405
|
+
: [],
|
1406
|
+
serverVersion: isSet(object.serverVersion)
|
1407
|
+
? String(object.serverVersion)
|
1408
|
+
: "",
|
1409
|
+
iceServers: Array.isArray(object?.iceServers)
|
1410
|
+
? object.iceServers.map((e: any) => ICEServer.fromJSON(e))
|
1411
|
+
: [],
|
1412
|
+
subscriberPrimary: isSet(object.subscriberPrimary)
|
1413
|
+
? Boolean(object.subscriberPrimary)
|
1414
|
+
: false,
|
1415
|
+
alternativeUrl: isSet(object.alternativeUrl)
|
1416
|
+
? String(object.alternativeUrl)
|
1417
|
+
: "",
|
1418
|
+
clientConfiguration: isSet(object.clientConfiguration)
|
1419
|
+
? ClientConfiguration.fromJSON(object.clientConfiguration)
|
1420
|
+
: undefined,
|
1421
|
+
serverRegion: isSet(object.serverRegion)
|
1422
|
+
? String(object.serverRegion)
|
1423
|
+
: "",
|
1424
|
+
};
|
1571
1425
|
},
|
1572
1426
|
|
1573
1427
|
toJSON(message: JoinResponse): unknown {
|
@@ -1607,52 +1461,39 @@ export const JoinResponse = {
|
|
1607
1461
|
return obj;
|
1608
1462
|
},
|
1609
1463
|
|
1610
|
-
fromPartial
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
|
1622
|
-
message.otherParticipants =
|
1623
|
-
|
1624
|
-
|
1625
|
-
object.otherParticipants !== null
|
1626
|
-
) {
|
1627
|
-
for (const e of object.otherParticipants) {
|
1628
|
-
message.otherParticipants.push(ParticipantInfo.fromPartial(e));
|
1629
|
-
}
|
1630
|
-
}
|
1464
|
+
fromPartial<I extends Exact<DeepPartial<JoinResponse>, I>>(
|
1465
|
+
object: I
|
1466
|
+
): JoinResponse {
|
1467
|
+
const message = createBaseJoinResponse();
|
1468
|
+
message.room =
|
1469
|
+
object.room !== undefined && object.room !== null
|
1470
|
+
? Room.fromPartial(object.room)
|
1471
|
+
: undefined;
|
1472
|
+
message.participant =
|
1473
|
+
object.participant !== undefined && object.participant !== null
|
1474
|
+
? ParticipantInfo.fromPartial(object.participant)
|
1475
|
+
: undefined;
|
1476
|
+
message.otherParticipants =
|
1477
|
+
object.otherParticipants?.map((e) => ParticipantInfo.fromPartial(e)) ||
|
1478
|
+
[];
|
1631
1479
|
message.serverVersion = object.serverVersion ?? "";
|
1632
|
-
message.iceServers =
|
1633
|
-
|
1634
|
-
for (const e of object.iceServers) {
|
1635
|
-
message.iceServers.push(ICEServer.fromPartial(e));
|
1636
|
-
}
|
1637
|
-
}
|
1480
|
+
message.iceServers =
|
1481
|
+
object.iceServers?.map((e) => ICEServer.fromPartial(e)) || [];
|
1638
1482
|
message.subscriberPrimary = object.subscriberPrimary ?? false;
|
1639
1483
|
message.alternativeUrl = object.alternativeUrl ?? "";
|
1640
|
-
|
1484
|
+
message.clientConfiguration =
|
1641
1485
|
object.clientConfiguration !== undefined &&
|
1642
1486
|
object.clientConfiguration !== null
|
1643
|
-
|
1644
|
-
|
1645
|
-
object.clientConfiguration
|
1646
|
-
);
|
1647
|
-
} else {
|
1648
|
-
message.clientConfiguration = undefined;
|
1649
|
-
}
|
1487
|
+
? ClientConfiguration.fromPartial(object.clientConfiguration)
|
1488
|
+
: undefined;
|
1650
1489
|
message.serverRegion = object.serverRegion ?? "";
|
1651
1490
|
return message;
|
1652
1491
|
},
|
1653
1492
|
};
|
1654
1493
|
|
1655
|
-
|
1494
|
+
function createBaseTrackPublishedResponse(): TrackPublishedResponse {
|
1495
|
+
return { cid: "", track: undefined };
|
1496
|
+
}
|
1656
1497
|
|
1657
1498
|
export const TrackPublishedResponse = {
|
1658
1499
|
encode(
|
@@ -1674,7 +1515,7 @@ export const TrackPublishedResponse = {
|
|
1674
1515
|
): TrackPublishedResponse {
|
1675
1516
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1676
1517
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1677
|
-
const message =
|
1518
|
+
const message = createBaseTrackPublishedResponse();
|
1678
1519
|
while (reader.pos < end) {
|
1679
1520
|
const tag = reader.uint32();
|
1680
1521
|
switch (tag >>> 3) {
|
@@ -1693,18 +1534,10 @@ export const TrackPublishedResponse = {
|
|
1693
1534
|
},
|
1694
1535
|
|
1695
1536
|
fromJSON(object: any): TrackPublishedResponse {
|
1696
|
-
|
1697
|
-
|
1698
|
-
|
1699
|
-
}
|
1700
|
-
message.cid = "";
|
1701
|
-
}
|
1702
|
-
if (object.track !== undefined && object.track !== null) {
|
1703
|
-
message.track = TrackInfo.fromJSON(object.track);
|
1704
|
-
} else {
|
1705
|
-
message.track = undefined;
|
1706
|
-
}
|
1707
|
-
return message;
|
1537
|
+
return {
|
1538
|
+
cid: isSet(object.cid) ? String(object.cid) : "",
|
1539
|
+
track: isSet(object.track) ? TrackInfo.fromJSON(object.track) : undefined,
|
1540
|
+
};
|
1708
1541
|
},
|
1709
1542
|
|
1710
1543
|
toJSON(message: TrackPublishedResponse): unknown {
|
@@ -1715,21 +1548,79 @@ export const TrackPublishedResponse = {
|
|
1715
1548
|
return obj;
|
1716
1549
|
},
|
1717
1550
|
|
1718
|
-
fromPartial(
|
1719
|
-
object:
|
1551
|
+
fromPartial<I extends Exact<DeepPartial<TrackPublishedResponse>, I>>(
|
1552
|
+
object: I
|
1720
1553
|
): TrackPublishedResponse {
|
1721
|
-
const message =
|
1554
|
+
const message = createBaseTrackPublishedResponse();
|
1722
1555
|
message.cid = object.cid ?? "";
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1556
|
+
message.track =
|
1557
|
+
object.track !== undefined && object.track !== null
|
1558
|
+
? TrackInfo.fromPartial(object.track)
|
1559
|
+
: undefined;
|
1560
|
+
return message;
|
1561
|
+
},
|
1562
|
+
};
|
1563
|
+
|
1564
|
+
function createBaseTrackUnpublishedResponse(): TrackUnpublishedResponse {
|
1565
|
+
return { trackSid: "" };
|
1566
|
+
}
|
1567
|
+
|
1568
|
+
export const TrackUnpublishedResponse = {
|
1569
|
+
encode(
|
1570
|
+
message: TrackUnpublishedResponse,
|
1571
|
+
writer: _m0.Writer = _m0.Writer.create()
|
1572
|
+
): _m0.Writer {
|
1573
|
+
if (message.trackSid !== "") {
|
1574
|
+
writer.uint32(10).string(message.trackSid);
|
1575
|
+
}
|
1576
|
+
return writer;
|
1577
|
+
},
|
1578
|
+
|
1579
|
+
decode(
|
1580
|
+
input: _m0.Reader | Uint8Array,
|
1581
|
+
length?: number
|
1582
|
+
): TrackUnpublishedResponse {
|
1583
|
+
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1584
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
1585
|
+
const message = createBaseTrackUnpublishedResponse();
|
1586
|
+
while (reader.pos < end) {
|
1587
|
+
const tag = reader.uint32();
|
1588
|
+
switch (tag >>> 3) {
|
1589
|
+
case 1:
|
1590
|
+
message.trackSid = reader.string();
|
1591
|
+
break;
|
1592
|
+
default:
|
1593
|
+
reader.skipType(tag & 7);
|
1594
|
+
break;
|
1595
|
+
}
|
1727
1596
|
}
|
1728
1597
|
return message;
|
1729
1598
|
},
|
1599
|
+
|
1600
|
+
fromJSON(object: any): TrackUnpublishedResponse {
|
1601
|
+
return {
|
1602
|
+
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
1603
|
+
};
|
1604
|
+
},
|
1605
|
+
|
1606
|
+
toJSON(message: TrackUnpublishedResponse): unknown {
|
1607
|
+
const obj: any = {};
|
1608
|
+
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
1609
|
+
return obj;
|
1610
|
+
},
|
1611
|
+
|
1612
|
+
fromPartial<I extends Exact<DeepPartial<TrackUnpublishedResponse>, I>>(
|
1613
|
+
object: I
|
1614
|
+
): TrackUnpublishedResponse {
|
1615
|
+
const message = createBaseTrackUnpublishedResponse();
|
1616
|
+
message.trackSid = object.trackSid ?? "";
|
1617
|
+
return message;
|
1618
|
+
},
|
1730
1619
|
};
|
1731
1620
|
|
1732
|
-
|
1621
|
+
function createBaseSessionDescription(): SessionDescription {
|
1622
|
+
return { type: "", sdp: "" };
|
1623
|
+
}
|
1733
1624
|
|
1734
1625
|
export const SessionDescription = {
|
1735
1626
|
encode(
|
@@ -1748,7 +1639,7 @@ export const SessionDescription = {
|
|
1748
1639
|
decode(input: _m0.Reader | Uint8Array, length?: number): SessionDescription {
|
1749
1640
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1750
1641
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1751
|
-
const message =
|
1642
|
+
const message = createBaseSessionDescription();
|
1752
1643
|
while (reader.pos < end) {
|
1753
1644
|
const tag = reader.uint32();
|
1754
1645
|
switch (tag >>> 3) {
|
@@ -1767,18 +1658,10 @@ export const SessionDescription = {
|
|
1767
1658
|
},
|
1768
1659
|
|
1769
1660
|
fromJSON(object: any): SessionDescription {
|
1770
|
-
|
1771
|
-
|
1772
|
-
|
1773
|
-
}
|
1774
|
-
message.type = "";
|
1775
|
-
}
|
1776
|
-
if (object.sdp !== undefined && object.sdp !== null) {
|
1777
|
-
message.sdp = String(object.sdp);
|
1778
|
-
} else {
|
1779
|
-
message.sdp = "";
|
1780
|
-
}
|
1781
|
-
return message;
|
1661
|
+
return {
|
1662
|
+
type: isSet(object.type) ? String(object.type) : "",
|
1663
|
+
sdp: isSet(object.sdp) ? String(object.sdp) : "",
|
1664
|
+
};
|
1782
1665
|
},
|
1783
1666
|
|
1784
1667
|
toJSON(message: SessionDescription): unknown {
|
@@ -1788,15 +1671,19 @@ export const SessionDescription = {
|
|
1788
1671
|
return obj;
|
1789
1672
|
},
|
1790
1673
|
|
1791
|
-
fromPartial
|
1792
|
-
|
1674
|
+
fromPartial<I extends Exact<DeepPartial<SessionDescription>, I>>(
|
1675
|
+
object: I
|
1676
|
+
): SessionDescription {
|
1677
|
+
const message = createBaseSessionDescription();
|
1793
1678
|
message.type = object.type ?? "";
|
1794
1679
|
message.sdp = object.sdp ?? "";
|
1795
1680
|
return message;
|
1796
1681
|
},
|
1797
1682
|
};
|
1798
1683
|
|
1799
|
-
|
1684
|
+
function createBaseParticipantUpdate(): ParticipantUpdate {
|
1685
|
+
return { participants: [] };
|
1686
|
+
}
|
1800
1687
|
|
1801
1688
|
export const ParticipantUpdate = {
|
1802
1689
|
encode(
|
@@ -1812,8 +1699,7 @@ export const ParticipantUpdate = {
|
|
1812
1699
|
decode(input: _m0.Reader | Uint8Array, length?: number): ParticipantUpdate {
|
1813
1700
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1814
1701
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1815
|
-
const message =
|
1816
|
-
message.participants = [];
|
1702
|
+
const message = createBaseParticipantUpdate();
|
1817
1703
|
while (reader.pos < end) {
|
1818
1704
|
const tag = reader.uint32();
|
1819
1705
|
switch (tag >>> 3) {
|
@@ -1831,14 +1717,11 @@ export const ParticipantUpdate = {
|
|
1831
1717
|
},
|
1832
1718
|
|
1833
1719
|
fromJSON(object: any): ParticipantUpdate {
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
}
|
1840
|
-
}
|
1841
|
-
return message;
|
1720
|
+
return {
|
1721
|
+
participants: Array.isArray(object?.participants)
|
1722
|
+
? object.participants.map((e: any) => ParticipantInfo.fromJSON(e))
|
1723
|
+
: [],
|
1724
|
+
};
|
1842
1725
|
},
|
1843
1726
|
|
1844
1727
|
toJSON(message: ParticipantUpdate): unknown {
|
@@ -1853,19 +1736,19 @@ export const ParticipantUpdate = {
|
|
1853
1736
|
return obj;
|
1854
1737
|
},
|
1855
1738
|
|
1856
|
-
fromPartial
|
1857
|
-
|
1858
|
-
|
1859
|
-
|
1860
|
-
|
1861
|
-
|
1862
|
-
}
|
1863
|
-
}
|
1739
|
+
fromPartial<I extends Exact<DeepPartial<ParticipantUpdate>, I>>(
|
1740
|
+
object: I
|
1741
|
+
): ParticipantUpdate {
|
1742
|
+
const message = createBaseParticipantUpdate();
|
1743
|
+
message.participants =
|
1744
|
+
object.participants?.map((e) => ParticipantInfo.fromPartial(e)) || [];
|
1864
1745
|
return message;
|
1865
1746
|
},
|
1866
1747
|
};
|
1867
1748
|
|
1868
|
-
|
1749
|
+
function createBaseUpdateSubscription(): UpdateSubscription {
|
1750
|
+
return { trackSids: [], subscribe: false, participantTracks: [] };
|
1751
|
+
}
|
1869
1752
|
|
1870
1753
|
export const UpdateSubscription = {
|
1871
1754
|
encode(
|
@@ -1887,9 +1770,7 @@ export const UpdateSubscription = {
|
|
1887
1770
|
decode(input: _m0.Reader | Uint8Array, length?: number): UpdateSubscription {
|
1888
1771
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1889
1772
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1890
|
-
const message =
|
1891
|
-
message.trackSids = [];
|
1892
|
-
message.participantTracks = [];
|
1773
|
+
const message = createBaseUpdateSubscription();
|
1893
1774
|
while (reader.pos < end) {
|
1894
1775
|
const tag = reader.uint32();
|
1895
1776
|
switch (tag >>> 3) {
|
@@ -1913,28 +1794,17 @@ export const UpdateSubscription = {
|
|
1913
1794
|
},
|
1914
1795
|
|
1915
1796
|
fromJSON(object: any): UpdateSubscription {
|
1916
|
-
|
1917
|
-
|
1918
|
-
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1926
|
-
}
|
1927
|
-
message.subscribe = false;
|
1928
|
-
}
|
1929
|
-
if (
|
1930
|
-
object.participantTracks !== undefined &&
|
1931
|
-
object.participantTracks !== null
|
1932
|
-
) {
|
1933
|
-
for (const e of object.participantTracks) {
|
1934
|
-
message.participantTracks.push(ParticipantTracks.fromJSON(e));
|
1935
|
-
}
|
1936
|
-
}
|
1937
|
-
return message;
|
1797
|
+
return {
|
1798
|
+
trackSids: Array.isArray(object?.trackSids)
|
1799
|
+
? object.trackSids.map((e: any) => String(e))
|
1800
|
+
: [],
|
1801
|
+
subscribe: isSet(object.subscribe) ? Boolean(object.subscribe) : false,
|
1802
|
+
participantTracks: Array.isArray(object?.participantTracks)
|
1803
|
+
? object.participantTracks.map((e: any) =>
|
1804
|
+
ParticipantTracks.fromJSON(e)
|
1805
|
+
)
|
1806
|
+
: [],
|
1807
|
+
};
|
1938
1808
|
},
|
1939
1809
|
|
1940
1810
|
toJSON(message: UpdateSubscription): unknown {
|
@@ -1955,35 +1825,22 @@ export const UpdateSubscription = {
|
|
1955
1825
|
return obj;
|
1956
1826
|
},
|
1957
1827
|
|
1958
|
-
fromPartial
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
message.trackSids.push(e);
|
1964
|
-
}
|
1965
|
-
}
|
1828
|
+
fromPartial<I extends Exact<DeepPartial<UpdateSubscription>, I>>(
|
1829
|
+
object: I
|
1830
|
+
): UpdateSubscription {
|
1831
|
+
const message = createBaseUpdateSubscription();
|
1832
|
+
message.trackSids = object.trackSids?.map((e) => e) || [];
|
1966
1833
|
message.subscribe = object.subscribe ?? false;
|
1967
|
-
message.participantTracks =
|
1968
|
-
|
1969
|
-
|
1970
|
-
object.participantTracks !== null
|
1971
|
-
) {
|
1972
|
-
for (const e of object.participantTracks) {
|
1973
|
-
message.participantTracks.push(ParticipantTracks.fromPartial(e));
|
1974
|
-
}
|
1975
|
-
}
|
1834
|
+
message.participantTracks =
|
1835
|
+
object.participantTracks?.map((e) => ParticipantTracks.fromPartial(e)) ||
|
1836
|
+
[];
|
1976
1837
|
return message;
|
1977
1838
|
},
|
1978
1839
|
};
|
1979
1840
|
|
1980
|
-
|
1981
|
-
trackSids:
|
1982
|
-
|
1983
|
-
quality: 0,
|
1984
|
-
width: 0,
|
1985
|
-
height: 0,
|
1986
|
-
};
|
1841
|
+
function createBaseUpdateTrackSettings(): UpdateTrackSettings {
|
1842
|
+
return { trackSids: [], disabled: false, quality: 0, width: 0, height: 0 };
|
1843
|
+
}
|
1987
1844
|
|
1988
1845
|
export const UpdateTrackSettings = {
|
1989
1846
|
encode(
|
@@ -2011,8 +1868,7 @@ export const UpdateTrackSettings = {
|
|
2011
1868
|
decode(input: _m0.Reader | Uint8Array, length?: number): UpdateTrackSettings {
|
2012
1869
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2013
1870
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2014
|
-
const message =
|
2015
|
-
message.trackSids = [];
|
1871
|
+
const message = createBaseUpdateTrackSettings();
|
2016
1872
|
while (reader.pos < end) {
|
2017
1873
|
const tag = reader.uint32();
|
2018
1874
|
switch (tag >>> 3) {
|
@@ -2040,34 +1896,15 @@ export const UpdateTrackSettings = {
|
|
2040
1896
|
},
|
2041
1897
|
|
2042
1898
|
fromJSON(object: any): UpdateTrackSettings {
|
2043
|
-
|
2044
|
-
|
2045
|
-
|
2046
|
-
|
2047
|
-
|
2048
|
-
|
2049
|
-
|
2050
|
-
|
2051
|
-
|
2052
|
-
} else {
|
2053
|
-
message.disabled = false;
|
2054
|
-
}
|
2055
|
-
if (object.quality !== undefined && object.quality !== null) {
|
2056
|
-
message.quality = videoQualityFromJSON(object.quality);
|
2057
|
-
} else {
|
2058
|
-
message.quality = 0;
|
2059
|
-
}
|
2060
|
-
if (object.width !== undefined && object.width !== null) {
|
2061
|
-
message.width = Number(object.width);
|
2062
|
-
} else {
|
2063
|
-
message.width = 0;
|
2064
|
-
}
|
2065
|
-
if (object.height !== undefined && object.height !== null) {
|
2066
|
-
message.height = Number(object.height);
|
2067
|
-
} else {
|
2068
|
-
message.height = 0;
|
2069
|
-
}
|
2070
|
-
return message;
|
1899
|
+
return {
|
1900
|
+
trackSids: Array.isArray(object?.trackSids)
|
1901
|
+
? object.trackSids.map((e: any) => String(e))
|
1902
|
+
: [],
|
1903
|
+
disabled: isSet(object.disabled) ? Boolean(object.disabled) : false,
|
1904
|
+
quality: isSet(object.quality) ? videoQualityFromJSON(object.quality) : 0,
|
1905
|
+
width: isSet(object.width) ? Number(object.width) : 0,
|
1906
|
+
height: isSet(object.height) ? Number(object.height) : 0,
|
1907
|
+
};
|
2071
1908
|
},
|
2072
1909
|
|
2073
1910
|
toJSON(message: UpdateTrackSettings): unknown {
|
@@ -2080,19 +1917,16 @@ export const UpdateTrackSettings = {
|
|
2080
1917
|
message.disabled !== undefined && (obj.disabled = message.disabled);
|
2081
1918
|
message.quality !== undefined &&
|
2082
1919
|
(obj.quality = videoQualityToJSON(message.quality));
|
2083
|
-
message.width !== undefined && (obj.width = message.width);
|
2084
|
-
message.height !== undefined && (obj.height = message.height);
|
1920
|
+
message.width !== undefined && (obj.width = Math.round(message.width));
|
1921
|
+
message.height !== undefined && (obj.height = Math.round(message.height));
|
2085
1922
|
return obj;
|
2086
1923
|
},
|
2087
1924
|
|
2088
|
-
fromPartial
|
2089
|
-
|
2090
|
-
|
2091
|
-
|
2092
|
-
|
2093
|
-
message.trackSids.push(e);
|
2094
|
-
}
|
2095
|
-
}
|
1925
|
+
fromPartial<I extends Exact<DeepPartial<UpdateTrackSettings>, I>>(
|
1926
|
+
object: I
|
1927
|
+
): UpdateTrackSettings {
|
1928
|
+
const message = createBaseUpdateTrackSettings();
|
1929
|
+
message.trackSids = object.trackSids?.map((e) => e) || [];
|
2096
1930
|
message.disabled = object.disabled ?? false;
|
2097
1931
|
message.quality = object.quality ?? 0;
|
2098
1932
|
message.width = object.width ?? 0;
|
@@ -2101,7 +1935,9 @@ export const UpdateTrackSettings = {
|
|
2101
1935
|
},
|
2102
1936
|
};
|
2103
1937
|
|
2104
|
-
|
1938
|
+
function createBaseLeaveRequest(): LeaveRequest {
|
1939
|
+
return { canReconnect: false };
|
1940
|
+
}
|
2105
1941
|
|
2106
1942
|
export const LeaveRequest = {
|
2107
1943
|
encode(
|
@@ -2117,7 +1953,7 @@ export const LeaveRequest = {
|
|
2117
1953
|
decode(input: _m0.Reader | Uint8Array, length?: number): LeaveRequest {
|
2118
1954
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2119
1955
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2120
|
-
const message =
|
1956
|
+
const message = createBaseLeaveRequest();
|
2121
1957
|
while (reader.pos < end) {
|
2122
1958
|
const tag = reader.uint32();
|
2123
1959
|
switch (tag >>> 3) {
|
@@ -2133,13 +1969,11 @@ export const LeaveRequest = {
|
|
2133
1969
|
},
|
2134
1970
|
|
2135
1971
|
fromJSON(object: any): LeaveRequest {
|
2136
|
-
|
2137
|
-
|
2138
|
-
|
2139
|
-
|
2140
|
-
|
2141
|
-
}
|
2142
|
-
return message;
|
1972
|
+
return {
|
1973
|
+
canReconnect: isSet(object.canReconnect)
|
1974
|
+
? Boolean(object.canReconnect)
|
1975
|
+
: false,
|
1976
|
+
};
|
2143
1977
|
},
|
2144
1978
|
|
2145
1979
|
toJSON(message: LeaveRequest): unknown {
|
@@ -2149,14 +1983,18 @@ export const LeaveRequest = {
|
|
2149
1983
|
return obj;
|
2150
1984
|
},
|
2151
1985
|
|
2152
|
-
fromPartial
|
2153
|
-
|
1986
|
+
fromPartial<I extends Exact<DeepPartial<LeaveRequest>, I>>(
|
1987
|
+
object: I
|
1988
|
+
): LeaveRequest {
|
1989
|
+
const message = createBaseLeaveRequest();
|
2154
1990
|
message.canReconnect = object.canReconnect ?? false;
|
2155
1991
|
return message;
|
2156
1992
|
},
|
2157
1993
|
};
|
2158
1994
|
|
2159
|
-
|
1995
|
+
function createBaseUpdateVideoLayers(): UpdateVideoLayers {
|
1996
|
+
return { trackSid: "", layers: [] };
|
1997
|
+
}
|
2160
1998
|
|
2161
1999
|
export const UpdateVideoLayers = {
|
2162
2000
|
encode(
|
@@ -2175,8 +2013,7 @@ export const UpdateVideoLayers = {
|
|
2175
2013
|
decode(input: _m0.Reader | Uint8Array, length?: number): UpdateVideoLayers {
|
2176
2014
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2177
2015
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2178
|
-
const message =
|
2179
|
-
message.layers = [];
|
2016
|
+
const message = createBaseUpdateVideoLayers();
|
2180
2017
|
while (reader.pos < end) {
|
2181
2018
|
const tag = reader.uint32();
|
2182
2019
|
switch (tag >>> 3) {
|
@@ -2195,19 +2032,12 @@ export const UpdateVideoLayers = {
|
|
2195
2032
|
},
|
2196
2033
|
|
2197
2034
|
fromJSON(object: any): UpdateVideoLayers {
|
2198
|
-
|
2199
|
-
|
2200
|
-
|
2201
|
-
|
2202
|
-
|
2203
|
-
|
2204
|
-
}
|
2205
|
-
if (object.layers !== undefined && object.layers !== null) {
|
2206
|
-
for (const e of object.layers) {
|
2207
|
-
message.layers.push(VideoLayer.fromJSON(e));
|
2208
|
-
}
|
2209
|
-
}
|
2210
|
-
return message;
|
2035
|
+
return {
|
2036
|
+
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
2037
|
+
layers: Array.isArray(object?.layers)
|
2038
|
+
? object.layers.map((e: any) => VideoLayer.fromJSON(e))
|
2039
|
+
: [],
|
2040
|
+
};
|
2211
2041
|
},
|
2212
2042
|
|
2213
2043
|
toJSON(message: UpdateVideoLayers): unknown {
|
@@ -2223,20 +2053,19 @@ export const UpdateVideoLayers = {
|
|
2223
2053
|
return obj;
|
2224
2054
|
},
|
2225
2055
|
|
2226
|
-
fromPartial
|
2227
|
-
|
2056
|
+
fromPartial<I extends Exact<DeepPartial<UpdateVideoLayers>, I>>(
|
2057
|
+
object: I
|
2058
|
+
): UpdateVideoLayers {
|
2059
|
+
const message = createBaseUpdateVideoLayers();
|
2228
2060
|
message.trackSid = object.trackSid ?? "";
|
2229
|
-
message.layers = [];
|
2230
|
-
if (object.layers !== undefined && object.layers !== null) {
|
2231
|
-
for (const e of object.layers) {
|
2232
|
-
message.layers.push(VideoLayer.fromPartial(e));
|
2233
|
-
}
|
2234
|
-
}
|
2061
|
+
message.layers = object.layers?.map((e) => VideoLayer.fromPartial(e)) || [];
|
2235
2062
|
return message;
|
2236
2063
|
},
|
2237
2064
|
};
|
2238
2065
|
|
2239
|
-
|
2066
|
+
function createBaseICEServer(): ICEServer {
|
2067
|
+
return { urls: [], username: "", credential: "" };
|
2068
|
+
}
|
2240
2069
|
|
2241
2070
|
export const ICEServer = {
|
2242
2071
|
encode(
|
@@ -2258,8 +2087,7 @@ export const ICEServer = {
|
|
2258
2087
|
decode(input: _m0.Reader | Uint8Array, length?: number): ICEServer {
|
2259
2088
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2260
2089
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2261
|
-
const message =
|
2262
|
-
message.urls = [];
|
2090
|
+
const message = createBaseICEServer();
|
2263
2091
|
while (reader.pos < end) {
|
2264
2092
|
const tag = reader.uint32();
|
2265
2093
|
switch (tag >>> 3) {
|
@@ -2281,24 +2109,13 @@ export const ICEServer = {
|
|
2281
2109
|
},
|
2282
2110
|
|
2283
2111
|
fromJSON(object: any): ICEServer {
|
2284
|
-
|
2285
|
-
|
2286
|
-
|
2287
|
-
|
2288
|
-
|
2289
|
-
|
2290
|
-
}
|
2291
|
-
if (object.username !== undefined && object.username !== null) {
|
2292
|
-
message.username = String(object.username);
|
2293
|
-
} else {
|
2294
|
-
message.username = "";
|
2295
|
-
}
|
2296
|
-
if (object.credential !== undefined && object.credential !== null) {
|
2297
|
-
message.credential = String(object.credential);
|
2298
|
-
} else {
|
2299
|
-
message.credential = "";
|
2300
|
-
}
|
2301
|
-
return message;
|
2112
|
+
return {
|
2113
|
+
urls: Array.isArray(object?.urls)
|
2114
|
+
? object.urls.map((e: any) => String(e))
|
2115
|
+
: [],
|
2116
|
+
username: isSet(object.username) ? String(object.username) : "",
|
2117
|
+
credential: isSet(object.credential) ? String(object.credential) : "",
|
2118
|
+
};
|
2302
2119
|
},
|
2303
2120
|
|
2304
2121
|
toJSON(message: ICEServer): unknown {
|
@@ -2313,21 +2130,20 @@ export const ICEServer = {
|
|
2313
2130
|
return obj;
|
2314
2131
|
},
|
2315
2132
|
|
2316
|
-
fromPartial
|
2317
|
-
|
2318
|
-
|
2319
|
-
|
2320
|
-
|
2321
|
-
message.urls.push(e);
|
2322
|
-
}
|
2323
|
-
}
|
2133
|
+
fromPartial<I extends Exact<DeepPartial<ICEServer>, I>>(
|
2134
|
+
object: I
|
2135
|
+
): ICEServer {
|
2136
|
+
const message = createBaseICEServer();
|
2137
|
+
message.urls = object.urls?.map((e) => e) || [];
|
2324
2138
|
message.username = object.username ?? "";
|
2325
2139
|
message.credential = object.credential ?? "";
|
2326
2140
|
return message;
|
2327
2141
|
},
|
2328
2142
|
};
|
2329
2143
|
|
2330
|
-
|
2144
|
+
function createBaseSpeakersChanged(): SpeakersChanged {
|
2145
|
+
return { speakers: [] };
|
2146
|
+
}
|
2331
2147
|
|
2332
2148
|
export const SpeakersChanged = {
|
2333
2149
|
encode(
|
@@ -2343,8 +2159,7 @@ export const SpeakersChanged = {
|
|
2343
2159
|
decode(input: _m0.Reader | Uint8Array, length?: number): SpeakersChanged {
|
2344
2160
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2345
2161
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2346
|
-
const message =
|
2347
|
-
message.speakers = [];
|
2162
|
+
const message = createBaseSpeakersChanged();
|
2348
2163
|
while (reader.pos < end) {
|
2349
2164
|
const tag = reader.uint32();
|
2350
2165
|
switch (tag >>> 3) {
|
@@ -2360,14 +2175,11 @@ export const SpeakersChanged = {
|
|
2360
2175
|
},
|
2361
2176
|
|
2362
2177
|
fromJSON(object: any): SpeakersChanged {
|
2363
|
-
|
2364
|
-
|
2365
|
-
|
2366
|
-
|
2367
|
-
|
2368
|
-
}
|
2369
|
-
}
|
2370
|
-
return message;
|
2178
|
+
return {
|
2179
|
+
speakers: Array.isArray(object?.speakers)
|
2180
|
+
? object.speakers.map((e: any) => SpeakerInfo.fromJSON(e))
|
2181
|
+
: [],
|
2182
|
+
};
|
2371
2183
|
},
|
2372
2184
|
|
2373
2185
|
toJSON(message: SpeakersChanged): unknown {
|
@@ -2382,19 +2194,19 @@ export const SpeakersChanged = {
|
|
2382
2194
|
return obj;
|
2383
2195
|
},
|
2384
2196
|
|
2385
|
-
fromPartial
|
2386
|
-
|
2387
|
-
|
2388
|
-
|
2389
|
-
|
2390
|
-
|
2391
|
-
}
|
2392
|
-
}
|
2197
|
+
fromPartial<I extends Exact<DeepPartial<SpeakersChanged>, I>>(
|
2198
|
+
object: I
|
2199
|
+
): SpeakersChanged {
|
2200
|
+
const message = createBaseSpeakersChanged();
|
2201
|
+
message.speakers =
|
2202
|
+
object.speakers?.map((e) => SpeakerInfo.fromPartial(e)) || [];
|
2393
2203
|
return message;
|
2394
2204
|
},
|
2395
2205
|
};
|
2396
2206
|
|
2397
|
-
|
2207
|
+
function createBaseRoomUpdate(): RoomUpdate {
|
2208
|
+
return { room: undefined };
|
2209
|
+
}
|
2398
2210
|
|
2399
2211
|
export const RoomUpdate = {
|
2400
2212
|
encode(
|
@@ -2410,7 +2222,7 @@ export const RoomUpdate = {
|
|
2410
2222
|
decode(input: _m0.Reader | Uint8Array, length?: number): RoomUpdate {
|
2411
2223
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2412
2224
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2413
|
-
const message =
|
2225
|
+
const message = createBaseRoomUpdate();
|
2414
2226
|
while (reader.pos < end) {
|
2415
2227
|
const tag = reader.uint32();
|
2416
2228
|
switch (tag >>> 3) {
|
@@ -2426,13 +2238,9 @@ export const RoomUpdate = {
|
|
2426
2238
|
},
|
2427
2239
|
|
2428
2240
|
fromJSON(object: any): RoomUpdate {
|
2429
|
-
|
2430
|
-
|
2431
|
-
|
2432
|
-
} else {
|
2433
|
-
message.room = undefined;
|
2434
|
-
}
|
2435
|
-
return message;
|
2241
|
+
return {
|
2242
|
+
room: isSet(object.room) ? Room.fromJSON(object.room) : undefined,
|
2243
|
+
};
|
2436
2244
|
},
|
2437
2245
|
|
2438
2246
|
toJSON(message: RoomUpdate): unknown {
|
@@ -2442,22 +2250,21 @@ export const RoomUpdate = {
|
|
2442
2250
|
return obj;
|
2443
2251
|
},
|
2444
2252
|
|
2445
|
-
fromPartial
|
2446
|
-
|
2447
|
-
|
2448
|
-
|
2449
|
-
|
2450
|
-
|
2451
|
-
|
2253
|
+
fromPartial<I extends Exact<DeepPartial<RoomUpdate>, I>>(
|
2254
|
+
object: I
|
2255
|
+
): RoomUpdate {
|
2256
|
+
const message = createBaseRoomUpdate();
|
2257
|
+
message.room =
|
2258
|
+
object.room !== undefined && object.room !== null
|
2259
|
+
? Room.fromPartial(object.room)
|
2260
|
+
: undefined;
|
2452
2261
|
return message;
|
2453
2262
|
},
|
2454
2263
|
};
|
2455
2264
|
|
2456
|
-
|
2457
|
-
participantSid: "",
|
2458
|
-
|
2459
|
-
score: 0,
|
2460
|
-
};
|
2265
|
+
function createBaseConnectionQualityInfo(): ConnectionQualityInfo {
|
2266
|
+
return { participantSid: "", quality: 0, score: 0 };
|
2267
|
+
}
|
2461
2268
|
|
2462
2269
|
export const ConnectionQualityInfo = {
|
2463
2270
|
encode(
|
@@ -2482,7 +2289,7 @@ export const ConnectionQualityInfo = {
|
|
2482
2289
|
): ConnectionQualityInfo {
|
2483
2290
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2484
2291
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2485
|
-
const message =
|
2292
|
+
const message = createBaseConnectionQualityInfo();
|
2486
2293
|
while (reader.pos < end) {
|
2487
2294
|
const tag = reader.uint32();
|
2488
2295
|
switch (tag >>> 3) {
|
@@ -2504,23 +2311,15 @@ export const ConnectionQualityInfo = {
|
|
2504
2311
|
},
|
2505
2312
|
|
2506
2313
|
fromJSON(object: any): ConnectionQualityInfo {
|
2507
|
-
|
2508
|
-
|
2509
|
-
|
2510
|
-
|
2511
|
-
|
2512
|
-
|
2513
|
-
|
2514
|
-
|
2515
|
-
}
|
2516
|
-
message.quality = 0;
|
2517
|
-
}
|
2518
|
-
if (object.score !== undefined && object.score !== null) {
|
2519
|
-
message.score = Number(object.score);
|
2520
|
-
} else {
|
2521
|
-
message.score = 0;
|
2522
|
-
}
|
2523
|
-
return message;
|
2314
|
+
return {
|
2315
|
+
participantSid: isSet(object.participantSid)
|
2316
|
+
? String(object.participantSid)
|
2317
|
+
: "",
|
2318
|
+
quality: isSet(object.quality)
|
2319
|
+
? connectionQualityFromJSON(object.quality)
|
2320
|
+
: 0,
|
2321
|
+
score: isSet(object.score) ? Number(object.score) : 0,
|
2322
|
+
};
|
2524
2323
|
},
|
2525
2324
|
|
2526
2325
|
toJSON(message: ConnectionQualityInfo): unknown {
|
@@ -2533,10 +2332,10 @@ export const ConnectionQualityInfo = {
|
|
2533
2332
|
return obj;
|
2534
2333
|
},
|
2535
2334
|
|
2536
|
-
fromPartial(
|
2537
|
-
object:
|
2335
|
+
fromPartial<I extends Exact<DeepPartial<ConnectionQualityInfo>, I>>(
|
2336
|
+
object: I
|
2538
2337
|
): ConnectionQualityInfo {
|
2539
|
-
const message =
|
2338
|
+
const message = createBaseConnectionQualityInfo();
|
2540
2339
|
message.participantSid = object.participantSid ?? "";
|
2541
2340
|
message.quality = object.quality ?? 0;
|
2542
2341
|
message.score = object.score ?? 0;
|
@@ -2544,7 +2343,9 @@ export const ConnectionQualityInfo = {
|
|
2544
2343
|
},
|
2545
2344
|
};
|
2546
2345
|
|
2547
|
-
|
2346
|
+
function createBaseConnectionQualityUpdate(): ConnectionQualityUpdate {
|
2347
|
+
return { updates: [] };
|
2348
|
+
}
|
2548
2349
|
|
2549
2350
|
export const ConnectionQualityUpdate = {
|
2550
2351
|
encode(
|
@@ -2563,10 +2364,7 @@ export const ConnectionQualityUpdate = {
|
|
2563
2364
|
): ConnectionQualityUpdate {
|
2564
2365
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2565
2366
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2566
|
-
const message =
|
2567
|
-
...baseConnectionQualityUpdate,
|
2568
|
-
} as ConnectionQualityUpdate;
|
2569
|
-
message.updates = [];
|
2367
|
+
const message = createBaseConnectionQualityUpdate();
|
2570
2368
|
while (reader.pos < end) {
|
2571
2369
|
const tag = reader.uint32();
|
2572
2370
|
switch (tag >>> 3) {
|
@@ -2584,16 +2382,11 @@ export const ConnectionQualityUpdate = {
|
|
2584
2382
|
},
|
2585
2383
|
|
2586
2384
|
fromJSON(object: any): ConnectionQualityUpdate {
|
2587
|
-
|
2588
|
-
|
2589
|
-
|
2590
|
-
|
2591
|
-
|
2592
|
-
for (const e of object.updates) {
|
2593
|
-
message.updates.push(ConnectionQualityInfo.fromJSON(e));
|
2594
|
-
}
|
2595
|
-
}
|
2596
|
-
return message;
|
2385
|
+
return {
|
2386
|
+
updates: Array.isArray(object?.updates)
|
2387
|
+
? object.updates.map((e: any) => ConnectionQualityInfo.fromJSON(e))
|
2388
|
+
: [],
|
2389
|
+
};
|
2597
2390
|
},
|
2598
2391
|
|
2599
2392
|
toJSON(message: ConnectionQualityUpdate): unknown {
|
@@ -2608,27 +2401,19 @@ export const ConnectionQualityUpdate = {
|
|
2608
2401
|
return obj;
|
2609
2402
|
},
|
2610
2403
|
|
2611
|
-
fromPartial(
|
2612
|
-
object:
|
2404
|
+
fromPartial<I extends Exact<DeepPartial<ConnectionQualityUpdate>, I>>(
|
2405
|
+
object: I
|
2613
2406
|
): ConnectionQualityUpdate {
|
2614
|
-
const message =
|
2615
|
-
|
2616
|
-
|
2617
|
-
message.updates = [];
|
2618
|
-
if (object.updates !== undefined && object.updates !== null) {
|
2619
|
-
for (const e of object.updates) {
|
2620
|
-
message.updates.push(ConnectionQualityInfo.fromPartial(e));
|
2621
|
-
}
|
2622
|
-
}
|
2407
|
+
const message = createBaseConnectionQualityUpdate();
|
2408
|
+
message.updates =
|
2409
|
+
object.updates?.map((e) => ConnectionQualityInfo.fromPartial(e)) || [];
|
2623
2410
|
return message;
|
2624
2411
|
},
|
2625
2412
|
};
|
2626
2413
|
|
2627
|
-
|
2628
|
-
participantSid: "",
|
2629
|
-
|
2630
|
-
state: 0,
|
2631
|
-
};
|
2414
|
+
function createBaseStreamStateInfo(): StreamStateInfo {
|
2415
|
+
return { participantSid: "", trackSid: "", state: 0 };
|
2416
|
+
}
|
2632
2417
|
|
2633
2418
|
export const StreamStateInfo = {
|
2634
2419
|
encode(
|
@@ -2650,7 +2435,7 @@ export const StreamStateInfo = {
|
|
2650
2435
|
decode(input: _m0.Reader | Uint8Array, length?: number): StreamStateInfo {
|
2651
2436
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2652
2437
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2653
|
-
const message =
|
2438
|
+
const message = createBaseStreamStateInfo();
|
2654
2439
|
while (reader.pos < end) {
|
2655
2440
|
const tag = reader.uint32();
|
2656
2441
|
switch (tag >>> 3) {
|
@@ -2672,23 +2457,13 @@ export const StreamStateInfo = {
|
|
2672
2457
|
},
|
2673
2458
|
|
2674
2459
|
fromJSON(object: any): StreamStateInfo {
|
2675
|
-
|
2676
|
-
|
2677
|
-
|
2678
|
-
|
2679
|
-
|
2680
|
-
|
2681
|
-
|
2682
|
-
message.trackSid = String(object.trackSid);
|
2683
|
-
} else {
|
2684
|
-
message.trackSid = "";
|
2685
|
-
}
|
2686
|
-
if (object.state !== undefined && object.state !== null) {
|
2687
|
-
message.state = streamStateFromJSON(object.state);
|
2688
|
-
} else {
|
2689
|
-
message.state = 0;
|
2690
|
-
}
|
2691
|
-
return message;
|
2460
|
+
return {
|
2461
|
+
participantSid: isSet(object.participantSid)
|
2462
|
+
? String(object.participantSid)
|
2463
|
+
: "",
|
2464
|
+
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
2465
|
+
state: isSet(object.state) ? streamStateFromJSON(object.state) : 0,
|
2466
|
+
};
|
2692
2467
|
},
|
2693
2468
|
|
2694
2469
|
toJSON(message: StreamStateInfo): unknown {
|
@@ -2701,8 +2476,10 @@ export const StreamStateInfo = {
|
|
2701
2476
|
return obj;
|
2702
2477
|
},
|
2703
2478
|
|
2704
|
-
fromPartial
|
2705
|
-
|
2479
|
+
fromPartial<I extends Exact<DeepPartial<StreamStateInfo>, I>>(
|
2480
|
+
object: I
|
2481
|
+
): StreamStateInfo {
|
2482
|
+
const message = createBaseStreamStateInfo();
|
2706
2483
|
message.participantSid = object.participantSid ?? "";
|
2707
2484
|
message.trackSid = object.trackSid ?? "";
|
2708
2485
|
message.state = object.state ?? 0;
|
@@ -2710,7 +2487,9 @@ export const StreamStateInfo = {
|
|
2710
2487
|
},
|
2711
2488
|
};
|
2712
2489
|
|
2713
|
-
|
2490
|
+
function createBaseStreamStateUpdate(): StreamStateUpdate {
|
2491
|
+
return { streamStates: [] };
|
2492
|
+
}
|
2714
2493
|
|
2715
2494
|
export const StreamStateUpdate = {
|
2716
2495
|
encode(
|
@@ -2726,8 +2505,7 @@ export const StreamStateUpdate = {
|
|
2726
2505
|
decode(input: _m0.Reader | Uint8Array, length?: number): StreamStateUpdate {
|
2727
2506
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2728
2507
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2729
|
-
const message =
|
2730
|
-
message.streamStates = [];
|
2508
|
+
const message = createBaseStreamStateUpdate();
|
2731
2509
|
while (reader.pos < end) {
|
2732
2510
|
const tag = reader.uint32();
|
2733
2511
|
switch (tag >>> 3) {
|
@@ -2745,14 +2523,11 @@ export const StreamStateUpdate = {
|
|
2745
2523
|
},
|
2746
2524
|
|
2747
2525
|
fromJSON(object: any): StreamStateUpdate {
|
2748
|
-
|
2749
|
-
|
2750
|
-
|
2751
|
-
|
2752
|
-
|
2753
|
-
}
|
2754
|
-
}
|
2755
|
-
return message;
|
2526
|
+
return {
|
2527
|
+
streamStates: Array.isArray(object?.streamStates)
|
2528
|
+
? object.streamStates.map((e: any) => StreamStateInfo.fromJSON(e))
|
2529
|
+
: [],
|
2530
|
+
};
|
2756
2531
|
},
|
2757
2532
|
|
2758
2533
|
toJSON(message: StreamStateUpdate): unknown {
|
@@ -2767,19 +2542,19 @@ export const StreamStateUpdate = {
|
|
2767
2542
|
return obj;
|
2768
2543
|
},
|
2769
2544
|
|
2770
|
-
fromPartial
|
2771
|
-
|
2772
|
-
|
2773
|
-
|
2774
|
-
|
2775
|
-
|
2776
|
-
}
|
2777
|
-
}
|
2545
|
+
fromPartial<I extends Exact<DeepPartial<StreamStateUpdate>, I>>(
|
2546
|
+
object: I
|
2547
|
+
): StreamStateUpdate {
|
2548
|
+
const message = createBaseStreamStateUpdate();
|
2549
|
+
message.streamStates =
|
2550
|
+
object.streamStates?.map((e) => StreamStateInfo.fromPartial(e)) || [];
|
2778
2551
|
return message;
|
2779
2552
|
},
|
2780
2553
|
};
|
2781
2554
|
|
2782
|
-
|
2555
|
+
function createBaseSubscribedQuality(): SubscribedQuality {
|
2556
|
+
return { quality: 0, enabled: false };
|
2557
|
+
}
|
2783
2558
|
|
2784
2559
|
export const SubscribedQuality = {
|
2785
2560
|
encode(
|
@@ -2798,7 +2573,7 @@ export const SubscribedQuality = {
|
|
2798
2573
|
decode(input: _m0.Reader | Uint8Array, length?: number): SubscribedQuality {
|
2799
2574
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2800
2575
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2801
|
-
const message =
|
2576
|
+
const message = createBaseSubscribedQuality();
|
2802
2577
|
while (reader.pos < end) {
|
2803
2578
|
const tag = reader.uint32();
|
2804
2579
|
switch (tag >>> 3) {
|
@@ -2817,18 +2592,10 @@ export const SubscribedQuality = {
|
|
2817
2592
|
},
|
2818
2593
|
|
2819
2594
|
fromJSON(object: any): SubscribedQuality {
|
2820
|
-
|
2821
|
-
|
2822
|
-
|
2823
|
-
}
|
2824
|
-
message.quality = 0;
|
2825
|
-
}
|
2826
|
-
if (object.enabled !== undefined && object.enabled !== null) {
|
2827
|
-
message.enabled = Boolean(object.enabled);
|
2828
|
-
} else {
|
2829
|
-
message.enabled = false;
|
2830
|
-
}
|
2831
|
-
return message;
|
2595
|
+
return {
|
2596
|
+
quality: isSet(object.quality) ? videoQualityFromJSON(object.quality) : 0,
|
2597
|
+
enabled: isSet(object.enabled) ? Boolean(object.enabled) : false,
|
2598
|
+
};
|
2832
2599
|
},
|
2833
2600
|
|
2834
2601
|
toJSON(message: SubscribedQuality): unknown {
|
@@ -2839,15 +2606,19 @@ export const SubscribedQuality = {
|
|
2839
2606
|
return obj;
|
2840
2607
|
},
|
2841
2608
|
|
2842
|
-
fromPartial
|
2843
|
-
|
2609
|
+
fromPartial<I extends Exact<DeepPartial<SubscribedQuality>, I>>(
|
2610
|
+
object: I
|
2611
|
+
): SubscribedQuality {
|
2612
|
+
const message = createBaseSubscribedQuality();
|
2844
2613
|
message.quality = object.quality ?? 0;
|
2845
2614
|
message.enabled = object.enabled ?? false;
|
2846
2615
|
return message;
|
2847
2616
|
},
|
2848
2617
|
};
|
2849
2618
|
|
2850
|
-
|
2619
|
+
function createBaseSubscribedQualityUpdate(): SubscribedQualityUpdate {
|
2620
|
+
return { trackSid: "", subscribedQualities: [] };
|
2621
|
+
}
|
2851
2622
|
|
2852
2623
|
export const SubscribedQualityUpdate = {
|
2853
2624
|
encode(
|
@@ -2869,10 +2640,7 @@ export const SubscribedQualityUpdate = {
|
|
2869
2640
|
): SubscribedQualityUpdate {
|
2870
2641
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2871
2642
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2872
|
-
const message =
|
2873
|
-
...baseSubscribedQualityUpdate,
|
2874
|
-
} as SubscribedQualityUpdate;
|
2875
|
-
message.subscribedQualities = [];
|
2643
|
+
const message = createBaseSubscribedQualityUpdate();
|
2876
2644
|
while (reader.pos < end) {
|
2877
2645
|
const tag = reader.uint32();
|
2878
2646
|
switch (tag >>> 3) {
|
@@ -2893,24 +2661,14 @@ export const SubscribedQualityUpdate = {
|
|
2893
2661
|
},
|
2894
2662
|
|
2895
2663
|
fromJSON(object: any): SubscribedQualityUpdate {
|
2896
|
-
|
2897
|
-
|
2898
|
-
|
2899
|
-
|
2900
|
-
|
2901
|
-
|
2902
|
-
|
2903
|
-
|
2904
|
-
}
|
2905
|
-
if (
|
2906
|
-
object.subscribedQualities !== undefined &&
|
2907
|
-
object.subscribedQualities !== null
|
2908
|
-
) {
|
2909
|
-
for (const e of object.subscribedQualities) {
|
2910
|
-
message.subscribedQualities.push(SubscribedQuality.fromJSON(e));
|
2911
|
-
}
|
2912
|
-
}
|
2913
|
-
return message;
|
2664
|
+
return {
|
2665
|
+
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
2666
|
+
subscribedQualities: Array.isArray(object?.subscribedQualities)
|
2667
|
+
? object.subscribedQualities.map((e: any) =>
|
2668
|
+
SubscribedQuality.fromJSON(e)
|
2669
|
+
)
|
2670
|
+
: [],
|
2671
|
+
};
|
2914
2672
|
},
|
2915
2673
|
|
2916
2674
|
toJSON(message: SubscribedQualityUpdate): unknown {
|
@@ -2926,31 +2684,22 @@ export const SubscribedQualityUpdate = {
|
|
2926
2684
|
return obj;
|
2927
2685
|
},
|
2928
2686
|
|
2929
|
-
fromPartial(
|
2930
|
-
object:
|
2687
|
+
fromPartial<I extends Exact<DeepPartial<SubscribedQualityUpdate>, I>>(
|
2688
|
+
object: I
|
2931
2689
|
): SubscribedQualityUpdate {
|
2932
|
-
const message =
|
2933
|
-
...baseSubscribedQualityUpdate,
|
2934
|
-
} as SubscribedQualityUpdate;
|
2690
|
+
const message = createBaseSubscribedQualityUpdate();
|
2935
2691
|
message.trackSid = object.trackSid ?? "";
|
2936
|
-
message.subscribedQualities =
|
2937
|
-
|
2938
|
-
|
2939
|
-
|
2940
|
-
) {
|
2941
|
-
for (const e of object.subscribedQualities) {
|
2942
|
-
message.subscribedQualities.push(SubscribedQuality.fromPartial(e));
|
2943
|
-
}
|
2944
|
-
}
|
2692
|
+
message.subscribedQualities =
|
2693
|
+
object.subscribedQualities?.map((e) =>
|
2694
|
+
SubscribedQuality.fromPartial(e)
|
2695
|
+
) || [];
|
2945
2696
|
return message;
|
2946
2697
|
},
|
2947
2698
|
};
|
2948
2699
|
|
2949
|
-
|
2950
|
-
participantSid: "",
|
2951
|
-
|
2952
|
-
trackSids: "",
|
2953
|
-
};
|
2700
|
+
function createBaseTrackPermission(): TrackPermission {
|
2701
|
+
return { participantSid: "", allTracks: false, trackSids: [] };
|
2702
|
+
}
|
2954
2703
|
|
2955
2704
|
export const TrackPermission = {
|
2956
2705
|
encode(
|
@@ -2972,8 +2721,7 @@ export const TrackPermission = {
|
|
2972
2721
|
decode(input: _m0.Reader | Uint8Array, length?: number): TrackPermission {
|
2973
2722
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2974
2723
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2975
|
-
const message =
|
2976
|
-
message.trackSids = [];
|
2724
|
+
const message = createBaseTrackPermission();
|
2977
2725
|
while (reader.pos < end) {
|
2978
2726
|
const tag = reader.uint32();
|
2979
2727
|
switch (tag >>> 3) {
|
@@ -2995,24 +2743,15 @@ export const TrackPermission = {
|
|
2995
2743
|
},
|
2996
2744
|
|
2997
2745
|
fromJSON(object: any): TrackPermission {
|
2998
|
-
|
2999
|
-
|
3000
|
-
|
3001
|
-
|
3002
|
-
|
3003
|
-
|
3004
|
-
|
3005
|
-
|
3006
|
-
|
3007
|
-
} else {
|
3008
|
-
message.allTracks = false;
|
3009
|
-
}
|
3010
|
-
if (object.trackSids !== undefined && object.trackSids !== null) {
|
3011
|
-
for (const e of object.trackSids) {
|
3012
|
-
message.trackSids.push(String(e));
|
3013
|
-
}
|
3014
|
-
}
|
3015
|
-
return message;
|
2746
|
+
return {
|
2747
|
+
participantSid: isSet(object.participantSid)
|
2748
|
+
? String(object.participantSid)
|
2749
|
+
: "",
|
2750
|
+
allTracks: isSet(object.allTracks) ? Boolean(object.allTracks) : false,
|
2751
|
+
trackSids: Array.isArray(object?.trackSids)
|
2752
|
+
? object.trackSids.map((e: any) => String(e))
|
2753
|
+
: [],
|
2754
|
+
};
|
3016
2755
|
},
|
3017
2756
|
|
3018
2757
|
toJSON(message: TrackPermission): unknown {
|
@@ -3028,21 +2767,20 @@ export const TrackPermission = {
|
|
3028
2767
|
return obj;
|
3029
2768
|
},
|
3030
2769
|
|
3031
|
-
fromPartial
|
3032
|
-
|
2770
|
+
fromPartial<I extends Exact<DeepPartial<TrackPermission>, I>>(
|
2771
|
+
object: I
|
2772
|
+
): TrackPermission {
|
2773
|
+
const message = createBaseTrackPermission();
|
3033
2774
|
message.participantSid = object.participantSid ?? "";
|
3034
2775
|
message.allTracks = object.allTracks ?? false;
|
3035
|
-
message.trackSids = [];
|
3036
|
-
if (object.trackSids !== undefined && object.trackSids !== null) {
|
3037
|
-
for (const e of object.trackSids) {
|
3038
|
-
message.trackSids.push(e);
|
3039
|
-
}
|
3040
|
-
}
|
2776
|
+
message.trackSids = object.trackSids?.map((e) => e) || [];
|
3041
2777
|
return message;
|
3042
2778
|
},
|
3043
2779
|
};
|
3044
2780
|
|
3045
|
-
|
2781
|
+
function createBaseSubscriptionPermission(): SubscriptionPermission {
|
2782
|
+
return { allParticipants: false, trackPermissions: [] };
|
2783
|
+
}
|
3046
2784
|
|
3047
2785
|
export const SubscriptionPermission = {
|
3048
2786
|
encode(
|
@@ -3064,8 +2802,7 @@ export const SubscriptionPermission = {
|
|
3064
2802
|
): SubscriptionPermission {
|
3065
2803
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
3066
2804
|
let end = length === undefined ? reader.len : reader.pos + length;
|
3067
|
-
const message =
|
3068
|
-
message.trackPermissions = [];
|
2805
|
+
const message = createBaseSubscriptionPermission();
|
3069
2806
|
while (reader.pos < end) {
|
3070
2807
|
const tag = reader.uint32();
|
3071
2808
|
switch (tag >>> 3) {
|
@@ -3086,25 +2823,14 @@ export const SubscriptionPermission = {
|
|
3086
2823
|
},
|
3087
2824
|
|
3088
2825
|
fromJSON(object: any): SubscriptionPermission {
|
3089
|
-
|
3090
|
-
|
3091
|
-
|
3092
|
-
|
3093
|
-
object
|
3094
|
-
|
3095
|
-
|
3096
|
-
}
|
3097
|
-
message.allParticipants = false;
|
3098
|
-
}
|
3099
|
-
if (
|
3100
|
-
object.trackPermissions !== undefined &&
|
3101
|
-
object.trackPermissions !== null
|
3102
|
-
) {
|
3103
|
-
for (const e of object.trackPermissions) {
|
3104
|
-
message.trackPermissions.push(TrackPermission.fromJSON(e));
|
3105
|
-
}
|
3106
|
-
}
|
3107
|
-
return message;
|
2826
|
+
return {
|
2827
|
+
allParticipants: isSet(object.allParticipants)
|
2828
|
+
? Boolean(object.allParticipants)
|
2829
|
+
: false,
|
2830
|
+
trackPermissions: Array.isArray(object?.trackPermissions)
|
2831
|
+
? object.trackPermissions.map((e: any) => TrackPermission.fromJSON(e))
|
2832
|
+
: [],
|
2833
|
+
};
|
3108
2834
|
},
|
3109
2835
|
|
3110
2836
|
toJSON(message: SubscriptionPermission): unknown {
|
@@ -3121,29 +2847,20 @@ export const SubscriptionPermission = {
|
|
3121
2847
|
return obj;
|
3122
2848
|
},
|
3123
2849
|
|
3124
|
-
fromPartial(
|
3125
|
-
object:
|
2850
|
+
fromPartial<I extends Exact<DeepPartial<SubscriptionPermission>, I>>(
|
2851
|
+
object: I
|
3126
2852
|
): SubscriptionPermission {
|
3127
|
-
const message =
|
2853
|
+
const message = createBaseSubscriptionPermission();
|
3128
2854
|
message.allParticipants = object.allParticipants ?? false;
|
3129
|
-
message.trackPermissions =
|
3130
|
-
|
3131
|
-
object.trackPermissions !== undefined &&
|
3132
|
-
object.trackPermissions !== null
|
3133
|
-
) {
|
3134
|
-
for (const e of object.trackPermissions) {
|
3135
|
-
message.trackPermissions.push(TrackPermission.fromPartial(e));
|
3136
|
-
}
|
3137
|
-
}
|
2855
|
+
message.trackPermissions =
|
2856
|
+
object.trackPermissions?.map((e) => TrackPermission.fromPartial(e)) || [];
|
3138
2857
|
return message;
|
3139
2858
|
},
|
3140
2859
|
};
|
3141
2860
|
|
3142
|
-
|
3143
|
-
participantSid: "",
|
3144
|
-
|
3145
|
-
allowed: false,
|
3146
|
-
};
|
2861
|
+
function createBaseSubscriptionPermissionUpdate(): SubscriptionPermissionUpdate {
|
2862
|
+
return { participantSid: "", trackSid: "", allowed: false };
|
2863
|
+
}
|
3147
2864
|
|
3148
2865
|
export const SubscriptionPermissionUpdate = {
|
3149
2866
|
encode(
|
@@ -3168,9 +2885,7 @@ export const SubscriptionPermissionUpdate = {
|
|
3168
2885
|
): SubscriptionPermissionUpdate {
|
3169
2886
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
3170
2887
|
let end = length === undefined ? reader.len : reader.pos + length;
|
3171
|
-
const message =
|
3172
|
-
...baseSubscriptionPermissionUpdate,
|
3173
|
-
} as SubscriptionPermissionUpdate;
|
2888
|
+
const message = createBaseSubscriptionPermissionUpdate();
|
3174
2889
|
while (reader.pos < end) {
|
3175
2890
|
const tag = reader.uint32();
|
3176
2891
|
switch (tag >>> 3) {
|
@@ -3192,25 +2907,13 @@ export const SubscriptionPermissionUpdate = {
|
|
3192
2907
|
},
|
3193
2908
|
|
3194
2909
|
fromJSON(object: any): SubscriptionPermissionUpdate {
|
3195
|
-
|
3196
|
-
|
3197
|
-
|
3198
|
-
|
3199
|
-
|
3200
|
-
|
3201
|
-
|
3202
|
-
}
|
3203
|
-
if (object.trackSid !== undefined && object.trackSid !== null) {
|
3204
|
-
message.trackSid = String(object.trackSid);
|
3205
|
-
} else {
|
3206
|
-
message.trackSid = "";
|
3207
|
-
}
|
3208
|
-
if (object.allowed !== undefined && object.allowed !== null) {
|
3209
|
-
message.allowed = Boolean(object.allowed);
|
3210
|
-
} else {
|
3211
|
-
message.allowed = false;
|
3212
|
-
}
|
3213
|
-
return message;
|
2910
|
+
return {
|
2911
|
+
participantSid: isSet(object.participantSid)
|
2912
|
+
? String(object.participantSid)
|
2913
|
+
: "",
|
2914
|
+
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
2915
|
+
allowed: isSet(object.allowed) ? Boolean(object.allowed) : false,
|
2916
|
+
};
|
3214
2917
|
},
|
3215
2918
|
|
3216
2919
|
toJSON(message: SubscriptionPermissionUpdate): unknown {
|
@@ -3222,12 +2925,10 @@ export const SubscriptionPermissionUpdate = {
|
|
3222
2925
|
return obj;
|
3223
2926
|
},
|
3224
2927
|
|
3225
|
-
fromPartial(
|
3226
|
-
object:
|
2928
|
+
fromPartial<I extends Exact<DeepPartial<SubscriptionPermissionUpdate>, I>>(
|
2929
|
+
object: I
|
3227
2930
|
): SubscriptionPermissionUpdate {
|
3228
|
-
const message =
|
3229
|
-
...baseSubscriptionPermissionUpdate,
|
3230
|
-
} as SubscriptionPermissionUpdate;
|
2931
|
+
const message = createBaseSubscriptionPermissionUpdate();
|
3231
2932
|
message.participantSid = object.participantSid ?? "";
|
3232
2933
|
message.trackSid = object.trackSid ?? "";
|
3233
2934
|
message.allowed = object.allowed ?? false;
|
@@ -3235,7 +2936,14 @@ export const SubscriptionPermissionUpdate = {
|
|
3235
2936
|
},
|
3236
2937
|
};
|
3237
2938
|
|
3238
|
-
|
2939
|
+
function createBaseSyncState(): SyncState {
|
2940
|
+
return {
|
2941
|
+
answer: undefined,
|
2942
|
+
subscription: undefined,
|
2943
|
+
publishTracks: [],
|
2944
|
+
dataChannels: [],
|
2945
|
+
};
|
2946
|
+
}
|
3239
2947
|
|
3240
2948
|
export const SyncState = {
|
3241
2949
|
encode(
|
@@ -3266,9 +2974,7 @@ export const SyncState = {
|
|
3266
2974
|
decode(input: _m0.Reader | Uint8Array, length?: number): SyncState {
|
3267
2975
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
3268
2976
|
let end = length === undefined ? reader.len : reader.pos + length;
|
3269
|
-
const message =
|
3270
|
-
message.publishTracks = [];
|
3271
|
-
message.dataChannels = [];
|
2977
|
+
const message = createBaseSyncState();
|
3272
2978
|
while (reader.pos < end) {
|
3273
2979
|
const tag = reader.uint32();
|
3274
2980
|
switch (tag >>> 3) {
|
@@ -3300,30 +3006,22 @@ export const SyncState = {
|
|
3300
3006
|
},
|
3301
3007
|
|
3302
3008
|
fromJSON(object: any): SyncState {
|
3303
|
-
|
3304
|
-
|
3305
|
-
|
3306
|
-
|
3307
|
-
|
3308
|
-
|
3309
|
-
|
3310
|
-
|
3311
|
-
|
3312
|
-
|
3313
|
-
|
3314
|
-
|
3315
|
-
|
3316
|
-
|
3317
|
-
|
3318
|
-
|
3319
|
-
}
|
3320
|
-
}
|
3321
|
-
if (object.dataChannels !== undefined && object.dataChannels !== null) {
|
3322
|
-
for (const e of object.dataChannels) {
|
3323
|
-
message.dataChannels.push(DataChannelInfo.fromJSON(e));
|
3324
|
-
}
|
3325
|
-
}
|
3326
|
-
return message;
|
3009
|
+
return {
|
3010
|
+
answer: isSet(object.answer)
|
3011
|
+
? SessionDescription.fromJSON(object.answer)
|
3012
|
+
: undefined,
|
3013
|
+
subscription: isSet(object.subscription)
|
3014
|
+
? UpdateSubscription.fromJSON(object.subscription)
|
3015
|
+
: undefined,
|
3016
|
+
publishTracks: Array.isArray(object?.publishTracks)
|
3017
|
+
? object.publishTracks.map((e: any) =>
|
3018
|
+
TrackPublishedResponse.fromJSON(e)
|
3019
|
+
)
|
3020
|
+
: [],
|
3021
|
+
dataChannels: Array.isArray(object?.dataChannels)
|
3022
|
+
? object.dataChannels.map((e: any) => DataChannelInfo.fromJSON(e))
|
3023
|
+
: [],
|
3024
|
+
};
|
3327
3025
|
},
|
3328
3026
|
|
3329
3027
|
toJSON(message: SyncState): unknown {
|
@@ -3353,37 +3051,30 @@ export const SyncState = {
|
|
3353
3051
|
return obj;
|
3354
3052
|
},
|
3355
3053
|
|
3356
|
-
fromPartial
|
3357
|
-
|
3358
|
-
|
3359
|
-
|
3360
|
-
|
3361
|
-
|
3362
|
-
|
3363
|
-
|
3364
|
-
|
3365
|
-
|
3366
|
-
|
3367
|
-
|
3368
|
-
|
3369
|
-
|
3370
|
-
|
3371
|
-
|
3372
|
-
|
3373
|
-
message.publishTracks.push(TrackPublishedResponse.fromPartial(e));
|
3374
|
-
}
|
3375
|
-
}
|
3376
|
-
message.dataChannels = [];
|
3377
|
-
if (object.dataChannels !== undefined && object.dataChannels !== null) {
|
3378
|
-
for (const e of object.dataChannels) {
|
3379
|
-
message.dataChannels.push(DataChannelInfo.fromPartial(e));
|
3380
|
-
}
|
3381
|
-
}
|
3054
|
+
fromPartial<I extends Exact<DeepPartial<SyncState>, I>>(
|
3055
|
+
object: I
|
3056
|
+
): SyncState {
|
3057
|
+
const message = createBaseSyncState();
|
3058
|
+
message.answer =
|
3059
|
+
object.answer !== undefined && object.answer !== null
|
3060
|
+
? SessionDescription.fromPartial(object.answer)
|
3061
|
+
: undefined;
|
3062
|
+
message.subscription =
|
3063
|
+
object.subscription !== undefined && object.subscription !== null
|
3064
|
+
? UpdateSubscription.fromPartial(object.subscription)
|
3065
|
+
: undefined;
|
3066
|
+
message.publishTracks =
|
3067
|
+
object.publishTracks?.map((e) => TrackPublishedResponse.fromPartial(e)) ||
|
3068
|
+
[];
|
3069
|
+
message.dataChannels =
|
3070
|
+
object.dataChannels?.map((e) => DataChannelInfo.fromPartial(e)) || [];
|
3382
3071
|
return message;
|
3383
3072
|
},
|
3384
3073
|
};
|
3385
3074
|
|
3386
|
-
|
3075
|
+
function createBaseDataChannelInfo(): DataChannelInfo {
|
3076
|
+
return { label: "", id: 0 };
|
3077
|
+
}
|
3387
3078
|
|
3388
3079
|
export const DataChannelInfo = {
|
3389
3080
|
encode(
|
@@ -3402,7 +3093,7 @@ export const DataChannelInfo = {
|
|
3402
3093
|
decode(input: _m0.Reader | Uint8Array, length?: number): DataChannelInfo {
|
3403
3094
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
3404
3095
|
let end = length === undefined ? reader.len : reader.pos + length;
|
3405
|
-
const message =
|
3096
|
+
const message = createBaseDataChannelInfo();
|
3406
3097
|
while (reader.pos < end) {
|
3407
3098
|
const tag = reader.uint32();
|
3408
3099
|
switch (tag >>> 3) {
|
@@ -3421,36 +3112,37 @@ export const DataChannelInfo = {
|
|
3421
3112
|
},
|
3422
3113
|
|
3423
3114
|
fromJSON(object: any): DataChannelInfo {
|
3424
|
-
|
3425
|
-
|
3426
|
-
|
3427
|
-
}
|
3428
|
-
message.label = "";
|
3429
|
-
}
|
3430
|
-
if (object.id !== undefined && object.id !== null) {
|
3431
|
-
message.id = Number(object.id);
|
3432
|
-
} else {
|
3433
|
-
message.id = 0;
|
3434
|
-
}
|
3435
|
-
return message;
|
3115
|
+
return {
|
3116
|
+
label: isSet(object.label) ? String(object.label) : "",
|
3117
|
+
id: isSet(object.id) ? Number(object.id) : 0,
|
3118
|
+
};
|
3436
3119
|
},
|
3437
3120
|
|
3438
3121
|
toJSON(message: DataChannelInfo): unknown {
|
3439
3122
|
const obj: any = {};
|
3440
3123
|
message.label !== undefined && (obj.label = message.label);
|
3441
|
-
message.id !== undefined && (obj.id = message.id);
|
3124
|
+
message.id !== undefined && (obj.id = Math.round(message.id));
|
3442
3125
|
return obj;
|
3443
3126
|
},
|
3444
3127
|
|
3445
|
-
fromPartial
|
3446
|
-
|
3128
|
+
fromPartial<I extends Exact<DeepPartial<DataChannelInfo>, I>>(
|
3129
|
+
object: I
|
3130
|
+
): DataChannelInfo {
|
3131
|
+
const message = createBaseDataChannelInfo();
|
3447
3132
|
message.label = object.label ?? "";
|
3448
3133
|
message.id = object.id ?? 0;
|
3449
3134
|
return message;
|
3450
3135
|
},
|
3451
3136
|
};
|
3452
3137
|
|
3453
|
-
|
3138
|
+
function createBaseSimulateScenario(): SimulateScenario {
|
3139
|
+
return {
|
3140
|
+
speakerUpdate: undefined,
|
3141
|
+
nodeFailure: undefined,
|
3142
|
+
migration: undefined,
|
3143
|
+
serverLeave: undefined,
|
3144
|
+
};
|
3145
|
+
}
|
3454
3146
|
|
3455
3147
|
export const SimulateScenario = {
|
3456
3148
|
encode(
|
@@ -3475,7 +3167,7 @@ export const SimulateScenario = {
|
|
3475
3167
|
decode(input: _m0.Reader | Uint8Array, length?: number): SimulateScenario {
|
3476
3168
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
3477
3169
|
let end = length === undefined ? reader.len : reader.pos + length;
|
3478
|
-
const message =
|
3170
|
+
const message = createBaseSimulateScenario();
|
3479
3171
|
while (reader.pos < end) {
|
3480
3172
|
const tag = reader.uint32();
|
3481
3173
|
switch (tag >>> 3) {
|
@@ -3500,34 +3192,26 @@ export const SimulateScenario = {
|
|
3500
3192
|
},
|
3501
3193
|
|
3502
3194
|
fromJSON(object: any): SimulateScenario {
|
3503
|
-
|
3504
|
-
|
3505
|
-
|
3506
|
-
|
3507
|
-
|
3508
|
-
|
3509
|
-
|
3510
|
-
|
3511
|
-
|
3512
|
-
|
3513
|
-
|
3514
|
-
|
3515
|
-
|
3516
|
-
}
|
3517
|
-
message.migration = undefined;
|
3518
|
-
}
|
3519
|
-
if (object.serverLeave !== undefined && object.serverLeave !== null) {
|
3520
|
-
message.serverLeave = Boolean(object.serverLeave);
|
3521
|
-
} else {
|
3522
|
-
message.serverLeave = undefined;
|
3523
|
-
}
|
3524
|
-
return message;
|
3195
|
+
return {
|
3196
|
+
speakerUpdate: isSet(object.speakerUpdate)
|
3197
|
+
? Number(object.speakerUpdate)
|
3198
|
+
: undefined,
|
3199
|
+
nodeFailure: isSet(object.nodeFailure)
|
3200
|
+
? Boolean(object.nodeFailure)
|
3201
|
+
: undefined,
|
3202
|
+
migration: isSet(object.migration)
|
3203
|
+
? Boolean(object.migration)
|
3204
|
+
: undefined,
|
3205
|
+
serverLeave: isSet(object.serverLeave)
|
3206
|
+
? Boolean(object.serverLeave)
|
3207
|
+
: undefined,
|
3208
|
+
};
|
3525
3209
|
},
|
3526
3210
|
|
3527
3211
|
toJSON(message: SimulateScenario): unknown {
|
3528
3212
|
const obj: any = {};
|
3529
3213
|
message.speakerUpdate !== undefined &&
|
3530
|
-
(obj.speakerUpdate = message.speakerUpdate);
|
3214
|
+
(obj.speakerUpdate = Math.round(message.speakerUpdate));
|
3531
3215
|
message.nodeFailure !== undefined &&
|
3532
3216
|
(obj.nodeFailure = message.nodeFailure);
|
3533
3217
|
message.migration !== undefined && (obj.migration = message.migration);
|
@@ -3536,8 +3220,10 @@ export const SimulateScenario = {
|
|
3536
3220
|
return obj;
|
3537
3221
|
},
|
3538
3222
|
|
3539
|
-
fromPartial
|
3540
|
-
|
3223
|
+
fromPartial<I extends Exact<DeepPartial<SimulateScenario>, I>>(
|
3224
|
+
object: I
|
3225
|
+
): SimulateScenario {
|
3226
|
+
const message = createBaseSimulateScenario();
|
3541
3227
|
message.speakerUpdate = object.speakerUpdate ?? undefined;
|
3542
3228
|
message.nodeFailure = object.nodeFailure ?? undefined;
|
3543
3229
|
message.migration = object.migration ?? undefined;
|
@@ -3554,6 +3240,7 @@ type Builtin =
|
|
3554
3240
|
| number
|
3555
3241
|
| boolean
|
3556
3242
|
| undefined;
|
3243
|
+
|
3557
3244
|
export type DeepPartial<T> = T extends Builtin
|
3558
3245
|
? T
|
3559
3246
|
: T extends Array<infer U>
|
@@ -3564,7 +3251,19 @@ export type DeepPartial<T> = T extends Builtin
|
|
3564
3251
|
? { [K in keyof T]?: DeepPartial<T[K]> }
|
3565
3252
|
: Partial<T>;
|
3566
3253
|
|
3254
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
3255
|
+
export type Exact<P, I extends P> = P extends Builtin
|
3256
|
+
? P
|
3257
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & Record<
|
3258
|
+
Exclude<keyof I, KeysOfUnion<P>>,
|
3259
|
+
never
|
3260
|
+
>;
|
3261
|
+
|
3567
3262
|
if (_m0.util.Long !== Long) {
|
3568
3263
|
_m0.util.Long = Long as any;
|
3569
3264
|
_m0.configure();
|
3570
3265
|
}
|
3266
|
+
|
3267
|
+
function isSet(value: any): boolean {
|
3268
|
+
return value !== null && value !== undefined;
|
3269
|
+
}
|