livekit-client 0.17.4 → 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/proto/google/protobuf/timestamp.d.ts +12 -2
- package/dist/proto/google/protobuf/timestamp.js +40 -25
- package/dist/proto/google/protobuf/timestamp.js.map +1 -1
- package/dist/proto/livekit_models.d.ts +521 -17
- package/dist/proto/livekit_models.js +562 -988
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_rtc.d.ts +3405 -30
- package/dist/proto/livekit_rtc.js +782 -1233
- package/dist/proto/livekit_rtc.js.map +1 -1
- package/dist/room/Room.js +8 -0
- package/dist/room/Room.js.map +1 -1
- package/dist/room/track/options.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
- package/src/proto/google/protobuf/timestamp.ts +29 -19
- package/src/proto/livekit_models.ts +536 -879
- package/src/proto/livekit_rtc.ts +766 -1174
- package/src/room/Room.ts +8 -0
- package/src/room/track/options.ts +1 -1
- package/src/version.ts +1 -1
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,
|
@@ -334,7 +334,22 @@ export interface SimulateScenario {
|
|
334
334
|
serverLeave: boolean | undefined;
|
335
335
|
}
|
336
336
|
|
337
|
-
|
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
|
+
}
|
338
353
|
|
339
354
|
export const SignalRequest = {
|
340
355
|
encode(
|
@@ -407,7 +422,7 @@ export const SignalRequest = {
|
|
407
422
|
decode(input: _m0.Reader | Uint8Array, length?: number): SignalRequest {
|
408
423
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
409
424
|
let end = length === undefined ? reader.len : reader.pos + length;
|
410
|
-
const message =
|
425
|
+
const message = createBaseSignalRequest();
|
411
426
|
while (reader.pos < end) {
|
412
427
|
const tag = reader.uint32();
|
413
428
|
switch (tag >>> 3) {
|
@@ -468,73 +483,44 @@ export const SignalRequest = {
|
|
468
483
|
},
|
469
484
|
|
470
485
|
fromJSON(object: any): SignalRequest {
|
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
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
} else {
|
510
|
-
message.leave = undefined;
|
511
|
-
}
|
512
|
-
if (object.updateLayers !== undefined && object.updateLayers !== null) {
|
513
|
-
message.updateLayers = UpdateVideoLayers.fromJSON(object.updateLayers);
|
514
|
-
} else {
|
515
|
-
message.updateLayers = undefined;
|
516
|
-
}
|
517
|
-
if (
|
518
|
-
object.subscriptionPermission !== undefined &&
|
519
|
-
object.subscriptionPermission !== null
|
520
|
-
) {
|
521
|
-
message.subscriptionPermission = SubscriptionPermission.fromJSON(
|
522
|
-
object.subscriptionPermission
|
523
|
-
);
|
524
|
-
} else {
|
525
|
-
message.subscriptionPermission = undefined;
|
526
|
-
}
|
527
|
-
if (object.syncState !== undefined && object.syncState !== null) {
|
528
|
-
message.syncState = SyncState.fromJSON(object.syncState);
|
529
|
-
} else {
|
530
|
-
message.syncState = undefined;
|
531
|
-
}
|
532
|
-
if (object.simulate !== undefined && object.simulate !== null) {
|
533
|
-
message.simulate = SimulateScenario.fromJSON(object.simulate);
|
534
|
-
} else {
|
535
|
-
message.simulate = undefined;
|
536
|
-
}
|
537
|
-
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
|
+
};
|
538
524
|
},
|
539
525
|
|
540
526
|
toJSON(message: SignalRequest): unknown {
|
@@ -590,82 +576,83 @@ export const SignalRequest = {
|
|
590
576
|
return obj;
|
591
577
|
},
|
592
578
|
|
593
|
-
fromPartial
|
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
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
if (object.leave !== undefined && object.leave !== null) {
|
635
|
-
message.leave = LeaveRequest.fromPartial(object.leave);
|
636
|
-
} else {
|
637
|
-
message.leave = undefined;
|
638
|
-
}
|
639
|
-
if (object.updateLayers !== undefined && object.updateLayers !== null) {
|
640
|
-
message.updateLayers = UpdateVideoLayers.fromPartial(object.updateLayers);
|
641
|
-
} else {
|
642
|
-
message.updateLayers = undefined;
|
643
|
-
}
|
644
|
-
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 =
|
645
620
|
object.subscriptionPermission !== undefined &&
|
646
621
|
object.subscriptionPermission !== null
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
message.syncState = undefined;
|
658
|
-
}
|
659
|
-
if (object.simulate !== undefined && object.simulate !== null) {
|
660
|
-
message.simulate = SimulateScenario.fromPartial(object.simulate);
|
661
|
-
} else {
|
662
|
-
message.simulate = undefined;
|
663
|
-
}
|
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;
|
664
632
|
return message;
|
665
633
|
},
|
666
634
|
};
|
667
635
|
|
668
|
-
|
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
|
+
}
|
669
656
|
|
670
657
|
export const SignalResponse = {
|
671
658
|
encode(
|
@@ -756,7 +743,7 @@ export const SignalResponse = {
|
|
756
743
|
decode(input: _m0.Reader | Uint8Array, length?: number): SignalResponse {
|
757
744
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
758
745
|
let end = length === undefined ? reader.len : reader.pos + length;
|
759
|
-
const message =
|
746
|
+
const message = createBaseSignalResponse();
|
760
747
|
while (reader.pos < end) {
|
761
748
|
const tag = reader.uint32();
|
762
749
|
switch (tag >>> 3) {
|
@@ -836,121 +823,56 @@ export const SignalResponse = {
|
|
836
823
|
},
|
837
824
|
|
838
825
|
fromJSON(object: any): SignalResponse {
|
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
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
} else {
|
890
|
-
message.speakersChanged = undefined;
|
891
|
-
}
|
892
|
-
if (object.roomUpdate !== undefined && object.roomUpdate !== null) {
|
893
|
-
message.roomUpdate = RoomUpdate.fromJSON(object.roomUpdate);
|
894
|
-
} else {
|
895
|
-
message.roomUpdate = undefined;
|
896
|
-
}
|
897
|
-
if (
|
898
|
-
object.connectionQuality !== undefined &&
|
899
|
-
object.connectionQuality !== null
|
900
|
-
) {
|
901
|
-
message.connectionQuality = ConnectionQualityUpdate.fromJSON(
|
902
|
-
object.connectionQuality
|
903
|
-
);
|
904
|
-
} else {
|
905
|
-
message.connectionQuality = undefined;
|
906
|
-
}
|
907
|
-
if (
|
908
|
-
object.streamStateUpdate !== undefined &&
|
909
|
-
object.streamStateUpdate !== null
|
910
|
-
) {
|
911
|
-
message.streamStateUpdate = StreamStateUpdate.fromJSON(
|
912
|
-
object.streamStateUpdate
|
913
|
-
);
|
914
|
-
} else {
|
915
|
-
message.streamStateUpdate = undefined;
|
916
|
-
}
|
917
|
-
if (
|
918
|
-
object.subscribedQualityUpdate !== undefined &&
|
919
|
-
object.subscribedQualityUpdate !== null
|
920
|
-
) {
|
921
|
-
message.subscribedQualityUpdate = SubscribedQualityUpdate.fromJSON(
|
922
|
-
object.subscribedQualityUpdate
|
923
|
-
);
|
924
|
-
} else {
|
925
|
-
message.subscribedQualityUpdate = undefined;
|
926
|
-
}
|
927
|
-
if (
|
928
|
-
object.subscriptionPermissionUpdate !== undefined &&
|
929
|
-
object.subscriptionPermissionUpdate !== null
|
930
|
-
) {
|
931
|
-
message.subscriptionPermissionUpdate =
|
932
|
-
SubscriptionPermissionUpdate.fromJSON(
|
933
|
-
object.subscriptionPermissionUpdate
|
934
|
-
);
|
935
|
-
} else {
|
936
|
-
message.subscriptionPermissionUpdate = undefined;
|
937
|
-
}
|
938
|
-
if (object.refreshToken !== undefined && object.refreshToken !== null) {
|
939
|
-
message.refreshToken = String(object.refreshToken);
|
940
|
-
} else {
|
941
|
-
message.refreshToken = undefined;
|
942
|
-
}
|
943
|
-
if (
|
944
|
-
object.trackUnpublished !== undefined &&
|
945
|
-
object.trackUnpublished !== null
|
946
|
-
) {
|
947
|
-
message.trackUnpublished = TrackUnpublishedResponse.fromJSON(
|
948
|
-
object.trackUnpublished
|
949
|
-
);
|
950
|
-
} else {
|
951
|
-
message.trackUnpublished = undefined;
|
952
|
-
}
|
953
|
-
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
|
+
};
|
954
876
|
},
|
955
877
|
|
956
878
|
toJSON(message: SignalResponse): unknown {
|
@@ -1020,131 +942,94 @@ export const SignalResponse = {
|
|
1020
942
|
return obj;
|
1021
943
|
},
|
1022
944
|
|
1023
|
-
fromPartial
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
|
1041
|
-
|
1042
|
-
|
1043
|
-
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
object.speakersChanged !== undefined &&
|
1069
|
-
object.speakersChanged !== null
|
1070
|
-
) {
|
1071
|
-
message.speakersChanged = SpeakersChanged.fromPartial(
|
1072
|
-
object.speakersChanged
|
1073
|
-
);
|
1074
|
-
} else {
|
1075
|
-
message.speakersChanged = undefined;
|
1076
|
-
}
|
1077
|
-
if (object.roomUpdate !== undefined && object.roomUpdate !== null) {
|
1078
|
-
message.roomUpdate = RoomUpdate.fromPartial(object.roomUpdate);
|
1079
|
-
} else {
|
1080
|
-
message.roomUpdate = undefined;
|
1081
|
-
}
|
1082
|
-
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 =
|
1083
990
|
object.connectionQuality !== undefined &&
|
1084
991
|
object.connectionQuality !== null
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
);
|
1089
|
-
} else {
|
1090
|
-
message.connectionQuality = undefined;
|
1091
|
-
}
|
1092
|
-
if (
|
992
|
+
? ConnectionQualityUpdate.fromPartial(object.connectionQuality)
|
993
|
+
: undefined;
|
994
|
+
message.streamStateUpdate =
|
1093
995
|
object.streamStateUpdate !== undefined &&
|
1094
996
|
object.streamStateUpdate !== null
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
);
|
1099
|
-
} else {
|
1100
|
-
message.streamStateUpdate = undefined;
|
1101
|
-
}
|
1102
|
-
if (
|
997
|
+
? StreamStateUpdate.fromPartial(object.streamStateUpdate)
|
998
|
+
: undefined;
|
999
|
+
message.subscribedQualityUpdate =
|
1103
1000
|
object.subscribedQualityUpdate !== undefined &&
|
1104
1001
|
object.subscribedQualityUpdate !== null
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1108
|
-
);
|
1109
|
-
} else {
|
1110
|
-
message.subscribedQualityUpdate = undefined;
|
1111
|
-
}
|
1112
|
-
if (
|
1002
|
+
? SubscribedQualityUpdate.fromPartial(object.subscribedQualityUpdate)
|
1003
|
+
: undefined;
|
1004
|
+
message.subscriptionPermissionUpdate =
|
1113
1005
|
object.subscriptionPermissionUpdate !== undefined &&
|
1114
1006
|
object.subscriptionPermissionUpdate !== null
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
);
|
1120
|
-
} else {
|
1121
|
-
message.subscriptionPermissionUpdate = undefined;
|
1122
|
-
}
|
1007
|
+
? SubscriptionPermissionUpdate.fromPartial(
|
1008
|
+
object.subscriptionPermissionUpdate
|
1009
|
+
)
|
1010
|
+
: undefined;
|
1123
1011
|
message.refreshToken = object.refreshToken ?? undefined;
|
1124
|
-
|
1125
|
-
object.trackUnpublished !== undefined &&
|
1126
|
-
|
1127
|
-
|
1128
|
-
message.trackUnpublished = TrackUnpublishedResponse.fromPartial(
|
1129
|
-
object.trackUnpublished
|
1130
|
-
);
|
1131
|
-
} else {
|
1132
|
-
message.trackUnpublished = undefined;
|
1133
|
-
}
|
1012
|
+
message.trackUnpublished =
|
1013
|
+
object.trackUnpublished !== undefined && object.trackUnpublished !== null
|
1014
|
+
? TrackUnpublishedResponse.fromPartial(object.trackUnpublished)
|
1015
|
+
: undefined;
|
1134
1016
|
return message;
|
1135
1017
|
},
|
1136
1018
|
};
|
1137
1019
|
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
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
|
+
}
|
1148
1033
|
|
1149
1034
|
export const AddTrackRequest = {
|
1150
1035
|
encode(
|
@@ -1184,8 +1069,7 @@ export const AddTrackRequest = {
|
|
1184
1069
|
decode(input: _m0.Reader | Uint8Array, length?: number): AddTrackRequest {
|
1185
1070
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1186
1071
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1187
|
-
const message =
|
1188
|
-
message.layers = [];
|
1072
|
+
const message = createBaseAddTrackRequest();
|
1189
1073
|
while (reader.pos < end) {
|
1190
1074
|
const tag = reader.uint32();
|
1191
1075
|
switch (tag >>> 3) {
|
@@ -1225,54 +1109,19 @@ export const AddTrackRequest = {
|
|
1225
1109
|
},
|
1226
1110
|
|
1227
1111
|
fromJSON(object: any): AddTrackRequest {
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
message.type = trackTypeFromJSON(object.type);
|
1242
|
-
} else {
|
1243
|
-
message.type = 0;
|
1244
|
-
}
|
1245
|
-
if (object.width !== undefined && object.width !== null) {
|
1246
|
-
message.width = Number(object.width);
|
1247
|
-
} else {
|
1248
|
-
message.width = 0;
|
1249
|
-
}
|
1250
|
-
if (object.height !== undefined && object.height !== null) {
|
1251
|
-
message.height = Number(object.height);
|
1252
|
-
} else {
|
1253
|
-
message.height = 0;
|
1254
|
-
}
|
1255
|
-
if (object.muted !== undefined && object.muted !== null) {
|
1256
|
-
message.muted = Boolean(object.muted);
|
1257
|
-
} else {
|
1258
|
-
message.muted = false;
|
1259
|
-
}
|
1260
|
-
if (object.disableDtx !== undefined && object.disableDtx !== null) {
|
1261
|
-
message.disableDtx = Boolean(object.disableDtx);
|
1262
|
-
} else {
|
1263
|
-
message.disableDtx = false;
|
1264
|
-
}
|
1265
|
-
if (object.source !== undefined && object.source !== null) {
|
1266
|
-
message.source = trackSourceFromJSON(object.source);
|
1267
|
-
} else {
|
1268
|
-
message.source = 0;
|
1269
|
-
}
|
1270
|
-
if (object.layers !== undefined && object.layers !== null) {
|
1271
|
-
for (const e of object.layers) {
|
1272
|
-
message.layers.push(VideoLayer.fromJSON(e));
|
1273
|
-
}
|
1274
|
-
}
|
1275
|
-
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
|
+
};
|
1276
1125
|
},
|
1277
1126
|
|
1278
1127
|
toJSON(message: AddTrackRequest): unknown {
|
@@ -1280,8 +1129,8 @@ export const AddTrackRequest = {
|
|
1280
1129
|
message.cid !== undefined && (obj.cid = message.cid);
|
1281
1130
|
message.name !== undefined && (obj.name = message.name);
|
1282
1131
|
message.type !== undefined && (obj.type = trackTypeToJSON(message.type));
|
1283
|
-
message.width !== undefined && (obj.width = message.width);
|
1284
|
-
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));
|
1285
1134
|
message.muted !== undefined && (obj.muted = message.muted);
|
1286
1135
|
message.disableDtx !== undefined && (obj.disableDtx = message.disableDtx);
|
1287
1136
|
message.source !== undefined &&
|
@@ -1296,8 +1145,10 @@ export const AddTrackRequest = {
|
|
1296
1145
|
return obj;
|
1297
1146
|
},
|
1298
1147
|
|
1299
|
-
fromPartial
|
1300
|
-
|
1148
|
+
fromPartial<I extends Exact<DeepPartial<AddTrackRequest>, I>>(
|
1149
|
+
object: I
|
1150
|
+
): AddTrackRequest {
|
1151
|
+
const message = createBaseAddTrackRequest();
|
1301
1152
|
message.cid = object.cid ?? "";
|
1302
1153
|
message.name = object.name ?? "";
|
1303
1154
|
message.type = object.type ?? 0;
|
@@ -1306,17 +1157,14 @@ export const AddTrackRequest = {
|
|
1306
1157
|
message.muted = object.muted ?? false;
|
1307
1158
|
message.disableDtx = object.disableDtx ?? false;
|
1308
1159
|
message.source = object.source ?? 0;
|
1309
|
-
message.layers = [];
|
1310
|
-
if (object.layers !== undefined && object.layers !== null) {
|
1311
|
-
for (const e of object.layers) {
|
1312
|
-
message.layers.push(VideoLayer.fromPartial(e));
|
1313
|
-
}
|
1314
|
-
}
|
1160
|
+
message.layers = object.layers?.map((e) => VideoLayer.fromPartial(e)) || [];
|
1315
1161
|
return message;
|
1316
1162
|
},
|
1317
1163
|
};
|
1318
1164
|
|
1319
|
-
|
1165
|
+
function createBaseTrickleRequest(): TrickleRequest {
|
1166
|
+
return { candidateInit: "", target: 0 };
|
1167
|
+
}
|
1320
1168
|
|
1321
1169
|
export const TrickleRequest = {
|
1322
1170
|
encode(
|
@@ -1335,7 +1183,7 @@ export const TrickleRequest = {
|
|
1335
1183
|
decode(input: _m0.Reader | Uint8Array, length?: number): TrickleRequest {
|
1336
1184
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1337
1185
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1338
|
-
const message =
|
1186
|
+
const message = createBaseTrickleRequest();
|
1339
1187
|
while (reader.pos < end) {
|
1340
1188
|
const tag = reader.uint32();
|
1341
1189
|
switch (tag >>> 3) {
|
@@ -1354,18 +1202,12 @@ export const TrickleRequest = {
|
|
1354
1202
|
},
|
1355
1203
|
|
1356
1204
|
fromJSON(object: any): TrickleRequest {
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
}
|
1363
|
-
if (object.target !== undefined && object.target !== null) {
|
1364
|
-
message.target = signalTargetFromJSON(object.target);
|
1365
|
-
} else {
|
1366
|
-
message.target = 0;
|
1367
|
-
}
|
1368
|
-
return message;
|
1205
|
+
return {
|
1206
|
+
candidateInit: isSet(object.candidateInit)
|
1207
|
+
? String(object.candidateInit)
|
1208
|
+
: "",
|
1209
|
+
target: isSet(object.target) ? signalTargetFromJSON(object.target) : 0,
|
1210
|
+
};
|
1369
1211
|
},
|
1370
1212
|
|
1371
1213
|
toJSON(message: TrickleRequest): unknown {
|
@@ -1377,15 +1219,19 @@ export const TrickleRequest = {
|
|
1377
1219
|
return obj;
|
1378
1220
|
},
|
1379
1221
|
|
1380
|
-
fromPartial
|
1381
|
-
|
1222
|
+
fromPartial<I extends Exact<DeepPartial<TrickleRequest>, I>>(
|
1223
|
+
object: I
|
1224
|
+
): TrickleRequest {
|
1225
|
+
const message = createBaseTrickleRequest();
|
1382
1226
|
message.candidateInit = object.candidateInit ?? "";
|
1383
1227
|
message.target = object.target ?? 0;
|
1384
1228
|
return message;
|
1385
1229
|
},
|
1386
1230
|
};
|
1387
1231
|
|
1388
|
-
|
1232
|
+
function createBaseMuteTrackRequest(): MuteTrackRequest {
|
1233
|
+
return { sid: "", muted: false };
|
1234
|
+
}
|
1389
1235
|
|
1390
1236
|
export const MuteTrackRequest = {
|
1391
1237
|
encode(
|
@@ -1404,7 +1250,7 @@ export const MuteTrackRequest = {
|
|
1404
1250
|
decode(input: _m0.Reader | Uint8Array, length?: number): MuteTrackRequest {
|
1405
1251
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1406
1252
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1407
|
-
const message =
|
1253
|
+
const message = createBaseMuteTrackRequest();
|
1408
1254
|
while (reader.pos < end) {
|
1409
1255
|
const tag = reader.uint32();
|
1410
1256
|
switch (tag >>> 3) {
|
@@ -1423,18 +1269,10 @@ export const MuteTrackRequest = {
|
|
1423
1269
|
},
|
1424
1270
|
|
1425
1271
|
fromJSON(object: any): MuteTrackRequest {
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
}
|
1430
|
-
message.sid = "";
|
1431
|
-
}
|
1432
|
-
if (object.muted !== undefined && object.muted !== null) {
|
1433
|
-
message.muted = Boolean(object.muted);
|
1434
|
-
} else {
|
1435
|
-
message.muted = false;
|
1436
|
-
}
|
1437
|
-
return message;
|
1272
|
+
return {
|
1273
|
+
sid: isSet(object.sid) ? String(object.sid) : "",
|
1274
|
+
muted: isSet(object.muted) ? Boolean(object.muted) : false,
|
1275
|
+
};
|
1438
1276
|
},
|
1439
1277
|
|
1440
1278
|
toJSON(message: MuteTrackRequest): unknown {
|
@@ -1444,20 +1282,29 @@ export const MuteTrackRequest = {
|
|
1444
1282
|
return obj;
|
1445
1283
|
},
|
1446
1284
|
|
1447
|
-
fromPartial
|
1448
|
-
|
1285
|
+
fromPartial<I extends Exact<DeepPartial<MuteTrackRequest>, I>>(
|
1286
|
+
object: I
|
1287
|
+
): MuteTrackRequest {
|
1288
|
+
const message = createBaseMuteTrackRequest();
|
1449
1289
|
message.sid = object.sid ?? "";
|
1450
1290
|
message.muted = object.muted ?? false;
|
1451
1291
|
return message;
|
1452
1292
|
},
|
1453
1293
|
};
|
1454
1294
|
|
1455
|
-
|
1456
|
-
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
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
|
+
}
|
1461
1308
|
|
1462
1309
|
export const JoinResponse = {
|
1463
1310
|
encode(
|
@@ -1503,9 +1350,7 @@ export const JoinResponse = {
|
|
1503
1350
|
decode(input: _m0.Reader | Uint8Array, length?: number): JoinResponse {
|
1504
1351
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1505
1352
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1506
|
-
const message =
|
1507
|
-
message.otherParticipants = [];
|
1508
|
-
message.iceServers = [];
|
1353
|
+
const message = createBaseJoinResponse();
|
1509
1354
|
while (reader.pos < end) {
|
1510
1355
|
const tag = reader.uint32();
|
1511
1356
|
switch (tag >>> 3) {
|
@@ -1550,66 +1395,33 @@ export const JoinResponse = {
|
|
1550
1395
|
},
|
1551
1396
|
|
1552
1397
|
fromJSON(object: any): JoinResponse {
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1567
|
-
object.
|
1568
|
-
|
1569
|
-
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1580
|
-
for (const e of object.iceServers) {
|
1581
|
-
message.iceServers.push(ICEServer.fromJSON(e));
|
1582
|
-
}
|
1583
|
-
}
|
1584
|
-
if (
|
1585
|
-
object.subscriberPrimary !== undefined &&
|
1586
|
-
object.subscriberPrimary !== null
|
1587
|
-
) {
|
1588
|
-
message.subscriberPrimary = Boolean(object.subscriberPrimary);
|
1589
|
-
} else {
|
1590
|
-
message.subscriberPrimary = false;
|
1591
|
-
}
|
1592
|
-
if (object.alternativeUrl !== undefined && object.alternativeUrl !== null) {
|
1593
|
-
message.alternativeUrl = String(object.alternativeUrl);
|
1594
|
-
} else {
|
1595
|
-
message.alternativeUrl = "";
|
1596
|
-
}
|
1597
|
-
if (
|
1598
|
-
object.clientConfiguration !== undefined &&
|
1599
|
-
object.clientConfiguration !== null
|
1600
|
-
) {
|
1601
|
-
message.clientConfiguration = ClientConfiguration.fromJSON(
|
1602
|
-
object.clientConfiguration
|
1603
|
-
);
|
1604
|
-
} else {
|
1605
|
-
message.clientConfiguration = undefined;
|
1606
|
-
}
|
1607
|
-
if (object.serverRegion !== undefined && object.serverRegion !== null) {
|
1608
|
-
message.serverRegion = String(object.serverRegion);
|
1609
|
-
} else {
|
1610
|
-
message.serverRegion = "";
|
1611
|
-
}
|
1612
|
-
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
|
+
};
|
1613
1425
|
},
|
1614
1426
|
|
1615
1427
|
toJSON(message: JoinResponse): unknown {
|
@@ -1649,52 +1461,39 @@ export const JoinResponse = {
|
|
1649
1461
|
return obj;
|
1650
1462
|
},
|
1651
1463
|
|
1652
|
-
fromPartial
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
|
1664
|
-
message.otherParticipants =
|
1665
|
-
|
1666
|
-
|
1667
|
-
object.otherParticipants !== null
|
1668
|
-
) {
|
1669
|
-
for (const e of object.otherParticipants) {
|
1670
|
-
message.otherParticipants.push(ParticipantInfo.fromPartial(e));
|
1671
|
-
}
|
1672
|
-
}
|
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
|
+
[];
|
1673
1479
|
message.serverVersion = object.serverVersion ?? "";
|
1674
|
-
message.iceServers =
|
1675
|
-
|
1676
|
-
for (const e of object.iceServers) {
|
1677
|
-
message.iceServers.push(ICEServer.fromPartial(e));
|
1678
|
-
}
|
1679
|
-
}
|
1480
|
+
message.iceServers =
|
1481
|
+
object.iceServers?.map((e) => ICEServer.fromPartial(e)) || [];
|
1680
1482
|
message.subscriberPrimary = object.subscriberPrimary ?? false;
|
1681
1483
|
message.alternativeUrl = object.alternativeUrl ?? "";
|
1682
|
-
|
1484
|
+
message.clientConfiguration =
|
1683
1485
|
object.clientConfiguration !== undefined &&
|
1684
1486
|
object.clientConfiguration !== null
|
1685
|
-
|
1686
|
-
|
1687
|
-
object.clientConfiguration
|
1688
|
-
);
|
1689
|
-
} else {
|
1690
|
-
message.clientConfiguration = undefined;
|
1691
|
-
}
|
1487
|
+
? ClientConfiguration.fromPartial(object.clientConfiguration)
|
1488
|
+
: undefined;
|
1692
1489
|
message.serverRegion = object.serverRegion ?? "";
|
1693
1490
|
return message;
|
1694
1491
|
},
|
1695
1492
|
};
|
1696
1493
|
|
1697
|
-
|
1494
|
+
function createBaseTrackPublishedResponse(): TrackPublishedResponse {
|
1495
|
+
return { cid: "", track: undefined };
|
1496
|
+
}
|
1698
1497
|
|
1699
1498
|
export const TrackPublishedResponse = {
|
1700
1499
|
encode(
|
@@ -1716,7 +1515,7 @@ export const TrackPublishedResponse = {
|
|
1716
1515
|
): TrackPublishedResponse {
|
1717
1516
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1718
1517
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1719
|
-
const message =
|
1518
|
+
const message = createBaseTrackPublishedResponse();
|
1720
1519
|
while (reader.pos < end) {
|
1721
1520
|
const tag = reader.uint32();
|
1722
1521
|
switch (tag >>> 3) {
|
@@ -1735,18 +1534,10 @@ export const TrackPublishedResponse = {
|
|
1735
1534
|
},
|
1736
1535
|
|
1737
1536
|
fromJSON(object: any): TrackPublishedResponse {
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1741
|
-
}
|
1742
|
-
message.cid = "";
|
1743
|
-
}
|
1744
|
-
if (object.track !== undefined && object.track !== null) {
|
1745
|
-
message.track = TrackInfo.fromJSON(object.track);
|
1746
|
-
} else {
|
1747
|
-
message.track = undefined;
|
1748
|
-
}
|
1749
|
-
return message;
|
1537
|
+
return {
|
1538
|
+
cid: isSet(object.cid) ? String(object.cid) : "",
|
1539
|
+
track: isSet(object.track) ? TrackInfo.fromJSON(object.track) : undefined,
|
1540
|
+
};
|
1750
1541
|
},
|
1751
1542
|
|
1752
1543
|
toJSON(message: TrackPublishedResponse): unknown {
|
@@ -1757,21 +1548,22 @@ export const TrackPublishedResponse = {
|
|
1757
1548
|
return obj;
|
1758
1549
|
},
|
1759
1550
|
|
1760
|
-
fromPartial(
|
1761
|
-
object:
|
1551
|
+
fromPartial<I extends Exact<DeepPartial<TrackPublishedResponse>, I>>(
|
1552
|
+
object: I
|
1762
1553
|
): TrackPublishedResponse {
|
1763
|
-
const message =
|
1554
|
+
const message = createBaseTrackPublishedResponse();
|
1764
1555
|
message.cid = object.cid ?? "";
|
1765
|
-
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1769
|
-
}
|
1556
|
+
message.track =
|
1557
|
+
object.track !== undefined && object.track !== null
|
1558
|
+
? TrackInfo.fromPartial(object.track)
|
1559
|
+
: undefined;
|
1770
1560
|
return message;
|
1771
1561
|
},
|
1772
1562
|
};
|
1773
1563
|
|
1774
|
-
|
1564
|
+
function createBaseTrackUnpublishedResponse(): TrackUnpublishedResponse {
|
1565
|
+
return { trackSid: "" };
|
1566
|
+
}
|
1775
1567
|
|
1776
1568
|
export const TrackUnpublishedResponse = {
|
1777
1569
|
encode(
|
@@ -1790,9 +1582,7 @@ export const TrackUnpublishedResponse = {
|
|
1790
1582
|
): TrackUnpublishedResponse {
|
1791
1583
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1792
1584
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1793
|
-
const message =
|
1794
|
-
...baseTrackUnpublishedResponse,
|
1795
|
-
} as TrackUnpublishedResponse;
|
1585
|
+
const message = createBaseTrackUnpublishedResponse();
|
1796
1586
|
while (reader.pos < end) {
|
1797
1587
|
const tag = reader.uint32();
|
1798
1588
|
switch (tag >>> 3) {
|
@@ -1808,15 +1598,9 @@ export const TrackUnpublishedResponse = {
|
|
1808
1598
|
},
|
1809
1599
|
|
1810
1600
|
fromJSON(object: any): TrackUnpublishedResponse {
|
1811
|
-
|
1812
|
-
|
1813
|
-
}
|
1814
|
-
if (object.trackSid !== undefined && object.trackSid !== null) {
|
1815
|
-
message.trackSid = String(object.trackSid);
|
1816
|
-
} else {
|
1817
|
-
message.trackSid = "";
|
1818
|
-
}
|
1819
|
-
return message;
|
1601
|
+
return {
|
1602
|
+
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
1603
|
+
};
|
1820
1604
|
},
|
1821
1605
|
|
1822
1606
|
toJSON(message: TrackUnpublishedResponse): unknown {
|
@@ -1825,18 +1609,18 @@ export const TrackUnpublishedResponse = {
|
|
1825
1609
|
return obj;
|
1826
1610
|
},
|
1827
1611
|
|
1828
|
-
fromPartial(
|
1829
|
-
object:
|
1612
|
+
fromPartial<I extends Exact<DeepPartial<TrackUnpublishedResponse>, I>>(
|
1613
|
+
object: I
|
1830
1614
|
): TrackUnpublishedResponse {
|
1831
|
-
const message =
|
1832
|
-
...baseTrackUnpublishedResponse,
|
1833
|
-
} as TrackUnpublishedResponse;
|
1615
|
+
const message = createBaseTrackUnpublishedResponse();
|
1834
1616
|
message.trackSid = object.trackSid ?? "";
|
1835
1617
|
return message;
|
1836
1618
|
},
|
1837
1619
|
};
|
1838
1620
|
|
1839
|
-
|
1621
|
+
function createBaseSessionDescription(): SessionDescription {
|
1622
|
+
return { type: "", sdp: "" };
|
1623
|
+
}
|
1840
1624
|
|
1841
1625
|
export const SessionDescription = {
|
1842
1626
|
encode(
|
@@ -1855,7 +1639,7 @@ export const SessionDescription = {
|
|
1855
1639
|
decode(input: _m0.Reader | Uint8Array, length?: number): SessionDescription {
|
1856
1640
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1857
1641
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1858
|
-
const message =
|
1642
|
+
const message = createBaseSessionDescription();
|
1859
1643
|
while (reader.pos < end) {
|
1860
1644
|
const tag = reader.uint32();
|
1861
1645
|
switch (tag >>> 3) {
|
@@ -1874,18 +1658,10 @@ export const SessionDescription = {
|
|
1874
1658
|
},
|
1875
1659
|
|
1876
1660
|
fromJSON(object: any): SessionDescription {
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
-
}
|
1881
|
-
message.type = "";
|
1882
|
-
}
|
1883
|
-
if (object.sdp !== undefined && object.sdp !== null) {
|
1884
|
-
message.sdp = String(object.sdp);
|
1885
|
-
} else {
|
1886
|
-
message.sdp = "";
|
1887
|
-
}
|
1888
|
-
return message;
|
1661
|
+
return {
|
1662
|
+
type: isSet(object.type) ? String(object.type) : "",
|
1663
|
+
sdp: isSet(object.sdp) ? String(object.sdp) : "",
|
1664
|
+
};
|
1889
1665
|
},
|
1890
1666
|
|
1891
1667
|
toJSON(message: SessionDescription): unknown {
|
@@ -1895,15 +1671,19 @@ export const SessionDescription = {
|
|
1895
1671
|
return obj;
|
1896
1672
|
},
|
1897
1673
|
|
1898
|
-
fromPartial
|
1899
|
-
|
1674
|
+
fromPartial<I extends Exact<DeepPartial<SessionDescription>, I>>(
|
1675
|
+
object: I
|
1676
|
+
): SessionDescription {
|
1677
|
+
const message = createBaseSessionDescription();
|
1900
1678
|
message.type = object.type ?? "";
|
1901
1679
|
message.sdp = object.sdp ?? "";
|
1902
1680
|
return message;
|
1903
1681
|
},
|
1904
1682
|
};
|
1905
1683
|
|
1906
|
-
|
1684
|
+
function createBaseParticipantUpdate(): ParticipantUpdate {
|
1685
|
+
return { participants: [] };
|
1686
|
+
}
|
1907
1687
|
|
1908
1688
|
export const ParticipantUpdate = {
|
1909
1689
|
encode(
|
@@ -1919,8 +1699,7 @@ export const ParticipantUpdate = {
|
|
1919
1699
|
decode(input: _m0.Reader | Uint8Array, length?: number): ParticipantUpdate {
|
1920
1700
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1921
1701
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1922
|
-
const message =
|
1923
|
-
message.participants = [];
|
1702
|
+
const message = createBaseParticipantUpdate();
|
1924
1703
|
while (reader.pos < end) {
|
1925
1704
|
const tag = reader.uint32();
|
1926
1705
|
switch (tag >>> 3) {
|
@@ -1938,14 +1717,11 @@ export const ParticipantUpdate = {
|
|
1938
1717
|
},
|
1939
1718
|
|
1940
1719
|
fromJSON(object: any): ParticipantUpdate {
|
1941
|
-
|
1942
|
-
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
}
|
1947
|
-
}
|
1948
|
-
return message;
|
1720
|
+
return {
|
1721
|
+
participants: Array.isArray(object?.participants)
|
1722
|
+
? object.participants.map((e: any) => ParticipantInfo.fromJSON(e))
|
1723
|
+
: [],
|
1724
|
+
};
|
1949
1725
|
},
|
1950
1726
|
|
1951
1727
|
toJSON(message: ParticipantUpdate): unknown {
|
@@ -1960,19 +1736,19 @@ export const ParticipantUpdate = {
|
|
1960
1736
|
return obj;
|
1961
1737
|
},
|
1962
1738
|
|
1963
|
-
fromPartial
|
1964
|
-
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
|
1969
|
-
}
|
1970
|
-
}
|
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)) || [];
|
1971
1745
|
return message;
|
1972
1746
|
},
|
1973
1747
|
};
|
1974
1748
|
|
1975
|
-
|
1749
|
+
function createBaseUpdateSubscription(): UpdateSubscription {
|
1750
|
+
return { trackSids: [], subscribe: false, participantTracks: [] };
|
1751
|
+
}
|
1976
1752
|
|
1977
1753
|
export const UpdateSubscription = {
|
1978
1754
|
encode(
|
@@ -1994,9 +1770,7 @@ export const UpdateSubscription = {
|
|
1994
1770
|
decode(input: _m0.Reader | Uint8Array, length?: number): UpdateSubscription {
|
1995
1771
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
1996
1772
|
let end = length === undefined ? reader.len : reader.pos + length;
|
1997
|
-
const message =
|
1998
|
-
message.trackSids = [];
|
1999
|
-
message.participantTracks = [];
|
1773
|
+
const message = createBaseUpdateSubscription();
|
2000
1774
|
while (reader.pos < end) {
|
2001
1775
|
const tag = reader.uint32();
|
2002
1776
|
switch (tag >>> 3) {
|
@@ -2020,28 +1794,17 @@ export const UpdateSubscription = {
|
|
2020
1794
|
},
|
2021
1795
|
|
2022
1796
|
fromJSON(object: any): UpdateSubscription {
|
2023
|
-
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2031
|
-
|
2032
|
-
|
2033
|
-
}
|
2034
|
-
message.subscribe = false;
|
2035
|
-
}
|
2036
|
-
if (
|
2037
|
-
object.participantTracks !== undefined &&
|
2038
|
-
object.participantTracks !== null
|
2039
|
-
) {
|
2040
|
-
for (const e of object.participantTracks) {
|
2041
|
-
message.participantTracks.push(ParticipantTracks.fromJSON(e));
|
2042
|
-
}
|
2043
|
-
}
|
2044
|
-
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
|
+
};
|
2045
1808
|
},
|
2046
1809
|
|
2047
1810
|
toJSON(message: UpdateSubscription): unknown {
|
@@ -2062,35 +1825,22 @@ export const UpdateSubscription = {
|
|
2062
1825
|
return obj;
|
2063
1826
|
},
|
2064
1827
|
|
2065
|
-
fromPartial
|
2066
|
-
|
2067
|
-
|
2068
|
-
|
2069
|
-
|
2070
|
-
message.trackSids.push(e);
|
2071
|
-
}
|
2072
|
-
}
|
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) || [];
|
2073
1833
|
message.subscribe = object.subscribe ?? false;
|
2074
|
-
message.participantTracks =
|
2075
|
-
|
2076
|
-
|
2077
|
-
object.participantTracks !== null
|
2078
|
-
) {
|
2079
|
-
for (const e of object.participantTracks) {
|
2080
|
-
message.participantTracks.push(ParticipantTracks.fromPartial(e));
|
2081
|
-
}
|
2082
|
-
}
|
1834
|
+
message.participantTracks =
|
1835
|
+
object.participantTracks?.map((e) => ParticipantTracks.fromPartial(e)) ||
|
1836
|
+
[];
|
2083
1837
|
return message;
|
2084
1838
|
},
|
2085
1839
|
};
|
2086
1840
|
|
2087
|
-
|
2088
|
-
trackSids:
|
2089
|
-
|
2090
|
-
quality: 0,
|
2091
|
-
width: 0,
|
2092
|
-
height: 0,
|
2093
|
-
};
|
1841
|
+
function createBaseUpdateTrackSettings(): UpdateTrackSettings {
|
1842
|
+
return { trackSids: [], disabled: false, quality: 0, width: 0, height: 0 };
|
1843
|
+
}
|
2094
1844
|
|
2095
1845
|
export const UpdateTrackSettings = {
|
2096
1846
|
encode(
|
@@ -2118,8 +1868,7 @@ export const UpdateTrackSettings = {
|
|
2118
1868
|
decode(input: _m0.Reader | Uint8Array, length?: number): UpdateTrackSettings {
|
2119
1869
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2120
1870
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2121
|
-
const message =
|
2122
|
-
message.trackSids = [];
|
1871
|
+
const message = createBaseUpdateTrackSettings();
|
2123
1872
|
while (reader.pos < end) {
|
2124
1873
|
const tag = reader.uint32();
|
2125
1874
|
switch (tag >>> 3) {
|
@@ -2147,34 +1896,15 @@ export const UpdateTrackSettings = {
|
|
2147
1896
|
},
|
2148
1897
|
|
2149
1898
|
fromJSON(object: any): UpdateTrackSettings {
|
2150
|
-
|
2151
|
-
|
2152
|
-
|
2153
|
-
|
2154
|
-
|
2155
|
-
|
2156
|
-
|
2157
|
-
|
2158
|
-
|
2159
|
-
} else {
|
2160
|
-
message.disabled = false;
|
2161
|
-
}
|
2162
|
-
if (object.quality !== undefined && object.quality !== null) {
|
2163
|
-
message.quality = videoQualityFromJSON(object.quality);
|
2164
|
-
} else {
|
2165
|
-
message.quality = 0;
|
2166
|
-
}
|
2167
|
-
if (object.width !== undefined && object.width !== null) {
|
2168
|
-
message.width = Number(object.width);
|
2169
|
-
} else {
|
2170
|
-
message.width = 0;
|
2171
|
-
}
|
2172
|
-
if (object.height !== undefined && object.height !== null) {
|
2173
|
-
message.height = Number(object.height);
|
2174
|
-
} else {
|
2175
|
-
message.height = 0;
|
2176
|
-
}
|
2177
|
-
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
|
+
};
|
2178
1908
|
},
|
2179
1909
|
|
2180
1910
|
toJSON(message: UpdateTrackSettings): unknown {
|
@@ -2187,19 +1917,16 @@ export const UpdateTrackSettings = {
|
|
2187
1917
|
message.disabled !== undefined && (obj.disabled = message.disabled);
|
2188
1918
|
message.quality !== undefined &&
|
2189
1919
|
(obj.quality = videoQualityToJSON(message.quality));
|
2190
|
-
message.width !== undefined && (obj.width = message.width);
|
2191
|
-
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));
|
2192
1922
|
return obj;
|
2193
1923
|
},
|
2194
1924
|
|
2195
|
-
fromPartial
|
2196
|
-
|
2197
|
-
|
2198
|
-
|
2199
|
-
|
2200
|
-
message.trackSids.push(e);
|
2201
|
-
}
|
2202
|
-
}
|
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) || [];
|
2203
1930
|
message.disabled = object.disabled ?? false;
|
2204
1931
|
message.quality = object.quality ?? 0;
|
2205
1932
|
message.width = object.width ?? 0;
|
@@ -2208,7 +1935,9 @@ export const UpdateTrackSettings = {
|
|
2208
1935
|
},
|
2209
1936
|
};
|
2210
1937
|
|
2211
|
-
|
1938
|
+
function createBaseLeaveRequest(): LeaveRequest {
|
1939
|
+
return { canReconnect: false };
|
1940
|
+
}
|
2212
1941
|
|
2213
1942
|
export const LeaveRequest = {
|
2214
1943
|
encode(
|
@@ -2224,7 +1953,7 @@ export const LeaveRequest = {
|
|
2224
1953
|
decode(input: _m0.Reader | Uint8Array, length?: number): LeaveRequest {
|
2225
1954
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2226
1955
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2227
|
-
const message =
|
1956
|
+
const message = createBaseLeaveRequest();
|
2228
1957
|
while (reader.pos < end) {
|
2229
1958
|
const tag = reader.uint32();
|
2230
1959
|
switch (tag >>> 3) {
|
@@ -2240,13 +1969,11 @@ export const LeaveRequest = {
|
|
2240
1969
|
},
|
2241
1970
|
|
2242
1971
|
fromJSON(object: any): LeaveRequest {
|
2243
|
-
|
2244
|
-
|
2245
|
-
|
2246
|
-
|
2247
|
-
|
2248
|
-
}
|
2249
|
-
return message;
|
1972
|
+
return {
|
1973
|
+
canReconnect: isSet(object.canReconnect)
|
1974
|
+
? Boolean(object.canReconnect)
|
1975
|
+
: false,
|
1976
|
+
};
|
2250
1977
|
},
|
2251
1978
|
|
2252
1979
|
toJSON(message: LeaveRequest): unknown {
|
@@ -2256,14 +1983,18 @@ export const LeaveRequest = {
|
|
2256
1983
|
return obj;
|
2257
1984
|
},
|
2258
1985
|
|
2259
|
-
fromPartial
|
2260
|
-
|
1986
|
+
fromPartial<I extends Exact<DeepPartial<LeaveRequest>, I>>(
|
1987
|
+
object: I
|
1988
|
+
): LeaveRequest {
|
1989
|
+
const message = createBaseLeaveRequest();
|
2261
1990
|
message.canReconnect = object.canReconnect ?? false;
|
2262
1991
|
return message;
|
2263
1992
|
},
|
2264
1993
|
};
|
2265
1994
|
|
2266
|
-
|
1995
|
+
function createBaseUpdateVideoLayers(): UpdateVideoLayers {
|
1996
|
+
return { trackSid: "", layers: [] };
|
1997
|
+
}
|
2267
1998
|
|
2268
1999
|
export const UpdateVideoLayers = {
|
2269
2000
|
encode(
|
@@ -2282,8 +2013,7 @@ export const UpdateVideoLayers = {
|
|
2282
2013
|
decode(input: _m0.Reader | Uint8Array, length?: number): UpdateVideoLayers {
|
2283
2014
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2284
2015
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2285
|
-
const message =
|
2286
|
-
message.layers = [];
|
2016
|
+
const message = createBaseUpdateVideoLayers();
|
2287
2017
|
while (reader.pos < end) {
|
2288
2018
|
const tag = reader.uint32();
|
2289
2019
|
switch (tag >>> 3) {
|
@@ -2302,19 +2032,12 @@ export const UpdateVideoLayers = {
|
|
2302
2032
|
},
|
2303
2033
|
|
2304
2034
|
fromJSON(object: any): UpdateVideoLayers {
|
2305
|
-
|
2306
|
-
|
2307
|
-
|
2308
|
-
|
2309
|
-
|
2310
|
-
|
2311
|
-
}
|
2312
|
-
if (object.layers !== undefined && object.layers !== null) {
|
2313
|
-
for (const e of object.layers) {
|
2314
|
-
message.layers.push(VideoLayer.fromJSON(e));
|
2315
|
-
}
|
2316
|
-
}
|
2317
|
-
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
|
+
};
|
2318
2041
|
},
|
2319
2042
|
|
2320
2043
|
toJSON(message: UpdateVideoLayers): unknown {
|
@@ -2330,20 +2053,19 @@ export const UpdateVideoLayers = {
|
|
2330
2053
|
return obj;
|
2331
2054
|
},
|
2332
2055
|
|
2333
|
-
fromPartial
|
2334
|
-
|
2056
|
+
fromPartial<I extends Exact<DeepPartial<UpdateVideoLayers>, I>>(
|
2057
|
+
object: I
|
2058
|
+
): UpdateVideoLayers {
|
2059
|
+
const message = createBaseUpdateVideoLayers();
|
2335
2060
|
message.trackSid = object.trackSid ?? "";
|
2336
|
-
message.layers = [];
|
2337
|
-
if (object.layers !== undefined && object.layers !== null) {
|
2338
|
-
for (const e of object.layers) {
|
2339
|
-
message.layers.push(VideoLayer.fromPartial(e));
|
2340
|
-
}
|
2341
|
-
}
|
2061
|
+
message.layers = object.layers?.map((e) => VideoLayer.fromPartial(e)) || [];
|
2342
2062
|
return message;
|
2343
2063
|
},
|
2344
2064
|
};
|
2345
2065
|
|
2346
|
-
|
2066
|
+
function createBaseICEServer(): ICEServer {
|
2067
|
+
return { urls: [], username: "", credential: "" };
|
2068
|
+
}
|
2347
2069
|
|
2348
2070
|
export const ICEServer = {
|
2349
2071
|
encode(
|
@@ -2365,8 +2087,7 @@ export const ICEServer = {
|
|
2365
2087
|
decode(input: _m0.Reader | Uint8Array, length?: number): ICEServer {
|
2366
2088
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2367
2089
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2368
|
-
const message =
|
2369
|
-
message.urls = [];
|
2090
|
+
const message = createBaseICEServer();
|
2370
2091
|
while (reader.pos < end) {
|
2371
2092
|
const tag = reader.uint32();
|
2372
2093
|
switch (tag >>> 3) {
|
@@ -2388,24 +2109,13 @@ export const ICEServer = {
|
|
2388
2109
|
},
|
2389
2110
|
|
2390
2111
|
fromJSON(object: any): ICEServer {
|
2391
|
-
|
2392
|
-
|
2393
|
-
|
2394
|
-
|
2395
|
-
|
2396
|
-
|
2397
|
-
}
|
2398
|
-
if (object.username !== undefined && object.username !== null) {
|
2399
|
-
message.username = String(object.username);
|
2400
|
-
} else {
|
2401
|
-
message.username = "";
|
2402
|
-
}
|
2403
|
-
if (object.credential !== undefined && object.credential !== null) {
|
2404
|
-
message.credential = String(object.credential);
|
2405
|
-
} else {
|
2406
|
-
message.credential = "";
|
2407
|
-
}
|
2408
|
-
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
|
+
};
|
2409
2119
|
},
|
2410
2120
|
|
2411
2121
|
toJSON(message: ICEServer): unknown {
|
@@ -2420,21 +2130,20 @@ export const ICEServer = {
|
|
2420
2130
|
return obj;
|
2421
2131
|
},
|
2422
2132
|
|
2423
|
-
fromPartial
|
2424
|
-
|
2425
|
-
|
2426
|
-
|
2427
|
-
|
2428
|
-
message.urls.push(e);
|
2429
|
-
}
|
2430
|
-
}
|
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) || [];
|
2431
2138
|
message.username = object.username ?? "";
|
2432
2139
|
message.credential = object.credential ?? "";
|
2433
2140
|
return message;
|
2434
2141
|
},
|
2435
2142
|
};
|
2436
2143
|
|
2437
|
-
|
2144
|
+
function createBaseSpeakersChanged(): SpeakersChanged {
|
2145
|
+
return { speakers: [] };
|
2146
|
+
}
|
2438
2147
|
|
2439
2148
|
export const SpeakersChanged = {
|
2440
2149
|
encode(
|
@@ -2450,8 +2159,7 @@ export const SpeakersChanged = {
|
|
2450
2159
|
decode(input: _m0.Reader | Uint8Array, length?: number): SpeakersChanged {
|
2451
2160
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2452
2161
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2453
|
-
const message =
|
2454
|
-
message.speakers = [];
|
2162
|
+
const message = createBaseSpeakersChanged();
|
2455
2163
|
while (reader.pos < end) {
|
2456
2164
|
const tag = reader.uint32();
|
2457
2165
|
switch (tag >>> 3) {
|
@@ -2467,14 +2175,11 @@ export const SpeakersChanged = {
|
|
2467
2175
|
},
|
2468
2176
|
|
2469
2177
|
fromJSON(object: any): SpeakersChanged {
|
2470
|
-
|
2471
|
-
|
2472
|
-
|
2473
|
-
|
2474
|
-
|
2475
|
-
}
|
2476
|
-
}
|
2477
|
-
return message;
|
2178
|
+
return {
|
2179
|
+
speakers: Array.isArray(object?.speakers)
|
2180
|
+
? object.speakers.map((e: any) => SpeakerInfo.fromJSON(e))
|
2181
|
+
: [],
|
2182
|
+
};
|
2478
2183
|
},
|
2479
2184
|
|
2480
2185
|
toJSON(message: SpeakersChanged): unknown {
|
@@ -2489,19 +2194,19 @@ export const SpeakersChanged = {
|
|
2489
2194
|
return obj;
|
2490
2195
|
},
|
2491
2196
|
|
2492
|
-
fromPartial
|
2493
|
-
|
2494
|
-
|
2495
|
-
|
2496
|
-
|
2497
|
-
|
2498
|
-
}
|
2499
|
-
}
|
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)) || [];
|
2500
2203
|
return message;
|
2501
2204
|
},
|
2502
2205
|
};
|
2503
2206
|
|
2504
|
-
|
2207
|
+
function createBaseRoomUpdate(): RoomUpdate {
|
2208
|
+
return { room: undefined };
|
2209
|
+
}
|
2505
2210
|
|
2506
2211
|
export const RoomUpdate = {
|
2507
2212
|
encode(
|
@@ -2517,7 +2222,7 @@ export const RoomUpdate = {
|
|
2517
2222
|
decode(input: _m0.Reader | Uint8Array, length?: number): RoomUpdate {
|
2518
2223
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2519
2224
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2520
|
-
const message =
|
2225
|
+
const message = createBaseRoomUpdate();
|
2521
2226
|
while (reader.pos < end) {
|
2522
2227
|
const tag = reader.uint32();
|
2523
2228
|
switch (tag >>> 3) {
|
@@ -2533,13 +2238,9 @@ export const RoomUpdate = {
|
|
2533
2238
|
},
|
2534
2239
|
|
2535
2240
|
fromJSON(object: any): RoomUpdate {
|
2536
|
-
|
2537
|
-
|
2538
|
-
|
2539
|
-
} else {
|
2540
|
-
message.room = undefined;
|
2541
|
-
}
|
2542
|
-
return message;
|
2241
|
+
return {
|
2242
|
+
room: isSet(object.room) ? Room.fromJSON(object.room) : undefined,
|
2243
|
+
};
|
2543
2244
|
},
|
2544
2245
|
|
2545
2246
|
toJSON(message: RoomUpdate): unknown {
|
@@ -2549,22 +2250,21 @@ export const RoomUpdate = {
|
|
2549
2250
|
return obj;
|
2550
2251
|
},
|
2551
2252
|
|
2552
|
-
fromPartial
|
2553
|
-
|
2554
|
-
|
2555
|
-
|
2556
|
-
|
2557
|
-
|
2558
|
-
|
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;
|
2559
2261
|
return message;
|
2560
2262
|
},
|
2561
2263
|
};
|
2562
2264
|
|
2563
|
-
|
2564
|
-
participantSid: "",
|
2565
|
-
|
2566
|
-
score: 0,
|
2567
|
-
};
|
2265
|
+
function createBaseConnectionQualityInfo(): ConnectionQualityInfo {
|
2266
|
+
return { participantSid: "", quality: 0, score: 0 };
|
2267
|
+
}
|
2568
2268
|
|
2569
2269
|
export const ConnectionQualityInfo = {
|
2570
2270
|
encode(
|
@@ -2589,7 +2289,7 @@ export const ConnectionQualityInfo = {
|
|
2589
2289
|
): ConnectionQualityInfo {
|
2590
2290
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2591
2291
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2592
|
-
const message =
|
2292
|
+
const message = createBaseConnectionQualityInfo();
|
2593
2293
|
while (reader.pos < end) {
|
2594
2294
|
const tag = reader.uint32();
|
2595
2295
|
switch (tag >>> 3) {
|
@@ -2611,23 +2311,15 @@ export const ConnectionQualityInfo = {
|
|
2611
2311
|
},
|
2612
2312
|
|
2613
2313
|
fromJSON(object: any): ConnectionQualityInfo {
|
2614
|
-
|
2615
|
-
|
2616
|
-
|
2617
|
-
|
2618
|
-
|
2619
|
-
|
2620
|
-
|
2621
|
-
|
2622
|
-
}
|
2623
|
-
message.quality = 0;
|
2624
|
-
}
|
2625
|
-
if (object.score !== undefined && object.score !== null) {
|
2626
|
-
message.score = Number(object.score);
|
2627
|
-
} else {
|
2628
|
-
message.score = 0;
|
2629
|
-
}
|
2630
|
-
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
|
+
};
|
2631
2323
|
},
|
2632
2324
|
|
2633
2325
|
toJSON(message: ConnectionQualityInfo): unknown {
|
@@ -2640,10 +2332,10 @@ export const ConnectionQualityInfo = {
|
|
2640
2332
|
return obj;
|
2641
2333
|
},
|
2642
2334
|
|
2643
|
-
fromPartial(
|
2644
|
-
object:
|
2335
|
+
fromPartial<I extends Exact<DeepPartial<ConnectionQualityInfo>, I>>(
|
2336
|
+
object: I
|
2645
2337
|
): ConnectionQualityInfo {
|
2646
|
-
const message =
|
2338
|
+
const message = createBaseConnectionQualityInfo();
|
2647
2339
|
message.participantSid = object.participantSid ?? "";
|
2648
2340
|
message.quality = object.quality ?? 0;
|
2649
2341
|
message.score = object.score ?? 0;
|
@@ -2651,7 +2343,9 @@ export const ConnectionQualityInfo = {
|
|
2651
2343
|
},
|
2652
2344
|
};
|
2653
2345
|
|
2654
|
-
|
2346
|
+
function createBaseConnectionQualityUpdate(): ConnectionQualityUpdate {
|
2347
|
+
return { updates: [] };
|
2348
|
+
}
|
2655
2349
|
|
2656
2350
|
export const ConnectionQualityUpdate = {
|
2657
2351
|
encode(
|
@@ -2670,10 +2364,7 @@ export const ConnectionQualityUpdate = {
|
|
2670
2364
|
): ConnectionQualityUpdate {
|
2671
2365
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2672
2366
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2673
|
-
const message =
|
2674
|
-
...baseConnectionQualityUpdate,
|
2675
|
-
} as ConnectionQualityUpdate;
|
2676
|
-
message.updates = [];
|
2367
|
+
const message = createBaseConnectionQualityUpdate();
|
2677
2368
|
while (reader.pos < end) {
|
2678
2369
|
const tag = reader.uint32();
|
2679
2370
|
switch (tag >>> 3) {
|
@@ -2691,16 +2382,11 @@ export const ConnectionQualityUpdate = {
|
|
2691
2382
|
},
|
2692
2383
|
|
2693
2384
|
fromJSON(object: any): ConnectionQualityUpdate {
|
2694
|
-
|
2695
|
-
|
2696
|
-
|
2697
|
-
|
2698
|
-
|
2699
|
-
for (const e of object.updates) {
|
2700
|
-
message.updates.push(ConnectionQualityInfo.fromJSON(e));
|
2701
|
-
}
|
2702
|
-
}
|
2703
|
-
return message;
|
2385
|
+
return {
|
2386
|
+
updates: Array.isArray(object?.updates)
|
2387
|
+
? object.updates.map((e: any) => ConnectionQualityInfo.fromJSON(e))
|
2388
|
+
: [],
|
2389
|
+
};
|
2704
2390
|
},
|
2705
2391
|
|
2706
2392
|
toJSON(message: ConnectionQualityUpdate): unknown {
|
@@ -2715,27 +2401,19 @@ export const ConnectionQualityUpdate = {
|
|
2715
2401
|
return obj;
|
2716
2402
|
},
|
2717
2403
|
|
2718
|
-
fromPartial(
|
2719
|
-
object:
|
2404
|
+
fromPartial<I extends Exact<DeepPartial<ConnectionQualityUpdate>, I>>(
|
2405
|
+
object: I
|
2720
2406
|
): ConnectionQualityUpdate {
|
2721
|
-
const message =
|
2722
|
-
|
2723
|
-
|
2724
|
-
message.updates = [];
|
2725
|
-
if (object.updates !== undefined && object.updates !== null) {
|
2726
|
-
for (const e of object.updates) {
|
2727
|
-
message.updates.push(ConnectionQualityInfo.fromPartial(e));
|
2728
|
-
}
|
2729
|
-
}
|
2407
|
+
const message = createBaseConnectionQualityUpdate();
|
2408
|
+
message.updates =
|
2409
|
+
object.updates?.map((e) => ConnectionQualityInfo.fromPartial(e)) || [];
|
2730
2410
|
return message;
|
2731
2411
|
},
|
2732
2412
|
};
|
2733
2413
|
|
2734
|
-
|
2735
|
-
participantSid: "",
|
2736
|
-
|
2737
|
-
state: 0,
|
2738
|
-
};
|
2414
|
+
function createBaseStreamStateInfo(): StreamStateInfo {
|
2415
|
+
return { participantSid: "", trackSid: "", state: 0 };
|
2416
|
+
}
|
2739
2417
|
|
2740
2418
|
export const StreamStateInfo = {
|
2741
2419
|
encode(
|
@@ -2757,7 +2435,7 @@ export const StreamStateInfo = {
|
|
2757
2435
|
decode(input: _m0.Reader | Uint8Array, length?: number): StreamStateInfo {
|
2758
2436
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2759
2437
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2760
|
-
const message =
|
2438
|
+
const message = createBaseStreamStateInfo();
|
2761
2439
|
while (reader.pos < end) {
|
2762
2440
|
const tag = reader.uint32();
|
2763
2441
|
switch (tag >>> 3) {
|
@@ -2779,23 +2457,13 @@ export const StreamStateInfo = {
|
|
2779
2457
|
},
|
2780
2458
|
|
2781
2459
|
fromJSON(object: any): StreamStateInfo {
|
2782
|
-
|
2783
|
-
|
2784
|
-
|
2785
|
-
|
2786
|
-
|
2787
|
-
|
2788
|
-
|
2789
|
-
message.trackSid = String(object.trackSid);
|
2790
|
-
} else {
|
2791
|
-
message.trackSid = "";
|
2792
|
-
}
|
2793
|
-
if (object.state !== undefined && object.state !== null) {
|
2794
|
-
message.state = streamStateFromJSON(object.state);
|
2795
|
-
} else {
|
2796
|
-
message.state = 0;
|
2797
|
-
}
|
2798
|
-
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
|
+
};
|
2799
2467
|
},
|
2800
2468
|
|
2801
2469
|
toJSON(message: StreamStateInfo): unknown {
|
@@ -2808,8 +2476,10 @@ export const StreamStateInfo = {
|
|
2808
2476
|
return obj;
|
2809
2477
|
},
|
2810
2478
|
|
2811
|
-
fromPartial
|
2812
|
-
|
2479
|
+
fromPartial<I extends Exact<DeepPartial<StreamStateInfo>, I>>(
|
2480
|
+
object: I
|
2481
|
+
): StreamStateInfo {
|
2482
|
+
const message = createBaseStreamStateInfo();
|
2813
2483
|
message.participantSid = object.participantSid ?? "";
|
2814
2484
|
message.trackSid = object.trackSid ?? "";
|
2815
2485
|
message.state = object.state ?? 0;
|
@@ -2817,7 +2487,9 @@ export const StreamStateInfo = {
|
|
2817
2487
|
},
|
2818
2488
|
};
|
2819
2489
|
|
2820
|
-
|
2490
|
+
function createBaseStreamStateUpdate(): StreamStateUpdate {
|
2491
|
+
return { streamStates: [] };
|
2492
|
+
}
|
2821
2493
|
|
2822
2494
|
export const StreamStateUpdate = {
|
2823
2495
|
encode(
|
@@ -2833,8 +2505,7 @@ export const StreamStateUpdate = {
|
|
2833
2505
|
decode(input: _m0.Reader | Uint8Array, length?: number): StreamStateUpdate {
|
2834
2506
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2835
2507
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2836
|
-
const message =
|
2837
|
-
message.streamStates = [];
|
2508
|
+
const message = createBaseStreamStateUpdate();
|
2838
2509
|
while (reader.pos < end) {
|
2839
2510
|
const tag = reader.uint32();
|
2840
2511
|
switch (tag >>> 3) {
|
@@ -2852,14 +2523,11 @@ export const StreamStateUpdate = {
|
|
2852
2523
|
},
|
2853
2524
|
|
2854
2525
|
fromJSON(object: any): StreamStateUpdate {
|
2855
|
-
|
2856
|
-
|
2857
|
-
|
2858
|
-
|
2859
|
-
|
2860
|
-
}
|
2861
|
-
}
|
2862
|
-
return message;
|
2526
|
+
return {
|
2527
|
+
streamStates: Array.isArray(object?.streamStates)
|
2528
|
+
? object.streamStates.map((e: any) => StreamStateInfo.fromJSON(e))
|
2529
|
+
: [],
|
2530
|
+
};
|
2863
2531
|
},
|
2864
2532
|
|
2865
2533
|
toJSON(message: StreamStateUpdate): unknown {
|
@@ -2874,19 +2542,19 @@ export const StreamStateUpdate = {
|
|
2874
2542
|
return obj;
|
2875
2543
|
},
|
2876
2544
|
|
2877
|
-
fromPartial
|
2878
|
-
|
2879
|
-
|
2880
|
-
|
2881
|
-
|
2882
|
-
|
2883
|
-
}
|
2884
|
-
}
|
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)) || [];
|
2885
2551
|
return message;
|
2886
2552
|
},
|
2887
2553
|
};
|
2888
2554
|
|
2889
|
-
|
2555
|
+
function createBaseSubscribedQuality(): SubscribedQuality {
|
2556
|
+
return { quality: 0, enabled: false };
|
2557
|
+
}
|
2890
2558
|
|
2891
2559
|
export const SubscribedQuality = {
|
2892
2560
|
encode(
|
@@ -2905,7 +2573,7 @@ export const SubscribedQuality = {
|
|
2905
2573
|
decode(input: _m0.Reader | Uint8Array, length?: number): SubscribedQuality {
|
2906
2574
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2907
2575
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2908
|
-
const message =
|
2576
|
+
const message = createBaseSubscribedQuality();
|
2909
2577
|
while (reader.pos < end) {
|
2910
2578
|
const tag = reader.uint32();
|
2911
2579
|
switch (tag >>> 3) {
|
@@ -2924,18 +2592,10 @@ export const SubscribedQuality = {
|
|
2924
2592
|
},
|
2925
2593
|
|
2926
2594
|
fromJSON(object: any): SubscribedQuality {
|
2927
|
-
|
2928
|
-
|
2929
|
-
|
2930
|
-
}
|
2931
|
-
message.quality = 0;
|
2932
|
-
}
|
2933
|
-
if (object.enabled !== undefined && object.enabled !== null) {
|
2934
|
-
message.enabled = Boolean(object.enabled);
|
2935
|
-
} else {
|
2936
|
-
message.enabled = false;
|
2937
|
-
}
|
2938
|
-
return message;
|
2595
|
+
return {
|
2596
|
+
quality: isSet(object.quality) ? videoQualityFromJSON(object.quality) : 0,
|
2597
|
+
enabled: isSet(object.enabled) ? Boolean(object.enabled) : false,
|
2598
|
+
};
|
2939
2599
|
},
|
2940
2600
|
|
2941
2601
|
toJSON(message: SubscribedQuality): unknown {
|
@@ -2946,15 +2606,19 @@ export const SubscribedQuality = {
|
|
2946
2606
|
return obj;
|
2947
2607
|
},
|
2948
2608
|
|
2949
|
-
fromPartial
|
2950
|
-
|
2609
|
+
fromPartial<I extends Exact<DeepPartial<SubscribedQuality>, I>>(
|
2610
|
+
object: I
|
2611
|
+
): SubscribedQuality {
|
2612
|
+
const message = createBaseSubscribedQuality();
|
2951
2613
|
message.quality = object.quality ?? 0;
|
2952
2614
|
message.enabled = object.enabled ?? false;
|
2953
2615
|
return message;
|
2954
2616
|
},
|
2955
2617
|
};
|
2956
2618
|
|
2957
|
-
|
2619
|
+
function createBaseSubscribedQualityUpdate(): SubscribedQualityUpdate {
|
2620
|
+
return { trackSid: "", subscribedQualities: [] };
|
2621
|
+
}
|
2958
2622
|
|
2959
2623
|
export const SubscribedQualityUpdate = {
|
2960
2624
|
encode(
|
@@ -2976,10 +2640,7 @@ export const SubscribedQualityUpdate = {
|
|
2976
2640
|
): SubscribedQualityUpdate {
|
2977
2641
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
2978
2642
|
let end = length === undefined ? reader.len : reader.pos + length;
|
2979
|
-
const message =
|
2980
|
-
...baseSubscribedQualityUpdate,
|
2981
|
-
} as SubscribedQualityUpdate;
|
2982
|
-
message.subscribedQualities = [];
|
2643
|
+
const message = createBaseSubscribedQualityUpdate();
|
2983
2644
|
while (reader.pos < end) {
|
2984
2645
|
const tag = reader.uint32();
|
2985
2646
|
switch (tag >>> 3) {
|
@@ -3000,24 +2661,14 @@ export const SubscribedQualityUpdate = {
|
|
3000
2661
|
},
|
3001
2662
|
|
3002
2663
|
fromJSON(object: any): SubscribedQualityUpdate {
|
3003
|
-
|
3004
|
-
|
3005
|
-
|
3006
|
-
|
3007
|
-
|
3008
|
-
|
3009
|
-
|
3010
|
-
|
3011
|
-
}
|
3012
|
-
if (
|
3013
|
-
object.subscribedQualities !== undefined &&
|
3014
|
-
object.subscribedQualities !== null
|
3015
|
-
) {
|
3016
|
-
for (const e of object.subscribedQualities) {
|
3017
|
-
message.subscribedQualities.push(SubscribedQuality.fromJSON(e));
|
3018
|
-
}
|
3019
|
-
}
|
3020
|
-
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
|
+
};
|
3021
2672
|
},
|
3022
2673
|
|
3023
2674
|
toJSON(message: SubscribedQualityUpdate): unknown {
|
@@ -3033,31 +2684,22 @@ export const SubscribedQualityUpdate = {
|
|
3033
2684
|
return obj;
|
3034
2685
|
},
|
3035
2686
|
|
3036
|
-
fromPartial(
|
3037
|
-
object:
|
2687
|
+
fromPartial<I extends Exact<DeepPartial<SubscribedQualityUpdate>, I>>(
|
2688
|
+
object: I
|
3038
2689
|
): SubscribedQualityUpdate {
|
3039
|
-
const message =
|
3040
|
-
...baseSubscribedQualityUpdate,
|
3041
|
-
} as SubscribedQualityUpdate;
|
2690
|
+
const message = createBaseSubscribedQualityUpdate();
|
3042
2691
|
message.trackSid = object.trackSid ?? "";
|
3043
|
-
message.subscribedQualities =
|
3044
|
-
|
3045
|
-
|
3046
|
-
|
3047
|
-
) {
|
3048
|
-
for (const e of object.subscribedQualities) {
|
3049
|
-
message.subscribedQualities.push(SubscribedQuality.fromPartial(e));
|
3050
|
-
}
|
3051
|
-
}
|
2692
|
+
message.subscribedQualities =
|
2693
|
+
object.subscribedQualities?.map((e) =>
|
2694
|
+
SubscribedQuality.fromPartial(e)
|
2695
|
+
) || [];
|
3052
2696
|
return message;
|
3053
2697
|
},
|
3054
2698
|
};
|
3055
2699
|
|
3056
|
-
|
3057
|
-
participantSid: "",
|
3058
|
-
|
3059
|
-
trackSids: "",
|
3060
|
-
};
|
2700
|
+
function createBaseTrackPermission(): TrackPermission {
|
2701
|
+
return { participantSid: "", allTracks: false, trackSids: [] };
|
2702
|
+
}
|
3061
2703
|
|
3062
2704
|
export const TrackPermission = {
|
3063
2705
|
encode(
|
@@ -3079,8 +2721,7 @@ export const TrackPermission = {
|
|
3079
2721
|
decode(input: _m0.Reader | Uint8Array, length?: number): TrackPermission {
|
3080
2722
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
3081
2723
|
let end = length === undefined ? reader.len : reader.pos + length;
|
3082
|
-
const message =
|
3083
|
-
message.trackSids = [];
|
2724
|
+
const message = createBaseTrackPermission();
|
3084
2725
|
while (reader.pos < end) {
|
3085
2726
|
const tag = reader.uint32();
|
3086
2727
|
switch (tag >>> 3) {
|
@@ -3102,24 +2743,15 @@ export const TrackPermission = {
|
|
3102
2743
|
},
|
3103
2744
|
|
3104
2745
|
fromJSON(object: any): TrackPermission {
|
3105
|
-
|
3106
|
-
|
3107
|
-
|
3108
|
-
|
3109
|
-
|
3110
|
-
|
3111
|
-
|
3112
|
-
|
3113
|
-
|
3114
|
-
} else {
|
3115
|
-
message.allTracks = false;
|
3116
|
-
}
|
3117
|
-
if (object.trackSids !== undefined && object.trackSids !== null) {
|
3118
|
-
for (const e of object.trackSids) {
|
3119
|
-
message.trackSids.push(String(e));
|
3120
|
-
}
|
3121
|
-
}
|
3122
|
-
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
|
+
};
|
3123
2755
|
},
|
3124
2756
|
|
3125
2757
|
toJSON(message: TrackPermission): unknown {
|
@@ -3135,21 +2767,20 @@ export const TrackPermission = {
|
|
3135
2767
|
return obj;
|
3136
2768
|
},
|
3137
2769
|
|
3138
|
-
fromPartial
|
3139
|
-
|
2770
|
+
fromPartial<I extends Exact<DeepPartial<TrackPermission>, I>>(
|
2771
|
+
object: I
|
2772
|
+
): TrackPermission {
|
2773
|
+
const message = createBaseTrackPermission();
|
3140
2774
|
message.participantSid = object.participantSid ?? "";
|
3141
2775
|
message.allTracks = object.allTracks ?? false;
|
3142
|
-
message.trackSids = [];
|
3143
|
-
if (object.trackSids !== undefined && object.trackSids !== null) {
|
3144
|
-
for (const e of object.trackSids) {
|
3145
|
-
message.trackSids.push(e);
|
3146
|
-
}
|
3147
|
-
}
|
2776
|
+
message.trackSids = object.trackSids?.map((e) => e) || [];
|
3148
2777
|
return message;
|
3149
2778
|
},
|
3150
2779
|
};
|
3151
2780
|
|
3152
|
-
|
2781
|
+
function createBaseSubscriptionPermission(): SubscriptionPermission {
|
2782
|
+
return { allParticipants: false, trackPermissions: [] };
|
2783
|
+
}
|
3153
2784
|
|
3154
2785
|
export const SubscriptionPermission = {
|
3155
2786
|
encode(
|
@@ -3171,8 +2802,7 @@ export const SubscriptionPermission = {
|
|
3171
2802
|
): SubscriptionPermission {
|
3172
2803
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
3173
2804
|
let end = length === undefined ? reader.len : reader.pos + length;
|
3174
|
-
const message =
|
3175
|
-
message.trackPermissions = [];
|
2805
|
+
const message = createBaseSubscriptionPermission();
|
3176
2806
|
while (reader.pos < end) {
|
3177
2807
|
const tag = reader.uint32();
|
3178
2808
|
switch (tag >>> 3) {
|
@@ -3193,25 +2823,14 @@ export const SubscriptionPermission = {
|
|
3193
2823
|
},
|
3194
2824
|
|
3195
2825
|
fromJSON(object: any): SubscriptionPermission {
|
3196
|
-
|
3197
|
-
|
3198
|
-
|
3199
|
-
|
3200
|
-
object
|
3201
|
-
|
3202
|
-
|
3203
|
-
}
|
3204
|
-
message.allParticipants = false;
|
3205
|
-
}
|
3206
|
-
if (
|
3207
|
-
object.trackPermissions !== undefined &&
|
3208
|
-
object.trackPermissions !== null
|
3209
|
-
) {
|
3210
|
-
for (const e of object.trackPermissions) {
|
3211
|
-
message.trackPermissions.push(TrackPermission.fromJSON(e));
|
3212
|
-
}
|
3213
|
-
}
|
3214
|
-
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
|
+
};
|
3215
2834
|
},
|
3216
2835
|
|
3217
2836
|
toJSON(message: SubscriptionPermission): unknown {
|
@@ -3228,29 +2847,20 @@ export const SubscriptionPermission = {
|
|
3228
2847
|
return obj;
|
3229
2848
|
},
|
3230
2849
|
|
3231
|
-
fromPartial(
|
3232
|
-
object:
|
2850
|
+
fromPartial<I extends Exact<DeepPartial<SubscriptionPermission>, I>>(
|
2851
|
+
object: I
|
3233
2852
|
): SubscriptionPermission {
|
3234
|
-
const message =
|
2853
|
+
const message = createBaseSubscriptionPermission();
|
3235
2854
|
message.allParticipants = object.allParticipants ?? false;
|
3236
|
-
message.trackPermissions =
|
3237
|
-
|
3238
|
-
object.trackPermissions !== undefined &&
|
3239
|
-
object.trackPermissions !== null
|
3240
|
-
) {
|
3241
|
-
for (const e of object.trackPermissions) {
|
3242
|
-
message.trackPermissions.push(TrackPermission.fromPartial(e));
|
3243
|
-
}
|
3244
|
-
}
|
2855
|
+
message.trackPermissions =
|
2856
|
+
object.trackPermissions?.map((e) => TrackPermission.fromPartial(e)) || [];
|
3245
2857
|
return message;
|
3246
2858
|
},
|
3247
2859
|
};
|
3248
2860
|
|
3249
|
-
|
3250
|
-
participantSid: "",
|
3251
|
-
|
3252
|
-
allowed: false,
|
3253
|
-
};
|
2861
|
+
function createBaseSubscriptionPermissionUpdate(): SubscriptionPermissionUpdate {
|
2862
|
+
return { participantSid: "", trackSid: "", allowed: false };
|
2863
|
+
}
|
3254
2864
|
|
3255
2865
|
export const SubscriptionPermissionUpdate = {
|
3256
2866
|
encode(
|
@@ -3275,9 +2885,7 @@ export const SubscriptionPermissionUpdate = {
|
|
3275
2885
|
): SubscriptionPermissionUpdate {
|
3276
2886
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
3277
2887
|
let end = length === undefined ? reader.len : reader.pos + length;
|
3278
|
-
const message =
|
3279
|
-
...baseSubscriptionPermissionUpdate,
|
3280
|
-
} as SubscriptionPermissionUpdate;
|
2888
|
+
const message = createBaseSubscriptionPermissionUpdate();
|
3281
2889
|
while (reader.pos < end) {
|
3282
2890
|
const tag = reader.uint32();
|
3283
2891
|
switch (tag >>> 3) {
|
@@ -3299,25 +2907,13 @@ export const SubscriptionPermissionUpdate = {
|
|
3299
2907
|
},
|
3300
2908
|
|
3301
2909
|
fromJSON(object: any): SubscriptionPermissionUpdate {
|
3302
|
-
|
3303
|
-
|
3304
|
-
|
3305
|
-
|
3306
|
-
|
3307
|
-
|
3308
|
-
|
3309
|
-
}
|
3310
|
-
if (object.trackSid !== undefined && object.trackSid !== null) {
|
3311
|
-
message.trackSid = String(object.trackSid);
|
3312
|
-
} else {
|
3313
|
-
message.trackSid = "";
|
3314
|
-
}
|
3315
|
-
if (object.allowed !== undefined && object.allowed !== null) {
|
3316
|
-
message.allowed = Boolean(object.allowed);
|
3317
|
-
} else {
|
3318
|
-
message.allowed = false;
|
3319
|
-
}
|
3320
|
-
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
|
+
};
|
3321
2917
|
},
|
3322
2918
|
|
3323
2919
|
toJSON(message: SubscriptionPermissionUpdate): unknown {
|
@@ -3329,12 +2925,10 @@ export const SubscriptionPermissionUpdate = {
|
|
3329
2925
|
return obj;
|
3330
2926
|
},
|
3331
2927
|
|
3332
|
-
fromPartial(
|
3333
|
-
object:
|
2928
|
+
fromPartial<I extends Exact<DeepPartial<SubscriptionPermissionUpdate>, I>>(
|
2929
|
+
object: I
|
3334
2930
|
): SubscriptionPermissionUpdate {
|
3335
|
-
const message =
|
3336
|
-
...baseSubscriptionPermissionUpdate,
|
3337
|
-
} as SubscriptionPermissionUpdate;
|
2931
|
+
const message = createBaseSubscriptionPermissionUpdate();
|
3338
2932
|
message.participantSid = object.participantSid ?? "";
|
3339
2933
|
message.trackSid = object.trackSid ?? "";
|
3340
2934
|
message.allowed = object.allowed ?? false;
|
@@ -3342,7 +2936,14 @@ export const SubscriptionPermissionUpdate = {
|
|
3342
2936
|
},
|
3343
2937
|
};
|
3344
2938
|
|
3345
|
-
|
2939
|
+
function createBaseSyncState(): SyncState {
|
2940
|
+
return {
|
2941
|
+
answer: undefined,
|
2942
|
+
subscription: undefined,
|
2943
|
+
publishTracks: [],
|
2944
|
+
dataChannels: [],
|
2945
|
+
};
|
2946
|
+
}
|
3346
2947
|
|
3347
2948
|
export const SyncState = {
|
3348
2949
|
encode(
|
@@ -3373,9 +2974,7 @@ export const SyncState = {
|
|
3373
2974
|
decode(input: _m0.Reader | Uint8Array, length?: number): SyncState {
|
3374
2975
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
3375
2976
|
let end = length === undefined ? reader.len : reader.pos + length;
|
3376
|
-
const message =
|
3377
|
-
message.publishTracks = [];
|
3378
|
-
message.dataChannels = [];
|
2977
|
+
const message = createBaseSyncState();
|
3379
2978
|
while (reader.pos < end) {
|
3380
2979
|
const tag = reader.uint32();
|
3381
2980
|
switch (tag >>> 3) {
|
@@ -3407,30 +3006,22 @@ export const SyncState = {
|
|
3407
3006
|
},
|
3408
3007
|
|
3409
3008
|
fromJSON(object: any): SyncState {
|
3410
|
-
|
3411
|
-
|
3412
|
-
|
3413
|
-
|
3414
|
-
|
3415
|
-
|
3416
|
-
|
3417
|
-
|
3418
|
-
|
3419
|
-
|
3420
|
-
|
3421
|
-
|
3422
|
-
|
3423
|
-
|
3424
|
-
|
3425
|
-
|
3426
|
-
}
|
3427
|
-
}
|
3428
|
-
if (object.dataChannels !== undefined && object.dataChannels !== null) {
|
3429
|
-
for (const e of object.dataChannels) {
|
3430
|
-
message.dataChannels.push(DataChannelInfo.fromJSON(e));
|
3431
|
-
}
|
3432
|
-
}
|
3433
|
-
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
|
+
};
|
3434
3025
|
},
|
3435
3026
|
|
3436
3027
|
toJSON(message: SyncState): unknown {
|
@@ -3460,37 +3051,30 @@ export const SyncState = {
|
|
3460
3051
|
return obj;
|
3461
3052
|
},
|
3462
3053
|
|
3463
|
-
fromPartial
|
3464
|
-
|
3465
|
-
|
3466
|
-
|
3467
|
-
|
3468
|
-
|
3469
|
-
|
3470
|
-
|
3471
|
-
|
3472
|
-
|
3473
|
-
|
3474
|
-
|
3475
|
-
|
3476
|
-
|
3477
|
-
|
3478
|
-
|
3479
|
-
|
3480
|
-
message.publishTracks.push(TrackPublishedResponse.fromPartial(e));
|
3481
|
-
}
|
3482
|
-
}
|
3483
|
-
message.dataChannels = [];
|
3484
|
-
if (object.dataChannels !== undefined && object.dataChannels !== null) {
|
3485
|
-
for (const e of object.dataChannels) {
|
3486
|
-
message.dataChannels.push(DataChannelInfo.fromPartial(e));
|
3487
|
-
}
|
3488
|
-
}
|
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)) || [];
|
3489
3071
|
return message;
|
3490
3072
|
},
|
3491
3073
|
};
|
3492
3074
|
|
3493
|
-
|
3075
|
+
function createBaseDataChannelInfo(): DataChannelInfo {
|
3076
|
+
return { label: "", id: 0 };
|
3077
|
+
}
|
3494
3078
|
|
3495
3079
|
export const DataChannelInfo = {
|
3496
3080
|
encode(
|
@@ -3509,7 +3093,7 @@ export const DataChannelInfo = {
|
|
3509
3093
|
decode(input: _m0.Reader | Uint8Array, length?: number): DataChannelInfo {
|
3510
3094
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
3511
3095
|
let end = length === undefined ? reader.len : reader.pos + length;
|
3512
|
-
const message =
|
3096
|
+
const message = createBaseDataChannelInfo();
|
3513
3097
|
while (reader.pos < end) {
|
3514
3098
|
const tag = reader.uint32();
|
3515
3099
|
switch (tag >>> 3) {
|
@@ -3528,36 +3112,37 @@ export const DataChannelInfo = {
|
|
3528
3112
|
},
|
3529
3113
|
|
3530
3114
|
fromJSON(object: any): DataChannelInfo {
|
3531
|
-
|
3532
|
-
|
3533
|
-
|
3534
|
-
}
|
3535
|
-
message.label = "";
|
3536
|
-
}
|
3537
|
-
if (object.id !== undefined && object.id !== null) {
|
3538
|
-
message.id = Number(object.id);
|
3539
|
-
} else {
|
3540
|
-
message.id = 0;
|
3541
|
-
}
|
3542
|
-
return message;
|
3115
|
+
return {
|
3116
|
+
label: isSet(object.label) ? String(object.label) : "",
|
3117
|
+
id: isSet(object.id) ? Number(object.id) : 0,
|
3118
|
+
};
|
3543
3119
|
},
|
3544
3120
|
|
3545
3121
|
toJSON(message: DataChannelInfo): unknown {
|
3546
3122
|
const obj: any = {};
|
3547
3123
|
message.label !== undefined && (obj.label = message.label);
|
3548
|
-
message.id !== undefined && (obj.id = message.id);
|
3124
|
+
message.id !== undefined && (obj.id = Math.round(message.id));
|
3549
3125
|
return obj;
|
3550
3126
|
},
|
3551
3127
|
|
3552
|
-
fromPartial
|
3553
|
-
|
3128
|
+
fromPartial<I extends Exact<DeepPartial<DataChannelInfo>, I>>(
|
3129
|
+
object: I
|
3130
|
+
): DataChannelInfo {
|
3131
|
+
const message = createBaseDataChannelInfo();
|
3554
3132
|
message.label = object.label ?? "";
|
3555
3133
|
message.id = object.id ?? 0;
|
3556
3134
|
return message;
|
3557
3135
|
},
|
3558
3136
|
};
|
3559
3137
|
|
3560
|
-
|
3138
|
+
function createBaseSimulateScenario(): SimulateScenario {
|
3139
|
+
return {
|
3140
|
+
speakerUpdate: undefined,
|
3141
|
+
nodeFailure: undefined,
|
3142
|
+
migration: undefined,
|
3143
|
+
serverLeave: undefined,
|
3144
|
+
};
|
3145
|
+
}
|
3561
3146
|
|
3562
3147
|
export const SimulateScenario = {
|
3563
3148
|
encode(
|
@@ -3582,7 +3167,7 @@ export const SimulateScenario = {
|
|
3582
3167
|
decode(input: _m0.Reader | Uint8Array, length?: number): SimulateScenario {
|
3583
3168
|
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
3584
3169
|
let end = length === undefined ? reader.len : reader.pos + length;
|
3585
|
-
const message =
|
3170
|
+
const message = createBaseSimulateScenario();
|
3586
3171
|
while (reader.pos < end) {
|
3587
3172
|
const tag = reader.uint32();
|
3588
3173
|
switch (tag >>> 3) {
|
@@ -3607,34 +3192,26 @@ export const SimulateScenario = {
|
|
3607
3192
|
},
|
3608
3193
|
|
3609
3194
|
fromJSON(object: any): SimulateScenario {
|
3610
|
-
|
3611
|
-
|
3612
|
-
|
3613
|
-
|
3614
|
-
|
3615
|
-
|
3616
|
-
|
3617
|
-
|
3618
|
-
|
3619
|
-
|
3620
|
-
|
3621
|
-
|
3622
|
-
|
3623
|
-
}
|
3624
|
-
message.migration = undefined;
|
3625
|
-
}
|
3626
|
-
if (object.serverLeave !== undefined && object.serverLeave !== null) {
|
3627
|
-
message.serverLeave = Boolean(object.serverLeave);
|
3628
|
-
} else {
|
3629
|
-
message.serverLeave = undefined;
|
3630
|
-
}
|
3631
|
-
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
|
+
};
|
3632
3209
|
},
|
3633
3210
|
|
3634
3211
|
toJSON(message: SimulateScenario): unknown {
|
3635
3212
|
const obj: any = {};
|
3636
3213
|
message.speakerUpdate !== undefined &&
|
3637
|
-
(obj.speakerUpdate = message.speakerUpdate);
|
3214
|
+
(obj.speakerUpdate = Math.round(message.speakerUpdate));
|
3638
3215
|
message.nodeFailure !== undefined &&
|
3639
3216
|
(obj.nodeFailure = message.nodeFailure);
|
3640
3217
|
message.migration !== undefined && (obj.migration = message.migration);
|
@@ -3643,8 +3220,10 @@ export const SimulateScenario = {
|
|
3643
3220
|
return obj;
|
3644
3221
|
},
|
3645
3222
|
|
3646
|
-
fromPartial
|
3647
|
-
|
3223
|
+
fromPartial<I extends Exact<DeepPartial<SimulateScenario>, I>>(
|
3224
|
+
object: I
|
3225
|
+
): SimulateScenario {
|
3226
|
+
const message = createBaseSimulateScenario();
|
3648
3227
|
message.speakerUpdate = object.speakerUpdate ?? undefined;
|
3649
3228
|
message.nodeFailure = object.nodeFailure ?? undefined;
|
3650
3229
|
message.migration = object.migration ?? undefined;
|
@@ -3661,6 +3240,7 @@ type Builtin =
|
|
3661
3240
|
| number
|
3662
3241
|
| boolean
|
3663
3242
|
| undefined;
|
3243
|
+
|
3664
3244
|
export type DeepPartial<T> = T extends Builtin
|
3665
3245
|
? T
|
3666
3246
|
: T extends Array<infer U>
|
@@ -3671,7 +3251,19 @@ export type DeepPartial<T> = T extends Builtin
|
|
3671
3251
|
? { [K in keyof T]?: DeepPartial<T[K]> }
|
3672
3252
|
: Partial<T>;
|
3673
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
|
+
|
3674
3262
|
if (_m0.util.Long !== Long) {
|
3675
3263
|
_m0.util.Long = Long as any;
|
3676
3264
|
_m0.configure();
|
3677
3265
|
}
|
3266
|
+
|
3267
|
+
function isSet(value: any): boolean {
|
3268
|
+
return value !== null && value !== undefined;
|
3269
|
+
}
|