livekit-client 1.12.1 → 1.12.2
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +7 -3
- package/dist/livekit-client.e2ee.worker.js +1 -1
- package/dist/livekit-client.e2ee.worker.js.map +1 -1
- package/dist/livekit-client.e2ee.worker.mjs +389 -301
- package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
- package/dist/livekit-client.esm.mjs +12735 -14958
- package/dist/livekit-client.esm.mjs.map +1 -1
- package/dist/livekit-client.umd.js +1 -1
- package/dist/livekit-client.umd.js.map +1 -1
- package/dist/src/api/SignalClient.d.ts +2 -2
- package/dist/src/api/SignalClient.d.ts.map +1 -1
- package/dist/src/connectionHelper/ConnectionCheck.d.ts +3 -2
- package/dist/src/connectionHelper/ConnectionCheck.d.ts.map +1 -1
- package/dist/src/connectionHelper/checks/Checker.d.ts +3 -2
- package/dist/src/connectionHelper/checks/Checker.d.ts.map +1 -1
- package/dist/src/connectionHelper/checks/webrtc.d.ts.map +1 -1
- package/dist/src/connectionHelper/checks/websocket.d.ts.map +1 -1
- package/dist/src/e2ee/E2eeManager.d.ts +4 -2
- package/dist/src/e2ee/E2eeManager.d.ts.map +1 -1
- package/dist/src/e2ee/KeyProvider.d.ts +4 -2
- package/dist/src/e2ee/KeyProvider.d.ts.map +1 -1
- package/dist/src/e2ee/constants.d.ts +1 -0
- package/dist/src/e2ee/constants.d.ts.map +1 -1
- package/dist/src/e2ee/types.d.ts +1 -0
- package/dist/src/e2ee/types.d.ts.map +1 -1
- package/dist/src/e2ee/worker/FrameCryptor.d.ts +4 -2
- package/dist/src/e2ee/worker/FrameCryptor.d.ts.map +1 -1
- package/dist/src/e2ee/worker/ParticipantKeyHandler.d.ts +14 -3
- package/dist/src/e2ee/worker/ParticipantKeyHandler.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/proto/livekit_models_pb.d.ts +1264 -0
- package/dist/src/proto/livekit_models_pb.d.ts.map +1 -0
- package/dist/src/proto/livekit_rtc_pb.d.ts +1373 -0
- package/dist/src/proto/livekit_rtc_pb.d.ts.map +1 -0
- package/dist/src/room/PCTransport.d.ts +2 -1
- package/dist/src/room/PCTransport.d.ts.map +1 -1
- package/dist/src/room/RTCEngine.d.ts +9 -5
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/RegionUrlProvider.d.ts +4 -1
- package/dist/src/room/RegionUrlProvider.d.ts.map +1 -1
- package/dist/src/room/Room.d.ts +15 -11
- package/dist/src/room/Room.d.ts.map +1 -1
- package/dist/src/room/participant/LocalParticipant.d.ts +2 -2
- package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
- package/dist/src/room/participant/Participant.d.ts +5 -3
- package/dist/src/room/participant/Participant.d.ts.map +1 -1
- package/dist/src/room/participant/ParticipantTrackPermission.d.ts +1 -1
- package/dist/src/room/participant/ParticipantTrackPermission.d.ts.map +1 -1
- package/dist/src/room/participant/RemoteParticipant.d.ts +2 -3
- package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
- package/dist/src/room/timers.d.ts +5 -4
- package/dist/src/room/timers.d.ts.map +1 -1
- package/dist/src/room/track/LocalTrack.d.ts +3 -0
- package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
- package/dist/src/room/track/LocalTrackPublication.d.ts +1 -1
- package/dist/src/room/track/LocalTrackPublication.d.ts.map +1 -1
- package/dist/src/room/track/LocalVideoTrack.d.ts +2 -2
- package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/RemoteTrackPublication.d.ts +1 -1
- package/dist/src/room/track/RemoteTrackPublication.d.ts.map +1 -1
- package/dist/src/room/track/Track.d.ts +6 -4
- package/dist/src/room/track/Track.d.ts.map +1 -1
- package/dist/src/room/track/TrackPublication.d.ts +7 -5
- package/dist/src/room/track/TrackPublication.d.ts.map +1 -1
- package/dist/src/room/track/create.d.ts.map +1 -1
- package/dist/src/room/track/options.d.ts +7 -0
- package/dist/src/room/track/options.d.ts.map +1 -1
- package/dist/src/room/track/utils.d.ts +5 -1
- package/dist/src/room/track/utils.d.ts.map +1 -1
- package/dist/src/room/utils.d.ts +3 -1
- package/dist/src/room/utils.d.ts.map +1 -1
- package/dist/src/test/mocks.d.ts +4 -3
- package/dist/src/test/mocks.d.ts.map +1 -1
- package/dist/ts4.2/src/api/SignalClient.d.ts +2 -2
- package/dist/ts4.2/src/connectionHelper/ConnectionCheck.d.ts +3 -2
- package/dist/ts4.2/src/connectionHelper/checks/Checker.d.ts +3 -2
- package/dist/ts4.2/src/e2ee/E2eeManager.d.ts +4 -2
- package/dist/ts4.2/src/e2ee/KeyProvider.d.ts +4 -2
- package/dist/ts4.2/src/e2ee/constants.d.ts +1 -0
- package/dist/ts4.2/src/e2ee/types.d.ts +1 -0
- package/dist/ts4.2/src/e2ee/worker/FrameCryptor.d.ts +4 -2
- package/dist/ts4.2/src/e2ee/worker/ParticipantKeyHandler.d.ts +14 -3
- package/dist/ts4.2/src/index.d.ts +1 -1
- package/dist/ts4.2/src/proto/livekit_models_pb.d.ts +1264 -0
- package/dist/ts4.2/src/proto/livekit_rtc_pb.d.ts +1373 -0
- package/dist/ts4.2/src/room/PCTransport.d.ts +2 -1
- package/dist/ts4.2/src/room/RTCEngine.d.ts +9 -5
- package/dist/ts4.2/src/room/RegionUrlProvider.d.ts +4 -1
- package/dist/ts4.2/src/room/Room.d.ts +15 -11
- package/dist/ts4.2/src/room/participant/LocalParticipant.d.ts +2 -2
- package/dist/ts4.2/src/room/participant/Participant.d.ts +5 -3
- package/dist/ts4.2/src/room/participant/ParticipantTrackPermission.d.ts +1 -1
- package/dist/ts4.2/src/room/participant/RemoteParticipant.d.ts +2 -3
- package/dist/ts4.2/src/room/timers.d.ts +5 -4
- package/dist/ts4.2/src/room/track/LocalTrack.d.ts +3 -0
- package/dist/ts4.2/src/room/track/LocalTrackPublication.d.ts +1 -1
- package/dist/ts4.2/src/room/track/LocalVideoTrack.d.ts +2 -2
- package/dist/ts4.2/src/room/track/RemoteTrackPublication.d.ts +1 -1
- package/dist/ts4.2/src/room/track/Track.d.ts +6 -4
- package/dist/ts4.2/src/room/track/TrackPublication.d.ts +7 -5
- package/dist/ts4.2/src/room/track/options.d.ts +7 -0
- package/dist/ts4.2/src/room/track/utils.d.ts +5 -1
- package/dist/ts4.2/src/room/utils.d.ts +3 -1
- package/dist/ts4.2/src/test/mocks.d.ts +4 -3
- package/package.json +10 -10
- package/src/api/SignalClient.ts +104 -101
- package/src/connectionHelper/ConnectionCheck.ts +3 -2
- package/src/connectionHelper/checks/Checker.ts +3 -3
- package/src/connectionHelper/checks/webrtc.ts +66 -2
- package/src/connectionHelper/checks/websocket.ts +4 -0
- package/src/e2ee/E2eeManager.ts +4 -3
- package/src/e2ee/KeyProvider.ts +3 -2
- package/src/e2ee/constants.ts +4 -0
- package/src/e2ee/types.ts +1 -0
- package/src/e2ee/worker/FrameCryptor.test.ts +1 -3
- package/src/e2ee/worker/FrameCryptor.ts +5 -5
- package/src/e2ee/worker/ParticipantKeyHandler.ts +37 -6
- package/src/e2ee/worker/e2ee.worker.ts +1 -1
- package/src/index.ts +1 -1
- package/src/proto/livekit_models_pb.ts +2096 -0
- package/src/proto/livekit_rtc_pb.ts +2332 -0
- package/src/room/PCTransport.ts +1 -1
- package/src/room/RTCEngine.ts +24 -18
- package/src/room/RegionUrlProvider.ts +11 -2
- package/src/room/Room.test.ts +1 -0
- package/src/room/Room.ts +158 -79
- package/src/room/participant/LocalParticipant.ts +43 -59
- package/src/room/participant/Participant.ts +6 -4
- package/src/room/participant/ParticipantTrackPermission.ts +3 -3
- package/src/room/participant/RemoteParticipant.ts +5 -6
- package/src/room/participant/publishUtils.test.ts +1 -0
- package/src/room/track/LocalTrack.ts +24 -9
- package/src/room/track/LocalTrackPublication.ts +1 -1
- package/src/room/track/LocalVideoTrack.test.ts +2 -1
- package/src/room/track/LocalVideoTrack.ts +22 -22
- package/src/room/track/RemoteTrackPublication.ts +12 -7
- package/src/room/track/RemoteVideoTrack.test.ts +5 -4
- package/src/room/track/Track.ts +9 -6
- package/src/room/track/TrackPublication.ts +7 -5
- package/src/room/track/create.ts +9 -17
- package/src/room/track/facingMode.test.ts +1 -0
- package/src/room/track/options.ts +6 -0
- package/src/room/track/utils.test.ts +1 -0
- package/src/room/track/utils.ts +44 -2
- package/src/room/utils.test.ts +16 -0
- package/src/room/utils.ts +20 -4
- package/src/test/mocks.ts +7 -5
- package/src/utils/AsyncQueue.test.ts +1 -0
- package/src/utils/browserParser.test.ts +33 -3
- package/src/utils/browserParser.ts +1 -1
- package/dist/src/proto/google/protobuf/timestamp.d.ts +0 -146
- package/dist/src/proto/google/protobuf/timestamp.d.ts.map +0 -1
- package/dist/src/proto/livekit_models.d.ts +0 -2399
- package/dist/src/proto/livekit_models.d.ts.map +0 -1
- package/dist/src/proto/livekit_rtc.d.ts +0 -14352
- package/dist/src/proto/livekit_rtc.d.ts.map +0 -1
- package/dist/ts4.2/src/proto/google/protobuf/timestamp.d.ts +0 -150
- package/dist/ts4.2/src/proto/livekit_models.d.ts +0 -2659
- package/dist/ts4.2/src/proto/livekit_rtc.d.ts +0 -15764
- package/src/proto/google/protobuf/timestamp.ts +0 -230
- package/src/proto/livekit_models.ts +0 -4006
- package/src/proto/livekit_rtc.ts +0 -4672
package/src/proto/livekit_rtc.ts
DELETED
@@ -1,4672 +0,0 @@
|
|
1
|
-
/* eslint-disable */
|
2
|
-
import Long from "long";
|
3
|
-
import _m0 from "protobufjs/minimal";
|
4
|
-
import {
|
5
|
-
ClientConfiguration,
|
6
|
-
ConnectionQuality,
|
7
|
-
connectionQualityFromJSON,
|
8
|
-
connectionQualityToJSON,
|
9
|
-
DisconnectReason,
|
10
|
-
disconnectReasonFromJSON,
|
11
|
-
disconnectReasonToJSON,
|
12
|
-
Encryption_Type,
|
13
|
-
encryption_TypeFromJSON,
|
14
|
-
encryption_TypeToJSON,
|
15
|
-
ParticipantInfo,
|
16
|
-
ParticipantTracks,
|
17
|
-
Room,
|
18
|
-
ServerInfo,
|
19
|
-
SpeakerInfo,
|
20
|
-
SubscriptionError,
|
21
|
-
subscriptionErrorFromJSON,
|
22
|
-
subscriptionErrorToJSON,
|
23
|
-
TrackInfo,
|
24
|
-
TrackSource,
|
25
|
-
trackSourceFromJSON,
|
26
|
-
trackSourceToJSON,
|
27
|
-
TrackType,
|
28
|
-
trackTypeFromJSON,
|
29
|
-
trackTypeToJSON,
|
30
|
-
VideoLayer,
|
31
|
-
VideoQuality,
|
32
|
-
videoQualityFromJSON,
|
33
|
-
videoQualityToJSON,
|
34
|
-
} from "./livekit_models";
|
35
|
-
|
36
|
-
export const protobufPackage = "livekit";
|
37
|
-
|
38
|
-
export enum SignalTarget {
|
39
|
-
PUBLISHER = 0,
|
40
|
-
SUBSCRIBER = 1,
|
41
|
-
UNRECOGNIZED = -1,
|
42
|
-
}
|
43
|
-
|
44
|
-
export function signalTargetFromJSON(object: any): SignalTarget {
|
45
|
-
switch (object) {
|
46
|
-
case 0:
|
47
|
-
case "PUBLISHER":
|
48
|
-
return SignalTarget.PUBLISHER;
|
49
|
-
case 1:
|
50
|
-
case "SUBSCRIBER":
|
51
|
-
return SignalTarget.SUBSCRIBER;
|
52
|
-
case -1:
|
53
|
-
case "UNRECOGNIZED":
|
54
|
-
default:
|
55
|
-
return SignalTarget.UNRECOGNIZED;
|
56
|
-
}
|
57
|
-
}
|
58
|
-
|
59
|
-
export function signalTargetToJSON(object: SignalTarget): string {
|
60
|
-
switch (object) {
|
61
|
-
case SignalTarget.PUBLISHER:
|
62
|
-
return "PUBLISHER";
|
63
|
-
case SignalTarget.SUBSCRIBER:
|
64
|
-
return "SUBSCRIBER";
|
65
|
-
case SignalTarget.UNRECOGNIZED:
|
66
|
-
default:
|
67
|
-
return "UNRECOGNIZED";
|
68
|
-
}
|
69
|
-
}
|
70
|
-
|
71
|
-
export enum StreamState {
|
72
|
-
ACTIVE = 0,
|
73
|
-
PAUSED = 1,
|
74
|
-
UNRECOGNIZED = -1,
|
75
|
-
}
|
76
|
-
|
77
|
-
export function streamStateFromJSON(object: any): StreamState {
|
78
|
-
switch (object) {
|
79
|
-
case 0:
|
80
|
-
case "ACTIVE":
|
81
|
-
return StreamState.ACTIVE;
|
82
|
-
case 1:
|
83
|
-
case "PAUSED":
|
84
|
-
return StreamState.PAUSED;
|
85
|
-
case -1:
|
86
|
-
case "UNRECOGNIZED":
|
87
|
-
default:
|
88
|
-
return StreamState.UNRECOGNIZED;
|
89
|
-
}
|
90
|
-
}
|
91
|
-
|
92
|
-
export function streamStateToJSON(object: StreamState): string {
|
93
|
-
switch (object) {
|
94
|
-
case StreamState.ACTIVE:
|
95
|
-
return "ACTIVE";
|
96
|
-
case StreamState.PAUSED:
|
97
|
-
return "PAUSED";
|
98
|
-
case StreamState.UNRECOGNIZED:
|
99
|
-
default:
|
100
|
-
return "UNRECOGNIZED";
|
101
|
-
}
|
102
|
-
}
|
103
|
-
|
104
|
-
export enum CandidateProtocol {
|
105
|
-
UDP = 0,
|
106
|
-
TCP = 1,
|
107
|
-
TLS = 2,
|
108
|
-
UNRECOGNIZED = -1,
|
109
|
-
}
|
110
|
-
|
111
|
-
export function candidateProtocolFromJSON(object: any): CandidateProtocol {
|
112
|
-
switch (object) {
|
113
|
-
case 0:
|
114
|
-
case "UDP":
|
115
|
-
return CandidateProtocol.UDP;
|
116
|
-
case 1:
|
117
|
-
case "TCP":
|
118
|
-
return CandidateProtocol.TCP;
|
119
|
-
case 2:
|
120
|
-
case "TLS":
|
121
|
-
return CandidateProtocol.TLS;
|
122
|
-
case -1:
|
123
|
-
case "UNRECOGNIZED":
|
124
|
-
default:
|
125
|
-
return CandidateProtocol.UNRECOGNIZED;
|
126
|
-
}
|
127
|
-
}
|
128
|
-
|
129
|
-
export function candidateProtocolToJSON(object: CandidateProtocol): string {
|
130
|
-
switch (object) {
|
131
|
-
case CandidateProtocol.UDP:
|
132
|
-
return "UDP";
|
133
|
-
case CandidateProtocol.TCP:
|
134
|
-
return "TCP";
|
135
|
-
case CandidateProtocol.TLS:
|
136
|
-
return "TLS";
|
137
|
-
case CandidateProtocol.UNRECOGNIZED:
|
138
|
-
default:
|
139
|
-
return "UNRECOGNIZED";
|
140
|
-
}
|
141
|
-
}
|
142
|
-
|
143
|
-
export interface SignalRequest {
|
144
|
-
message?:
|
145
|
-
| { $case: "offer"; offer: SessionDescription }
|
146
|
-
| { $case: "answer"; answer: SessionDescription }
|
147
|
-
| { $case: "trickle"; trickle: TrickleRequest }
|
148
|
-
| { $case: "addTrack"; addTrack: AddTrackRequest }
|
149
|
-
| { $case: "mute"; mute: MuteTrackRequest }
|
150
|
-
| { $case: "subscription"; subscription: UpdateSubscription }
|
151
|
-
| { $case: "trackSetting"; trackSetting: UpdateTrackSettings }
|
152
|
-
| { $case: "leave"; leave: LeaveRequest }
|
153
|
-
| { $case: "updateLayers"; updateLayers: UpdateVideoLayers }
|
154
|
-
| { $case: "subscriptionPermission"; subscriptionPermission: SubscriptionPermission }
|
155
|
-
| { $case: "syncState"; syncState: SyncState }
|
156
|
-
| { $case: "simulate"; simulate: SimulateScenario }
|
157
|
-
| { $case: "ping"; ping: number }
|
158
|
-
| { $case: "updateMetadata"; updateMetadata: UpdateParticipantMetadata }
|
159
|
-
| { $case: "pingReq"; pingReq: Ping };
|
160
|
-
}
|
161
|
-
|
162
|
-
export interface SignalResponse {
|
163
|
-
message?:
|
164
|
-
| { $case: "join"; join: JoinResponse }
|
165
|
-
| { $case: "answer"; answer: SessionDescription }
|
166
|
-
| { $case: "offer"; offer: SessionDescription }
|
167
|
-
| { $case: "trickle"; trickle: TrickleRequest }
|
168
|
-
| { $case: "update"; update: ParticipantUpdate }
|
169
|
-
| { $case: "trackPublished"; trackPublished: TrackPublishedResponse }
|
170
|
-
| { $case: "leave"; leave: LeaveRequest }
|
171
|
-
| { $case: "mute"; mute: MuteTrackRequest }
|
172
|
-
| { $case: "speakersChanged"; speakersChanged: SpeakersChanged }
|
173
|
-
| { $case: "roomUpdate"; roomUpdate: RoomUpdate }
|
174
|
-
| { $case: "connectionQuality"; connectionQuality: ConnectionQualityUpdate }
|
175
|
-
| { $case: "streamStateUpdate"; streamStateUpdate: StreamStateUpdate }
|
176
|
-
| { $case: "subscribedQualityUpdate"; subscribedQualityUpdate: SubscribedQualityUpdate }
|
177
|
-
| { $case: "subscriptionPermissionUpdate"; subscriptionPermissionUpdate: SubscriptionPermissionUpdate }
|
178
|
-
| { $case: "refreshToken"; refreshToken: string }
|
179
|
-
| { $case: "trackUnpublished"; trackUnpublished: TrackUnpublishedResponse }
|
180
|
-
| { $case: "pong"; pong: number }
|
181
|
-
| { $case: "reconnect"; reconnect: ReconnectResponse }
|
182
|
-
| { $case: "pongResp"; pongResp: Pong }
|
183
|
-
| { $case: "subscriptionResponse"; subscriptionResponse: SubscriptionResponse };
|
184
|
-
}
|
185
|
-
|
186
|
-
export interface SimulcastCodec {
|
187
|
-
codec: string;
|
188
|
-
cid: string;
|
189
|
-
enableSimulcastLayers: boolean;
|
190
|
-
}
|
191
|
-
|
192
|
-
export interface AddTrackRequest {
|
193
|
-
/** client ID of track, to match it when RTC track is received */
|
194
|
-
cid: string;
|
195
|
-
name: string;
|
196
|
-
type: TrackType;
|
197
|
-
/** to be deprecated in favor of layers */
|
198
|
-
width: number;
|
199
|
-
height: number;
|
200
|
-
/** true to add track and initialize to muted */
|
201
|
-
muted: boolean;
|
202
|
-
/** true if DTX (Discontinuous Transmission) is disabled for audio */
|
203
|
-
disableDtx: boolean;
|
204
|
-
source: TrackSource;
|
205
|
-
layers: VideoLayer[];
|
206
|
-
simulcastCodecs: SimulcastCodec[];
|
207
|
-
/** server ID of track, publish new codec to exist track */
|
208
|
-
sid: string;
|
209
|
-
stereo: boolean;
|
210
|
-
/** true if RED (Redundant Encoding) is disabled for audio */
|
211
|
-
disableRed: boolean;
|
212
|
-
encryption: Encryption_Type;
|
213
|
-
}
|
214
|
-
|
215
|
-
export interface TrickleRequest {
|
216
|
-
candidateInit: string;
|
217
|
-
target: SignalTarget;
|
218
|
-
}
|
219
|
-
|
220
|
-
export interface MuteTrackRequest {
|
221
|
-
sid: string;
|
222
|
-
muted: boolean;
|
223
|
-
}
|
224
|
-
|
225
|
-
export interface JoinResponse {
|
226
|
-
room?: Room;
|
227
|
-
participant?: ParticipantInfo;
|
228
|
-
otherParticipants: ParticipantInfo[];
|
229
|
-
/** deprecated. use server_info.version instead. */
|
230
|
-
serverVersion: string;
|
231
|
-
iceServers: ICEServer[];
|
232
|
-
/** use subscriber as the primary PeerConnection */
|
233
|
-
subscriberPrimary: boolean;
|
234
|
-
/**
|
235
|
-
* when the current server isn't available, return alternate url to retry connection
|
236
|
-
* when this is set, the other fields will be largely empty
|
237
|
-
*/
|
238
|
-
alternativeUrl: string;
|
239
|
-
clientConfiguration?: ClientConfiguration;
|
240
|
-
/** deprecated. use server_info.region instead. */
|
241
|
-
serverRegion: string;
|
242
|
-
pingTimeout: number;
|
243
|
-
pingInterval: number;
|
244
|
-
serverInfo?: ServerInfo;
|
245
|
-
/** Server-Injected-Frame byte trailer, used to identify unencrypted frames when e2ee is enabled */
|
246
|
-
sifTrailer: Uint8Array;
|
247
|
-
}
|
248
|
-
|
249
|
-
export interface ReconnectResponse {
|
250
|
-
iceServers: ICEServer[];
|
251
|
-
clientConfiguration?: ClientConfiguration;
|
252
|
-
}
|
253
|
-
|
254
|
-
export interface TrackPublishedResponse {
|
255
|
-
cid: string;
|
256
|
-
track?: TrackInfo;
|
257
|
-
}
|
258
|
-
|
259
|
-
export interface TrackUnpublishedResponse {
|
260
|
-
trackSid: string;
|
261
|
-
}
|
262
|
-
|
263
|
-
export interface SessionDescription {
|
264
|
-
/** "answer" | "offer" | "pranswer" | "rollback" */
|
265
|
-
type: string;
|
266
|
-
sdp: string;
|
267
|
-
}
|
268
|
-
|
269
|
-
export interface ParticipantUpdate {
|
270
|
-
participants: ParticipantInfo[];
|
271
|
-
}
|
272
|
-
|
273
|
-
export interface UpdateSubscription {
|
274
|
-
trackSids: string[];
|
275
|
-
subscribe: boolean;
|
276
|
-
participantTracks: ParticipantTracks[];
|
277
|
-
}
|
278
|
-
|
279
|
-
export interface UpdateTrackSettings {
|
280
|
-
trackSids: string[];
|
281
|
-
/** when true, the track is placed in a paused state, with no new data returned */
|
282
|
-
disabled: boolean;
|
283
|
-
/** deprecated in favor of width & height */
|
284
|
-
quality: VideoQuality;
|
285
|
-
/** for video, width to receive */
|
286
|
-
width: number;
|
287
|
-
/** for video, height to receive */
|
288
|
-
height: number;
|
289
|
-
fps: number;
|
290
|
-
/**
|
291
|
-
* subscription priority. 1 being the highest (0 is unset)
|
292
|
-
* when unset, server sill assign priority based on the order of subscription
|
293
|
-
* server will use priority in the following ways:
|
294
|
-
* 1. when subscribed tracks exceed per-participant subscription limit, server will
|
295
|
-
* pause the lowest priority tracks
|
296
|
-
* 2. when the network is congested, server will assign available bandwidth to
|
297
|
-
* higher priority tracks first. lowest priority tracks can be paused
|
298
|
-
*/
|
299
|
-
priority: number;
|
300
|
-
}
|
301
|
-
|
302
|
-
export interface LeaveRequest {
|
303
|
-
/**
|
304
|
-
* sent when server initiates the disconnect due to server-restart
|
305
|
-
* indicates clients should attempt full-reconnect sequence
|
306
|
-
*/
|
307
|
-
canReconnect: boolean;
|
308
|
-
reason: DisconnectReason;
|
309
|
-
}
|
310
|
-
|
311
|
-
/** message to indicate published video track dimensions are changing */
|
312
|
-
export interface UpdateVideoLayers {
|
313
|
-
trackSid: string;
|
314
|
-
layers: VideoLayer[];
|
315
|
-
}
|
316
|
-
|
317
|
-
export interface UpdateParticipantMetadata {
|
318
|
-
metadata: string;
|
319
|
-
name: string;
|
320
|
-
}
|
321
|
-
|
322
|
-
export interface ICEServer {
|
323
|
-
urls: string[];
|
324
|
-
username: string;
|
325
|
-
credential: string;
|
326
|
-
}
|
327
|
-
|
328
|
-
export interface SpeakersChanged {
|
329
|
-
speakers: SpeakerInfo[];
|
330
|
-
}
|
331
|
-
|
332
|
-
export interface RoomUpdate {
|
333
|
-
room?: Room;
|
334
|
-
}
|
335
|
-
|
336
|
-
export interface ConnectionQualityInfo {
|
337
|
-
participantSid: string;
|
338
|
-
quality: ConnectionQuality;
|
339
|
-
score: number;
|
340
|
-
}
|
341
|
-
|
342
|
-
export interface ConnectionQualityUpdate {
|
343
|
-
updates: ConnectionQualityInfo[];
|
344
|
-
}
|
345
|
-
|
346
|
-
export interface StreamStateInfo {
|
347
|
-
participantSid: string;
|
348
|
-
trackSid: string;
|
349
|
-
state: StreamState;
|
350
|
-
}
|
351
|
-
|
352
|
-
export interface StreamStateUpdate {
|
353
|
-
streamStates: StreamStateInfo[];
|
354
|
-
}
|
355
|
-
|
356
|
-
export interface SubscribedQuality {
|
357
|
-
quality: VideoQuality;
|
358
|
-
enabled: boolean;
|
359
|
-
}
|
360
|
-
|
361
|
-
export interface SubscribedCodec {
|
362
|
-
codec: string;
|
363
|
-
qualities: SubscribedQuality[];
|
364
|
-
}
|
365
|
-
|
366
|
-
export interface SubscribedQualityUpdate {
|
367
|
-
trackSid: string;
|
368
|
-
subscribedQualities: SubscribedQuality[];
|
369
|
-
subscribedCodecs: SubscribedCodec[];
|
370
|
-
}
|
371
|
-
|
372
|
-
export interface TrackPermission {
|
373
|
-
/** permission could be granted either by participant sid or identity */
|
374
|
-
participantSid: string;
|
375
|
-
allTracks: boolean;
|
376
|
-
trackSids: string[];
|
377
|
-
participantIdentity: string;
|
378
|
-
}
|
379
|
-
|
380
|
-
export interface SubscriptionPermission {
|
381
|
-
allParticipants: boolean;
|
382
|
-
trackPermissions: TrackPermission[];
|
383
|
-
}
|
384
|
-
|
385
|
-
export interface SubscriptionPermissionUpdate {
|
386
|
-
participantSid: string;
|
387
|
-
trackSid: string;
|
388
|
-
allowed: boolean;
|
389
|
-
}
|
390
|
-
|
391
|
-
export interface SyncState {
|
392
|
-
/** last subscribe answer before reconnecting */
|
393
|
-
answer?: SessionDescription;
|
394
|
-
subscription?: UpdateSubscription;
|
395
|
-
publishTracks: TrackPublishedResponse[];
|
396
|
-
dataChannels: DataChannelInfo[];
|
397
|
-
/** last received server side offer before reconnecting */
|
398
|
-
offer?: SessionDescription;
|
399
|
-
}
|
400
|
-
|
401
|
-
export interface DataChannelInfo {
|
402
|
-
label: string;
|
403
|
-
id: number;
|
404
|
-
target: SignalTarget;
|
405
|
-
}
|
406
|
-
|
407
|
-
export interface SimulateScenario {
|
408
|
-
scenario?:
|
409
|
-
| { $case: "speakerUpdate"; speakerUpdate: number }
|
410
|
-
| { $case: "nodeFailure"; nodeFailure: boolean }
|
411
|
-
| { $case: "migration"; migration: boolean }
|
412
|
-
| { $case: "serverLeave"; serverLeave: boolean }
|
413
|
-
| { $case: "switchCandidateProtocol"; switchCandidateProtocol: CandidateProtocol }
|
414
|
-
| { $case: "subscriberBandwidth"; subscriberBandwidth: number };
|
415
|
-
}
|
416
|
-
|
417
|
-
export interface Ping {
|
418
|
-
timestamp: number;
|
419
|
-
/** rtt in milliseconds calculated by client */
|
420
|
-
rtt: number;
|
421
|
-
}
|
422
|
-
|
423
|
-
export interface Pong {
|
424
|
-
/** timestamp field of last received ping request */
|
425
|
-
lastPingTimestamp: number;
|
426
|
-
timestamp: number;
|
427
|
-
}
|
428
|
-
|
429
|
-
export interface RegionSettings {
|
430
|
-
regions: RegionInfo[];
|
431
|
-
}
|
432
|
-
|
433
|
-
export interface RegionInfo {
|
434
|
-
region: string;
|
435
|
-
url: string;
|
436
|
-
distance: number;
|
437
|
-
}
|
438
|
-
|
439
|
-
export interface SubscriptionResponse {
|
440
|
-
trackSid: string;
|
441
|
-
err: SubscriptionError;
|
442
|
-
}
|
443
|
-
|
444
|
-
function createBaseSignalRequest(): SignalRequest {
|
445
|
-
return { message: undefined };
|
446
|
-
}
|
447
|
-
|
448
|
-
export const SignalRequest = {
|
449
|
-
encode(message: SignalRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
450
|
-
switch (message.message?.$case) {
|
451
|
-
case "offer":
|
452
|
-
SessionDescription.encode(message.message.offer, writer.uint32(10).fork()).ldelim();
|
453
|
-
break;
|
454
|
-
case "answer":
|
455
|
-
SessionDescription.encode(message.message.answer, writer.uint32(18).fork()).ldelim();
|
456
|
-
break;
|
457
|
-
case "trickle":
|
458
|
-
TrickleRequest.encode(message.message.trickle, writer.uint32(26).fork()).ldelim();
|
459
|
-
break;
|
460
|
-
case "addTrack":
|
461
|
-
AddTrackRequest.encode(message.message.addTrack, writer.uint32(34).fork()).ldelim();
|
462
|
-
break;
|
463
|
-
case "mute":
|
464
|
-
MuteTrackRequest.encode(message.message.mute, writer.uint32(42).fork()).ldelim();
|
465
|
-
break;
|
466
|
-
case "subscription":
|
467
|
-
UpdateSubscription.encode(message.message.subscription, writer.uint32(50).fork()).ldelim();
|
468
|
-
break;
|
469
|
-
case "trackSetting":
|
470
|
-
UpdateTrackSettings.encode(message.message.trackSetting, writer.uint32(58).fork()).ldelim();
|
471
|
-
break;
|
472
|
-
case "leave":
|
473
|
-
LeaveRequest.encode(message.message.leave, writer.uint32(66).fork()).ldelim();
|
474
|
-
break;
|
475
|
-
case "updateLayers":
|
476
|
-
UpdateVideoLayers.encode(message.message.updateLayers, writer.uint32(82).fork()).ldelim();
|
477
|
-
break;
|
478
|
-
case "subscriptionPermission":
|
479
|
-
SubscriptionPermission.encode(message.message.subscriptionPermission, writer.uint32(90).fork()).ldelim();
|
480
|
-
break;
|
481
|
-
case "syncState":
|
482
|
-
SyncState.encode(message.message.syncState, writer.uint32(98).fork()).ldelim();
|
483
|
-
break;
|
484
|
-
case "simulate":
|
485
|
-
SimulateScenario.encode(message.message.simulate, writer.uint32(106).fork()).ldelim();
|
486
|
-
break;
|
487
|
-
case "ping":
|
488
|
-
writer.uint32(112).int64(message.message.ping);
|
489
|
-
break;
|
490
|
-
case "updateMetadata":
|
491
|
-
UpdateParticipantMetadata.encode(message.message.updateMetadata, writer.uint32(122).fork()).ldelim();
|
492
|
-
break;
|
493
|
-
case "pingReq":
|
494
|
-
Ping.encode(message.message.pingReq, writer.uint32(130).fork()).ldelim();
|
495
|
-
break;
|
496
|
-
}
|
497
|
-
return writer;
|
498
|
-
},
|
499
|
-
|
500
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SignalRequest {
|
501
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
502
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
503
|
-
const message = createBaseSignalRequest();
|
504
|
-
while (reader.pos < end) {
|
505
|
-
const tag = reader.uint32();
|
506
|
-
switch (tag >>> 3) {
|
507
|
-
case 1:
|
508
|
-
if (tag !== 10) {
|
509
|
-
break;
|
510
|
-
}
|
511
|
-
|
512
|
-
message.message = { $case: "offer", offer: SessionDescription.decode(reader, reader.uint32()) };
|
513
|
-
continue;
|
514
|
-
case 2:
|
515
|
-
if (tag !== 18) {
|
516
|
-
break;
|
517
|
-
}
|
518
|
-
|
519
|
-
message.message = { $case: "answer", answer: SessionDescription.decode(reader, reader.uint32()) };
|
520
|
-
continue;
|
521
|
-
case 3:
|
522
|
-
if (tag !== 26) {
|
523
|
-
break;
|
524
|
-
}
|
525
|
-
|
526
|
-
message.message = { $case: "trickle", trickle: TrickleRequest.decode(reader, reader.uint32()) };
|
527
|
-
continue;
|
528
|
-
case 4:
|
529
|
-
if (tag !== 34) {
|
530
|
-
break;
|
531
|
-
}
|
532
|
-
|
533
|
-
message.message = { $case: "addTrack", addTrack: AddTrackRequest.decode(reader, reader.uint32()) };
|
534
|
-
continue;
|
535
|
-
case 5:
|
536
|
-
if (tag !== 42) {
|
537
|
-
break;
|
538
|
-
}
|
539
|
-
|
540
|
-
message.message = { $case: "mute", mute: MuteTrackRequest.decode(reader, reader.uint32()) };
|
541
|
-
continue;
|
542
|
-
case 6:
|
543
|
-
if (tag !== 50) {
|
544
|
-
break;
|
545
|
-
}
|
546
|
-
|
547
|
-
message.message = { $case: "subscription", subscription: UpdateSubscription.decode(reader, reader.uint32()) };
|
548
|
-
continue;
|
549
|
-
case 7:
|
550
|
-
if (tag !== 58) {
|
551
|
-
break;
|
552
|
-
}
|
553
|
-
|
554
|
-
message.message = {
|
555
|
-
$case: "trackSetting",
|
556
|
-
trackSetting: UpdateTrackSettings.decode(reader, reader.uint32()),
|
557
|
-
};
|
558
|
-
continue;
|
559
|
-
case 8:
|
560
|
-
if (tag !== 66) {
|
561
|
-
break;
|
562
|
-
}
|
563
|
-
|
564
|
-
message.message = { $case: "leave", leave: LeaveRequest.decode(reader, reader.uint32()) };
|
565
|
-
continue;
|
566
|
-
case 10:
|
567
|
-
if (tag !== 82) {
|
568
|
-
break;
|
569
|
-
}
|
570
|
-
|
571
|
-
message.message = { $case: "updateLayers", updateLayers: UpdateVideoLayers.decode(reader, reader.uint32()) };
|
572
|
-
continue;
|
573
|
-
case 11:
|
574
|
-
if (tag !== 90) {
|
575
|
-
break;
|
576
|
-
}
|
577
|
-
|
578
|
-
message.message = {
|
579
|
-
$case: "subscriptionPermission",
|
580
|
-
subscriptionPermission: SubscriptionPermission.decode(reader, reader.uint32()),
|
581
|
-
};
|
582
|
-
continue;
|
583
|
-
case 12:
|
584
|
-
if (tag !== 98) {
|
585
|
-
break;
|
586
|
-
}
|
587
|
-
|
588
|
-
message.message = { $case: "syncState", syncState: SyncState.decode(reader, reader.uint32()) };
|
589
|
-
continue;
|
590
|
-
case 13:
|
591
|
-
if (tag !== 106) {
|
592
|
-
break;
|
593
|
-
}
|
594
|
-
|
595
|
-
message.message = { $case: "simulate", simulate: SimulateScenario.decode(reader, reader.uint32()) };
|
596
|
-
continue;
|
597
|
-
case 14:
|
598
|
-
if (tag !== 112) {
|
599
|
-
break;
|
600
|
-
}
|
601
|
-
|
602
|
-
message.message = { $case: "ping", ping: longToNumber(reader.int64() as Long) };
|
603
|
-
continue;
|
604
|
-
case 15:
|
605
|
-
if (tag !== 122) {
|
606
|
-
break;
|
607
|
-
}
|
608
|
-
|
609
|
-
message.message = {
|
610
|
-
$case: "updateMetadata",
|
611
|
-
updateMetadata: UpdateParticipantMetadata.decode(reader, reader.uint32()),
|
612
|
-
};
|
613
|
-
continue;
|
614
|
-
case 16:
|
615
|
-
if (tag !== 130) {
|
616
|
-
break;
|
617
|
-
}
|
618
|
-
|
619
|
-
message.message = { $case: "pingReq", pingReq: Ping.decode(reader, reader.uint32()) };
|
620
|
-
continue;
|
621
|
-
}
|
622
|
-
if ((tag & 7) === 4 || tag === 0) {
|
623
|
-
break;
|
624
|
-
}
|
625
|
-
reader.skipType(tag & 7);
|
626
|
-
}
|
627
|
-
return message;
|
628
|
-
},
|
629
|
-
|
630
|
-
fromJSON(object: any): SignalRequest {
|
631
|
-
return {
|
632
|
-
message: isSet(object.offer)
|
633
|
-
? { $case: "offer", offer: SessionDescription.fromJSON(object.offer) }
|
634
|
-
: isSet(object.answer)
|
635
|
-
? { $case: "answer", answer: SessionDescription.fromJSON(object.answer) }
|
636
|
-
: isSet(object.trickle)
|
637
|
-
? { $case: "trickle", trickle: TrickleRequest.fromJSON(object.trickle) }
|
638
|
-
: isSet(object.addTrack)
|
639
|
-
? { $case: "addTrack", addTrack: AddTrackRequest.fromJSON(object.addTrack) }
|
640
|
-
: isSet(object.mute)
|
641
|
-
? { $case: "mute", mute: MuteTrackRequest.fromJSON(object.mute) }
|
642
|
-
: isSet(object.subscription)
|
643
|
-
? { $case: "subscription", subscription: UpdateSubscription.fromJSON(object.subscription) }
|
644
|
-
: isSet(object.trackSetting)
|
645
|
-
? { $case: "trackSetting", trackSetting: UpdateTrackSettings.fromJSON(object.trackSetting) }
|
646
|
-
: isSet(object.leave)
|
647
|
-
? { $case: "leave", leave: LeaveRequest.fromJSON(object.leave) }
|
648
|
-
: isSet(object.updateLayers)
|
649
|
-
? { $case: "updateLayers", updateLayers: UpdateVideoLayers.fromJSON(object.updateLayers) }
|
650
|
-
: isSet(object.subscriptionPermission)
|
651
|
-
? {
|
652
|
-
$case: "subscriptionPermission",
|
653
|
-
subscriptionPermission: SubscriptionPermission.fromJSON(object.subscriptionPermission),
|
654
|
-
}
|
655
|
-
: isSet(object.syncState)
|
656
|
-
? { $case: "syncState", syncState: SyncState.fromJSON(object.syncState) }
|
657
|
-
: isSet(object.simulate)
|
658
|
-
? { $case: "simulate", simulate: SimulateScenario.fromJSON(object.simulate) }
|
659
|
-
: isSet(object.ping)
|
660
|
-
? { $case: "ping", ping: Number(object.ping) }
|
661
|
-
: isSet(object.updateMetadata)
|
662
|
-
? { $case: "updateMetadata", updateMetadata: UpdateParticipantMetadata.fromJSON(object.updateMetadata) }
|
663
|
-
: isSet(object.pingReq)
|
664
|
-
? { $case: "pingReq", pingReq: Ping.fromJSON(object.pingReq) }
|
665
|
-
: undefined,
|
666
|
-
};
|
667
|
-
},
|
668
|
-
|
669
|
-
toJSON(message: SignalRequest): unknown {
|
670
|
-
const obj: any = {};
|
671
|
-
message.message?.$case === "offer" &&
|
672
|
-
(obj.offer = message.message?.offer ? SessionDescription.toJSON(message.message?.offer) : undefined);
|
673
|
-
message.message?.$case === "answer" &&
|
674
|
-
(obj.answer = message.message?.answer ? SessionDescription.toJSON(message.message?.answer) : undefined);
|
675
|
-
message.message?.$case === "trickle" &&
|
676
|
-
(obj.trickle = message.message?.trickle ? TrickleRequest.toJSON(message.message?.trickle) : undefined);
|
677
|
-
message.message?.$case === "addTrack" &&
|
678
|
-
(obj.addTrack = message.message?.addTrack ? AddTrackRequest.toJSON(message.message?.addTrack) : undefined);
|
679
|
-
message.message?.$case === "mute" &&
|
680
|
-
(obj.mute = message.message?.mute ? MuteTrackRequest.toJSON(message.message?.mute) : undefined);
|
681
|
-
message.message?.$case === "subscription" && (obj.subscription = message.message?.subscription
|
682
|
-
? UpdateSubscription.toJSON(message.message?.subscription)
|
683
|
-
: undefined);
|
684
|
-
message.message?.$case === "trackSetting" && (obj.trackSetting = message.message?.trackSetting
|
685
|
-
? UpdateTrackSettings.toJSON(message.message?.trackSetting)
|
686
|
-
: undefined);
|
687
|
-
message.message?.$case === "leave" &&
|
688
|
-
(obj.leave = message.message?.leave ? LeaveRequest.toJSON(message.message?.leave) : undefined);
|
689
|
-
message.message?.$case === "updateLayers" && (obj.updateLayers = message.message?.updateLayers
|
690
|
-
? UpdateVideoLayers.toJSON(message.message?.updateLayers)
|
691
|
-
: undefined);
|
692
|
-
message.message?.$case === "subscriptionPermission" &&
|
693
|
-
(obj.subscriptionPermission = message.message?.subscriptionPermission
|
694
|
-
? SubscriptionPermission.toJSON(message.message?.subscriptionPermission)
|
695
|
-
: undefined);
|
696
|
-
message.message?.$case === "syncState" &&
|
697
|
-
(obj.syncState = message.message?.syncState ? SyncState.toJSON(message.message?.syncState) : undefined);
|
698
|
-
message.message?.$case === "simulate" &&
|
699
|
-
(obj.simulate = message.message?.simulate ? SimulateScenario.toJSON(message.message?.simulate) : undefined);
|
700
|
-
message.message?.$case === "ping" && (obj.ping = Math.round(message.message?.ping));
|
701
|
-
message.message?.$case === "updateMetadata" && (obj.updateMetadata = message.message?.updateMetadata
|
702
|
-
? UpdateParticipantMetadata.toJSON(message.message?.updateMetadata)
|
703
|
-
: undefined);
|
704
|
-
message.message?.$case === "pingReq" &&
|
705
|
-
(obj.pingReq = message.message?.pingReq ? Ping.toJSON(message.message?.pingReq) : undefined);
|
706
|
-
return obj;
|
707
|
-
},
|
708
|
-
|
709
|
-
create<I extends Exact<DeepPartial<SignalRequest>, I>>(base?: I): SignalRequest {
|
710
|
-
return SignalRequest.fromPartial(base ?? {});
|
711
|
-
},
|
712
|
-
|
713
|
-
fromPartial<I extends Exact<DeepPartial<SignalRequest>, I>>(object: I): SignalRequest {
|
714
|
-
const message = createBaseSignalRequest();
|
715
|
-
if (object.message?.$case === "offer" && object.message?.offer !== undefined && object.message?.offer !== null) {
|
716
|
-
message.message = { $case: "offer", offer: SessionDescription.fromPartial(object.message.offer) };
|
717
|
-
}
|
718
|
-
if (object.message?.$case === "answer" && object.message?.answer !== undefined && object.message?.answer !== null) {
|
719
|
-
message.message = { $case: "answer", answer: SessionDescription.fromPartial(object.message.answer) };
|
720
|
-
}
|
721
|
-
if (
|
722
|
-
object.message?.$case === "trickle" && object.message?.trickle !== undefined && object.message?.trickle !== null
|
723
|
-
) {
|
724
|
-
message.message = { $case: "trickle", trickle: TrickleRequest.fromPartial(object.message.trickle) };
|
725
|
-
}
|
726
|
-
if (
|
727
|
-
object.message?.$case === "addTrack" &&
|
728
|
-
object.message?.addTrack !== undefined &&
|
729
|
-
object.message?.addTrack !== null
|
730
|
-
) {
|
731
|
-
message.message = { $case: "addTrack", addTrack: AddTrackRequest.fromPartial(object.message.addTrack) };
|
732
|
-
}
|
733
|
-
if (object.message?.$case === "mute" && object.message?.mute !== undefined && object.message?.mute !== null) {
|
734
|
-
message.message = { $case: "mute", mute: MuteTrackRequest.fromPartial(object.message.mute) };
|
735
|
-
}
|
736
|
-
if (
|
737
|
-
object.message?.$case === "subscription" &&
|
738
|
-
object.message?.subscription !== undefined &&
|
739
|
-
object.message?.subscription !== null
|
740
|
-
) {
|
741
|
-
message.message = {
|
742
|
-
$case: "subscription",
|
743
|
-
subscription: UpdateSubscription.fromPartial(object.message.subscription),
|
744
|
-
};
|
745
|
-
}
|
746
|
-
if (
|
747
|
-
object.message?.$case === "trackSetting" &&
|
748
|
-
object.message?.trackSetting !== undefined &&
|
749
|
-
object.message?.trackSetting !== null
|
750
|
-
) {
|
751
|
-
message.message = {
|
752
|
-
$case: "trackSetting",
|
753
|
-
trackSetting: UpdateTrackSettings.fromPartial(object.message.trackSetting),
|
754
|
-
};
|
755
|
-
}
|
756
|
-
if (object.message?.$case === "leave" && object.message?.leave !== undefined && object.message?.leave !== null) {
|
757
|
-
message.message = { $case: "leave", leave: LeaveRequest.fromPartial(object.message.leave) };
|
758
|
-
}
|
759
|
-
if (
|
760
|
-
object.message?.$case === "updateLayers" &&
|
761
|
-
object.message?.updateLayers !== undefined &&
|
762
|
-
object.message?.updateLayers !== null
|
763
|
-
) {
|
764
|
-
message.message = {
|
765
|
-
$case: "updateLayers",
|
766
|
-
updateLayers: UpdateVideoLayers.fromPartial(object.message.updateLayers),
|
767
|
-
};
|
768
|
-
}
|
769
|
-
if (
|
770
|
-
object.message?.$case === "subscriptionPermission" &&
|
771
|
-
object.message?.subscriptionPermission !== undefined &&
|
772
|
-
object.message?.subscriptionPermission !== null
|
773
|
-
) {
|
774
|
-
message.message = {
|
775
|
-
$case: "subscriptionPermission",
|
776
|
-
subscriptionPermission: SubscriptionPermission.fromPartial(object.message.subscriptionPermission),
|
777
|
-
};
|
778
|
-
}
|
779
|
-
if (
|
780
|
-
object.message?.$case === "syncState" &&
|
781
|
-
object.message?.syncState !== undefined &&
|
782
|
-
object.message?.syncState !== null
|
783
|
-
) {
|
784
|
-
message.message = { $case: "syncState", syncState: SyncState.fromPartial(object.message.syncState) };
|
785
|
-
}
|
786
|
-
if (
|
787
|
-
object.message?.$case === "simulate" &&
|
788
|
-
object.message?.simulate !== undefined &&
|
789
|
-
object.message?.simulate !== null
|
790
|
-
) {
|
791
|
-
message.message = { $case: "simulate", simulate: SimulateScenario.fromPartial(object.message.simulate) };
|
792
|
-
}
|
793
|
-
if (object.message?.$case === "ping" && object.message?.ping !== undefined && object.message?.ping !== null) {
|
794
|
-
message.message = { $case: "ping", ping: object.message.ping };
|
795
|
-
}
|
796
|
-
if (
|
797
|
-
object.message?.$case === "updateMetadata" &&
|
798
|
-
object.message?.updateMetadata !== undefined &&
|
799
|
-
object.message?.updateMetadata !== null
|
800
|
-
) {
|
801
|
-
message.message = {
|
802
|
-
$case: "updateMetadata",
|
803
|
-
updateMetadata: UpdateParticipantMetadata.fromPartial(object.message.updateMetadata),
|
804
|
-
};
|
805
|
-
}
|
806
|
-
if (
|
807
|
-
object.message?.$case === "pingReq" && object.message?.pingReq !== undefined && object.message?.pingReq !== null
|
808
|
-
) {
|
809
|
-
message.message = { $case: "pingReq", pingReq: Ping.fromPartial(object.message.pingReq) };
|
810
|
-
}
|
811
|
-
return message;
|
812
|
-
},
|
813
|
-
};
|
814
|
-
|
815
|
-
function createBaseSignalResponse(): SignalResponse {
|
816
|
-
return { message: undefined };
|
817
|
-
}
|
818
|
-
|
819
|
-
export const SignalResponse = {
|
820
|
-
encode(message: SignalResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
821
|
-
switch (message.message?.$case) {
|
822
|
-
case "join":
|
823
|
-
JoinResponse.encode(message.message.join, writer.uint32(10).fork()).ldelim();
|
824
|
-
break;
|
825
|
-
case "answer":
|
826
|
-
SessionDescription.encode(message.message.answer, writer.uint32(18).fork()).ldelim();
|
827
|
-
break;
|
828
|
-
case "offer":
|
829
|
-
SessionDescription.encode(message.message.offer, writer.uint32(26).fork()).ldelim();
|
830
|
-
break;
|
831
|
-
case "trickle":
|
832
|
-
TrickleRequest.encode(message.message.trickle, writer.uint32(34).fork()).ldelim();
|
833
|
-
break;
|
834
|
-
case "update":
|
835
|
-
ParticipantUpdate.encode(message.message.update, writer.uint32(42).fork()).ldelim();
|
836
|
-
break;
|
837
|
-
case "trackPublished":
|
838
|
-
TrackPublishedResponse.encode(message.message.trackPublished, writer.uint32(50).fork()).ldelim();
|
839
|
-
break;
|
840
|
-
case "leave":
|
841
|
-
LeaveRequest.encode(message.message.leave, writer.uint32(66).fork()).ldelim();
|
842
|
-
break;
|
843
|
-
case "mute":
|
844
|
-
MuteTrackRequest.encode(message.message.mute, writer.uint32(74).fork()).ldelim();
|
845
|
-
break;
|
846
|
-
case "speakersChanged":
|
847
|
-
SpeakersChanged.encode(message.message.speakersChanged, writer.uint32(82).fork()).ldelim();
|
848
|
-
break;
|
849
|
-
case "roomUpdate":
|
850
|
-
RoomUpdate.encode(message.message.roomUpdate, writer.uint32(90).fork()).ldelim();
|
851
|
-
break;
|
852
|
-
case "connectionQuality":
|
853
|
-
ConnectionQualityUpdate.encode(message.message.connectionQuality, writer.uint32(98).fork()).ldelim();
|
854
|
-
break;
|
855
|
-
case "streamStateUpdate":
|
856
|
-
StreamStateUpdate.encode(message.message.streamStateUpdate, writer.uint32(106).fork()).ldelim();
|
857
|
-
break;
|
858
|
-
case "subscribedQualityUpdate":
|
859
|
-
SubscribedQualityUpdate.encode(message.message.subscribedQualityUpdate, writer.uint32(114).fork()).ldelim();
|
860
|
-
break;
|
861
|
-
case "subscriptionPermissionUpdate":
|
862
|
-
SubscriptionPermissionUpdate.encode(message.message.subscriptionPermissionUpdate, writer.uint32(122).fork())
|
863
|
-
.ldelim();
|
864
|
-
break;
|
865
|
-
case "refreshToken":
|
866
|
-
writer.uint32(130).string(message.message.refreshToken);
|
867
|
-
break;
|
868
|
-
case "trackUnpublished":
|
869
|
-
TrackUnpublishedResponse.encode(message.message.trackUnpublished, writer.uint32(138).fork()).ldelim();
|
870
|
-
break;
|
871
|
-
case "pong":
|
872
|
-
writer.uint32(144).int64(message.message.pong);
|
873
|
-
break;
|
874
|
-
case "reconnect":
|
875
|
-
ReconnectResponse.encode(message.message.reconnect, writer.uint32(154).fork()).ldelim();
|
876
|
-
break;
|
877
|
-
case "pongResp":
|
878
|
-
Pong.encode(message.message.pongResp, writer.uint32(162).fork()).ldelim();
|
879
|
-
break;
|
880
|
-
case "subscriptionResponse":
|
881
|
-
SubscriptionResponse.encode(message.message.subscriptionResponse, writer.uint32(170).fork()).ldelim();
|
882
|
-
break;
|
883
|
-
}
|
884
|
-
return writer;
|
885
|
-
},
|
886
|
-
|
887
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SignalResponse {
|
888
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
889
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
890
|
-
const message = createBaseSignalResponse();
|
891
|
-
while (reader.pos < end) {
|
892
|
-
const tag = reader.uint32();
|
893
|
-
switch (tag >>> 3) {
|
894
|
-
case 1:
|
895
|
-
if (tag !== 10) {
|
896
|
-
break;
|
897
|
-
}
|
898
|
-
|
899
|
-
message.message = { $case: "join", join: JoinResponse.decode(reader, reader.uint32()) };
|
900
|
-
continue;
|
901
|
-
case 2:
|
902
|
-
if (tag !== 18) {
|
903
|
-
break;
|
904
|
-
}
|
905
|
-
|
906
|
-
message.message = { $case: "answer", answer: SessionDescription.decode(reader, reader.uint32()) };
|
907
|
-
continue;
|
908
|
-
case 3:
|
909
|
-
if (tag !== 26) {
|
910
|
-
break;
|
911
|
-
}
|
912
|
-
|
913
|
-
message.message = { $case: "offer", offer: SessionDescription.decode(reader, reader.uint32()) };
|
914
|
-
continue;
|
915
|
-
case 4:
|
916
|
-
if (tag !== 34) {
|
917
|
-
break;
|
918
|
-
}
|
919
|
-
|
920
|
-
message.message = { $case: "trickle", trickle: TrickleRequest.decode(reader, reader.uint32()) };
|
921
|
-
continue;
|
922
|
-
case 5:
|
923
|
-
if (tag !== 42) {
|
924
|
-
break;
|
925
|
-
}
|
926
|
-
|
927
|
-
message.message = { $case: "update", update: ParticipantUpdate.decode(reader, reader.uint32()) };
|
928
|
-
continue;
|
929
|
-
case 6:
|
930
|
-
if (tag !== 50) {
|
931
|
-
break;
|
932
|
-
}
|
933
|
-
|
934
|
-
message.message = {
|
935
|
-
$case: "trackPublished",
|
936
|
-
trackPublished: TrackPublishedResponse.decode(reader, reader.uint32()),
|
937
|
-
};
|
938
|
-
continue;
|
939
|
-
case 8:
|
940
|
-
if (tag !== 66) {
|
941
|
-
break;
|
942
|
-
}
|
943
|
-
|
944
|
-
message.message = { $case: "leave", leave: LeaveRequest.decode(reader, reader.uint32()) };
|
945
|
-
continue;
|
946
|
-
case 9:
|
947
|
-
if (tag !== 74) {
|
948
|
-
break;
|
949
|
-
}
|
950
|
-
|
951
|
-
message.message = { $case: "mute", mute: MuteTrackRequest.decode(reader, reader.uint32()) };
|
952
|
-
continue;
|
953
|
-
case 10:
|
954
|
-
if (tag !== 82) {
|
955
|
-
break;
|
956
|
-
}
|
957
|
-
|
958
|
-
message.message = {
|
959
|
-
$case: "speakersChanged",
|
960
|
-
speakersChanged: SpeakersChanged.decode(reader, reader.uint32()),
|
961
|
-
};
|
962
|
-
continue;
|
963
|
-
case 11:
|
964
|
-
if (tag !== 90) {
|
965
|
-
break;
|
966
|
-
}
|
967
|
-
|
968
|
-
message.message = { $case: "roomUpdate", roomUpdate: RoomUpdate.decode(reader, reader.uint32()) };
|
969
|
-
continue;
|
970
|
-
case 12:
|
971
|
-
if (tag !== 98) {
|
972
|
-
break;
|
973
|
-
}
|
974
|
-
|
975
|
-
message.message = {
|
976
|
-
$case: "connectionQuality",
|
977
|
-
connectionQuality: ConnectionQualityUpdate.decode(reader, reader.uint32()),
|
978
|
-
};
|
979
|
-
continue;
|
980
|
-
case 13:
|
981
|
-
if (tag !== 106) {
|
982
|
-
break;
|
983
|
-
}
|
984
|
-
|
985
|
-
message.message = {
|
986
|
-
$case: "streamStateUpdate",
|
987
|
-
streamStateUpdate: StreamStateUpdate.decode(reader, reader.uint32()),
|
988
|
-
};
|
989
|
-
continue;
|
990
|
-
case 14:
|
991
|
-
if (tag !== 114) {
|
992
|
-
break;
|
993
|
-
}
|
994
|
-
|
995
|
-
message.message = {
|
996
|
-
$case: "subscribedQualityUpdate",
|
997
|
-
subscribedQualityUpdate: SubscribedQualityUpdate.decode(reader, reader.uint32()),
|
998
|
-
};
|
999
|
-
continue;
|
1000
|
-
case 15:
|
1001
|
-
if (tag !== 122) {
|
1002
|
-
break;
|
1003
|
-
}
|
1004
|
-
|
1005
|
-
message.message = {
|
1006
|
-
$case: "subscriptionPermissionUpdate",
|
1007
|
-
subscriptionPermissionUpdate: SubscriptionPermissionUpdate.decode(reader, reader.uint32()),
|
1008
|
-
};
|
1009
|
-
continue;
|
1010
|
-
case 16:
|
1011
|
-
if (tag !== 130) {
|
1012
|
-
break;
|
1013
|
-
}
|
1014
|
-
|
1015
|
-
message.message = { $case: "refreshToken", refreshToken: reader.string() };
|
1016
|
-
continue;
|
1017
|
-
case 17:
|
1018
|
-
if (tag !== 138) {
|
1019
|
-
break;
|
1020
|
-
}
|
1021
|
-
|
1022
|
-
message.message = {
|
1023
|
-
$case: "trackUnpublished",
|
1024
|
-
trackUnpublished: TrackUnpublishedResponse.decode(reader, reader.uint32()),
|
1025
|
-
};
|
1026
|
-
continue;
|
1027
|
-
case 18:
|
1028
|
-
if (tag !== 144) {
|
1029
|
-
break;
|
1030
|
-
}
|
1031
|
-
|
1032
|
-
message.message = { $case: "pong", pong: longToNumber(reader.int64() as Long) };
|
1033
|
-
continue;
|
1034
|
-
case 19:
|
1035
|
-
if (tag !== 154) {
|
1036
|
-
break;
|
1037
|
-
}
|
1038
|
-
|
1039
|
-
message.message = { $case: "reconnect", reconnect: ReconnectResponse.decode(reader, reader.uint32()) };
|
1040
|
-
continue;
|
1041
|
-
case 20:
|
1042
|
-
if (tag !== 162) {
|
1043
|
-
break;
|
1044
|
-
}
|
1045
|
-
|
1046
|
-
message.message = { $case: "pongResp", pongResp: Pong.decode(reader, reader.uint32()) };
|
1047
|
-
continue;
|
1048
|
-
case 21:
|
1049
|
-
if (tag !== 170) {
|
1050
|
-
break;
|
1051
|
-
}
|
1052
|
-
|
1053
|
-
message.message = {
|
1054
|
-
$case: "subscriptionResponse",
|
1055
|
-
subscriptionResponse: SubscriptionResponse.decode(reader, reader.uint32()),
|
1056
|
-
};
|
1057
|
-
continue;
|
1058
|
-
}
|
1059
|
-
if ((tag & 7) === 4 || tag === 0) {
|
1060
|
-
break;
|
1061
|
-
}
|
1062
|
-
reader.skipType(tag & 7);
|
1063
|
-
}
|
1064
|
-
return message;
|
1065
|
-
},
|
1066
|
-
|
1067
|
-
fromJSON(object: any): SignalResponse {
|
1068
|
-
return {
|
1069
|
-
message: isSet(object.join)
|
1070
|
-
? { $case: "join", join: JoinResponse.fromJSON(object.join) }
|
1071
|
-
: isSet(object.answer)
|
1072
|
-
? { $case: "answer", answer: SessionDescription.fromJSON(object.answer) }
|
1073
|
-
: isSet(object.offer)
|
1074
|
-
? { $case: "offer", offer: SessionDescription.fromJSON(object.offer) }
|
1075
|
-
: isSet(object.trickle)
|
1076
|
-
? { $case: "trickle", trickle: TrickleRequest.fromJSON(object.trickle) }
|
1077
|
-
: isSet(object.update)
|
1078
|
-
? { $case: "update", update: ParticipantUpdate.fromJSON(object.update) }
|
1079
|
-
: isSet(object.trackPublished)
|
1080
|
-
? { $case: "trackPublished", trackPublished: TrackPublishedResponse.fromJSON(object.trackPublished) }
|
1081
|
-
: isSet(object.leave)
|
1082
|
-
? { $case: "leave", leave: LeaveRequest.fromJSON(object.leave) }
|
1083
|
-
: isSet(object.mute)
|
1084
|
-
? { $case: "mute", mute: MuteTrackRequest.fromJSON(object.mute) }
|
1085
|
-
: isSet(object.speakersChanged)
|
1086
|
-
? { $case: "speakersChanged", speakersChanged: SpeakersChanged.fromJSON(object.speakersChanged) }
|
1087
|
-
: isSet(object.roomUpdate)
|
1088
|
-
? { $case: "roomUpdate", roomUpdate: RoomUpdate.fromJSON(object.roomUpdate) }
|
1089
|
-
: isSet(object.connectionQuality)
|
1090
|
-
? { $case: "connectionQuality", connectionQuality: ConnectionQualityUpdate.fromJSON(object.connectionQuality) }
|
1091
|
-
: isSet(object.streamStateUpdate)
|
1092
|
-
? { $case: "streamStateUpdate", streamStateUpdate: StreamStateUpdate.fromJSON(object.streamStateUpdate) }
|
1093
|
-
: isSet(object.subscribedQualityUpdate)
|
1094
|
-
? {
|
1095
|
-
$case: "subscribedQualityUpdate",
|
1096
|
-
subscribedQualityUpdate: SubscribedQualityUpdate.fromJSON(object.subscribedQualityUpdate),
|
1097
|
-
}
|
1098
|
-
: isSet(object.subscriptionPermissionUpdate)
|
1099
|
-
? {
|
1100
|
-
$case: "subscriptionPermissionUpdate",
|
1101
|
-
subscriptionPermissionUpdate: SubscriptionPermissionUpdate.fromJSON(object.subscriptionPermissionUpdate),
|
1102
|
-
}
|
1103
|
-
: isSet(object.refreshToken)
|
1104
|
-
? { $case: "refreshToken", refreshToken: String(object.refreshToken) }
|
1105
|
-
: isSet(object.trackUnpublished)
|
1106
|
-
? { $case: "trackUnpublished", trackUnpublished: TrackUnpublishedResponse.fromJSON(object.trackUnpublished) }
|
1107
|
-
: isSet(object.pong)
|
1108
|
-
? { $case: "pong", pong: Number(object.pong) }
|
1109
|
-
: isSet(object.reconnect)
|
1110
|
-
? { $case: "reconnect", reconnect: ReconnectResponse.fromJSON(object.reconnect) }
|
1111
|
-
: isSet(object.pongResp)
|
1112
|
-
? { $case: "pongResp", pongResp: Pong.fromJSON(object.pongResp) }
|
1113
|
-
: isSet(object.subscriptionResponse)
|
1114
|
-
? {
|
1115
|
-
$case: "subscriptionResponse",
|
1116
|
-
subscriptionResponse: SubscriptionResponse.fromJSON(object.subscriptionResponse),
|
1117
|
-
}
|
1118
|
-
: undefined,
|
1119
|
-
};
|
1120
|
-
},
|
1121
|
-
|
1122
|
-
toJSON(message: SignalResponse): unknown {
|
1123
|
-
const obj: any = {};
|
1124
|
-
message.message?.$case === "join" &&
|
1125
|
-
(obj.join = message.message?.join ? JoinResponse.toJSON(message.message?.join) : undefined);
|
1126
|
-
message.message?.$case === "answer" &&
|
1127
|
-
(obj.answer = message.message?.answer ? SessionDescription.toJSON(message.message?.answer) : undefined);
|
1128
|
-
message.message?.$case === "offer" &&
|
1129
|
-
(obj.offer = message.message?.offer ? SessionDescription.toJSON(message.message?.offer) : undefined);
|
1130
|
-
message.message?.$case === "trickle" &&
|
1131
|
-
(obj.trickle = message.message?.trickle ? TrickleRequest.toJSON(message.message?.trickle) : undefined);
|
1132
|
-
message.message?.$case === "update" &&
|
1133
|
-
(obj.update = message.message?.update ? ParticipantUpdate.toJSON(message.message?.update) : undefined);
|
1134
|
-
message.message?.$case === "trackPublished" && (obj.trackPublished = message.message?.trackPublished
|
1135
|
-
? TrackPublishedResponse.toJSON(message.message?.trackPublished)
|
1136
|
-
: undefined);
|
1137
|
-
message.message?.$case === "leave" &&
|
1138
|
-
(obj.leave = message.message?.leave ? LeaveRequest.toJSON(message.message?.leave) : undefined);
|
1139
|
-
message.message?.$case === "mute" &&
|
1140
|
-
(obj.mute = message.message?.mute ? MuteTrackRequest.toJSON(message.message?.mute) : undefined);
|
1141
|
-
message.message?.$case === "speakersChanged" && (obj.speakersChanged = message.message?.speakersChanged
|
1142
|
-
? SpeakersChanged.toJSON(message.message?.speakersChanged)
|
1143
|
-
: undefined);
|
1144
|
-
message.message?.$case === "roomUpdate" &&
|
1145
|
-
(obj.roomUpdate = message.message?.roomUpdate ? RoomUpdate.toJSON(message.message?.roomUpdate) : undefined);
|
1146
|
-
message.message?.$case === "connectionQuality" && (obj.connectionQuality = message.message?.connectionQuality
|
1147
|
-
? ConnectionQualityUpdate.toJSON(message.message?.connectionQuality)
|
1148
|
-
: undefined);
|
1149
|
-
message.message?.$case === "streamStateUpdate" && (obj.streamStateUpdate = message.message?.streamStateUpdate
|
1150
|
-
? StreamStateUpdate.toJSON(message.message?.streamStateUpdate)
|
1151
|
-
: undefined);
|
1152
|
-
message.message?.$case === "subscribedQualityUpdate" &&
|
1153
|
-
(obj.subscribedQualityUpdate = message.message?.subscribedQualityUpdate
|
1154
|
-
? SubscribedQualityUpdate.toJSON(message.message?.subscribedQualityUpdate)
|
1155
|
-
: undefined);
|
1156
|
-
message.message?.$case === "subscriptionPermissionUpdate" &&
|
1157
|
-
(obj.subscriptionPermissionUpdate = message.message?.subscriptionPermissionUpdate
|
1158
|
-
? SubscriptionPermissionUpdate.toJSON(message.message?.subscriptionPermissionUpdate)
|
1159
|
-
: undefined);
|
1160
|
-
message.message?.$case === "refreshToken" && (obj.refreshToken = message.message?.refreshToken);
|
1161
|
-
message.message?.$case === "trackUnpublished" && (obj.trackUnpublished = message.message?.trackUnpublished
|
1162
|
-
? TrackUnpublishedResponse.toJSON(message.message?.trackUnpublished)
|
1163
|
-
: undefined);
|
1164
|
-
message.message?.$case === "pong" && (obj.pong = Math.round(message.message?.pong));
|
1165
|
-
message.message?.$case === "reconnect" &&
|
1166
|
-
(obj.reconnect = message.message?.reconnect ? ReconnectResponse.toJSON(message.message?.reconnect) : undefined);
|
1167
|
-
message.message?.$case === "pongResp" &&
|
1168
|
-
(obj.pongResp = message.message?.pongResp ? Pong.toJSON(message.message?.pongResp) : undefined);
|
1169
|
-
message.message?.$case === "subscriptionResponse" &&
|
1170
|
-
(obj.subscriptionResponse = message.message?.subscriptionResponse
|
1171
|
-
? SubscriptionResponse.toJSON(message.message?.subscriptionResponse)
|
1172
|
-
: undefined);
|
1173
|
-
return obj;
|
1174
|
-
},
|
1175
|
-
|
1176
|
-
create<I extends Exact<DeepPartial<SignalResponse>, I>>(base?: I): SignalResponse {
|
1177
|
-
return SignalResponse.fromPartial(base ?? {});
|
1178
|
-
},
|
1179
|
-
|
1180
|
-
fromPartial<I extends Exact<DeepPartial<SignalResponse>, I>>(object: I): SignalResponse {
|
1181
|
-
const message = createBaseSignalResponse();
|
1182
|
-
if (object.message?.$case === "join" && object.message?.join !== undefined && object.message?.join !== null) {
|
1183
|
-
message.message = { $case: "join", join: JoinResponse.fromPartial(object.message.join) };
|
1184
|
-
}
|
1185
|
-
if (object.message?.$case === "answer" && object.message?.answer !== undefined && object.message?.answer !== null) {
|
1186
|
-
message.message = { $case: "answer", answer: SessionDescription.fromPartial(object.message.answer) };
|
1187
|
-
}
|
1188
|
-
if (object.message?.$case === "offer" && object.message?.offer !== undefined && object.message?.offer !== null) {
|
1189
|
-
message.message = { $case: "offer", offer: SessionDescription.fromPartial(object.message.offer) };
|
1190
|
-
}
|
1191
|
-
if (
|
1192
|
-
object.message?.$case === "trickle" && object.message?.trickle !== undefined && object.message?.trickle !== null
|
1193
|
-
) {
|
1194
|
-
message.message = { $case: "trickle", trickle: TrickleRequest.fromPartial(object.message.trickle) };
|
1195
|
-
}
|
1196
|
-
if (object.message?.$case === "update" && object.message?.update !== undefined && object.message?.update !== null) {
|
1197
|
-
message.message = { $case: "update", update: ParticipantUpdate.fromPartial(object.message.update) };
|
1198
|
-
}
|
1199
|
-
if (
|
1200
|
-
object.message?.$case === "trackPublished" &&
|
1201
|
-
object.message?.trackPublished !== undefined &&
|
1202
|
-
object.message?.trackPublished !== null
|
1203
|
-
) {
|
1204
|
-
message.message = {
|
1205
|
-
$case: "trackPublished",
|
1206
|
-
trackPublished: TrackPublishedResponse.fromPartial(object.message.trackPublished),
|
1207
|
-
};
|
1208
|
-
}
|
1209
|
-
if (object.message?.$case === "leave" && object.message?.leave !== undefined && object.message?.leave !== null) {
|
1210
|
-
message.message = { $case: "leave", leave: LeaveRequest.fromPartial(object.message.leave) };
|
1211
|
-
}
|
1212
|
-
if (object.message?.$case === "mute" && object.message?.mute !== undefined && object.message?.mute !== null) {
|
1213
|
-
message.message = { $case: "mute", mute: MuteTrackRequest.fromPartial(object.message.mute) };
|
1214
|
-
}
|
1215
|
-
if (
|
1216
|
-
object.message?.$case === "speakersChanged" &&
|
1217
|
-
object.message?.speakersChanged !== undefined &&
|
1218
|
-
object.message?.speakersChanged !== null
|
1219
|
-
) {
|
1220
|
-
message.message = {
|
1221
|
-
$case: "speakersChanged",
|
1222
|
-
speakersChanged: SpeakersChanged.fromPartial(object.message.speakersChanged),
|
1223
|
-
};
|
1224
|
-
}
|
1225
|
-
if (
|
1226
|
-
object.message?.$case === "roomUpdate" &&
|
1227
|
-
object.message?.roomUpdate !== undefined &&
|
1228
|
-
object.message?.roomUpdate !== null
|
1229
|
-
) {
|
1230
|
-
message.message = { $case: "roomUpdate", roomUpdate: RoomUpdate.fromPartial(object.message.roomUpdate) };
|
1231
|
-
}
|
1232
|
-
if (
|
1233
|
-
object.message?.$case === "connectionQuality" &&
|
1234
|
-
object.message?.connectionQuality !== undefined &&
|
1235
|
-
object.message?.connectionQuality !== null
|
1236
|
-
) {
|
1237
|
-
message.message = {
|
1238
|
-
$case: "connectionQuality",
|
1239
|
-
connectionQuality: ConnectionQualityUpdate.fromPartial(object.message.connectionQuality),
|
1240
|
-
};
|
1241
|
-
}
|
1242
|
-
if (
|
1243
|
-
object.message?.$case === "streamStateUpdate" &&
|
1244
|
-
object.message?.streamStateUpdate !== undefined &&
|
1245
|
-
object.message?.streamStateUpdate !== null
|
1246
|
-
) {
|
1247
|
-
message.message = {
|
1248
|
-
$case: "streamStateUpdate",
|
1249
|
-
streamStateUpdate: StreamStateUpdate.fromPartial(object.message.streamStateUpdate),
|
1250
|
-
};
|
1251
|
-
}
|
1252
|
-
if (
|
1253
|
-
object.message?.$case === "subscribedQualityUpdate" &&
|
1254
|
-
object.message?.subscribedQualityUpdate !== undefined &&
|
1255
|
-
object.message?.subscribedQualityUpdate !== null
|
1256
|
-
) {
|
1257
|
-
message.message = {
|
1258
|
-
$case: "subscribedQualityUpdate",
|
1259
|
-
subscribedQualityUpdate: SubscribedQualityUpdate.fromPartial(object.message.subscribedQualityUpdate),
|
1260
|
-
};
|
1261
|
-
}
|
1262
|
-
if (
|
1263
|
-
object.message?.$case === "subscriptionPermissionUpdate" &&
|
1264
|
-
object.message?.subscriptionPermissionUpdate !== undefined &&
|
1265
|
-
object.message?.subscriptionPermissionUpdate !== null
|
1266
|
-
) {
|
1267
|
-
message.message = {
|
1268
|
-
$case: "subscriptionPermissionUpdate",
|
1269
|
-
subscriptionPermissionUpdate: SubscriptionPermissionUpdate.fromPartial(
|
1270
|
-
object.message.subscriptionPermissionUpdate,
|
1271
|
-
),
|
1272
|
-
};
|
1273
|
-
}
|
1274
|
-
if (
|
1275
|
-
object.message?.$case === "refreshToken" &&
|
1276
|
-
object.message?.refreshToken !== undefined &&
|
1277
|
-
object.message?.refreshToken !== null
|
1278
|
-
) {
|
1279
|
-
message.message = { $case: "refreshToken", refreshToken: object.message.refreshToken };
|
1280
|
-
}
|
1281
|
-
if (
|
1282
|
-
object.message?.$case === "trackUnpublished" &&
|
1283
|
-
object.message?.trackUnpublished !== undefined &&
|
1284
|
-
object.message?.trackUnpublished !== null
|
1285
|
-
) {
|
1286
|
-
message.message = {
|
1287
|
-
$case: "trackUnpublished",
|
1288
|
-
trackUnpublished: TrackUnpublishedResponse.fromPartial(object.message.trackUnpublished),
|
1289
|
-
};
|
1290
|
-
}
|
1291
|
-
if (object.message?.$case === "pong" && object.message?.pong !== undefined && object.message?.pong !== null) {
|
1292
|
-
message.message = { $case: "pong", pong: object.message.pong };
|
1293
|
-
}
|
1294
|
-
if (
|
1295
|
-
object.message?.$case === "reconnect" &&
|
1296
|
-
object.message?.reconnect !== undefined &&
|
1297
|
-
object.message?.reconnect !== null
|
1298
|
-
) {
|
1299
|
-
message.message = { $case: "reconnect", reconnect: ReconnectResponse.fromPartial(object.message.reconnect) };
|
1300
|
-
}
|
1301
|
-
if (
|
1302
|
-
object.message?.$case === "pongResp" &&
|
1303
|
-
object.message?.pongResp !== undefined &&
|
1304
|
-
object.message?.pongResp !== null
|
1305
|
-
) {
|
1306
|
-
message.message = { $case: "pongResp", pongResp: Pong.fromPartial(object.message.pongResp) };
|
1307
|
-
}
|
1308
|
-
if (
|
1309
|
-
object.message?.$case === "subscriptionResponse" &&
|
1310
|
-
object.message?.subscriptionResponse !== undefined &&
|
1311
|
-
object.message?.subscriptionResponse !== null
|
1312
|
-
) {
|
1313
|
-
message.message = {
|
1314
|
-
$case: "subscriptionResponse",
|
1315
|
-
subscriptionResponse: SubscriptionResponse.fromPartial(object.message.subscriptionResponse),
|
1316
|
-
};
|
1317
|
-
}
|
1318
|
-
return message;
|
1319
|
-
},
|
1320
|
-
};
|
1321
|
-
|
1322
|
-
function createBaseSimulcastCodec(): SimulcastCodec {
|
1323
|
-
return { codec: "", cid: "", enableSimulcastLayers: false };
|
1324
|
-
}
|
1325
|
-
|
1326
|
-
export const SimulcastCodec = {
|
1327
|
-
encode(message: SimulcastCodec, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
1328
|
-
if (message.codec !== "") {
|
1329
|
-
writer.uint32(10).string(message.codec);
|
1330
|
-
}
|
1331
|
-
if (message.cid !== "") {
|
1332
|
-
writer.uint32(18).string(message.cid);
|
1333
|
-
}
|
1334
|
-
if (message.enableSimulcastLayers === true) {
|
1335
|
-
writer.uint32(24).bool(message.enableSimulcastLayers);
|
1336
|
-
}
|
1337
|
-
return writer;
|
1338
|
-
},
|
1339
|
-
|
1340
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SimulcastCodec {
|
1341
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
1342
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
1343
|
-
const message = createBaseSimulcastCodec();
|
1344
|
-
while (reader.pos < end) {
|
1345
|
-
const tag = reader.uint32();
|
1346
|
-
switch (tag >>> 3) {
|
1347
|
-
case 1:
|
1348
|
-
if (tag !== 10) {
|
1349
|
-
break;
|
1350
|
-
}
|
1351
|
-
|
1352
|
-
message.codec = reader.string();
|
1353
|
-
continue;
|
1354
|
-
case 2:
|
1355
|
-
if (tag !== 18) {
|
1356
|
-
break;
|
1357
|
-
}
|
1358
|
-
|
1359
|
-
message.cid = reader.string();
|
1360
|
-
continue;
|
1361
|
-
case 3:
|
1362
|
-
if (tag !== 24) {
|
1363
|
-
break;
|
1364
|
-
}
|
1365
|
-
|
1366
|
-
message.enableSimulcastLayers = reader.bool();
|
1367
|
-
continue;
|
1368
|
-
}
|
1369
|
-
if ((tag & 7) === 4 || tag === 0) {
|
1370
|
-
break;
|
1371
|
-
}
|
1372
|
-
reader.skipType(tag & 7);
|
1373
|
-
}
|
1374
|
-
return message;
|
1375
|
-
},
|
1376
|
-
|
1377
|
-
fromJSON(object: any): SimulcastCodec {
|
1378
|
-
return {
|
1379
|
-
codec: isSet(object.codec) ? String(object.codec) : "",
|
1380
|
-
cid: isSet(object.cid) ? String(object.cid) : "",
|
1381
|
-
enableSimulcastLayers: isSet(object.enableSimulcastLayers) ? Boolean(object.enableSimulcastLayers) : false,
|
1382
|
-
};
|
1383
|
-
},
|
1384
|
-
|
1385
|
-
toJSON(message: SimulcastCodec): unknown {
|
1386
|
-
const obj: any = {};
|
1387
|
-
message.codec !== undefined && (obj.codec = message.codec);
|
1388
|
-
message.cid !== undefined && (obj.cid = message.cid);
|
1389
|
-
message.enableSimulcastLayers !== undefined && (obj.enableSimulcastLayers = message.enableSimulcastLayers);
|
1390
|
-
return obj;
|
1391
|
-
},
|
1392
|
-
|
1393
|
-
create<I extends Exact<DeepPartial<SimulcastCodec>, I>>(base?: I): SimulcastCodec {
|
1394
|
-
return SimulcastCodec.fromPartial(base ?? {});
|
1395
|
-
},
|
1396
|
-
|
1397
|
-
fromPartial<I extends Exact<DeepPartial<SimulcastCodec>, I>>(object: I): SimulcastCodec {
|
1398
|
-
const message = createBaseSimulcastCodec();
|
1399
|
-
message.codec = object.codec ?? "";
|
1400
|
-
message.cid = object.cid ?? "";
|
1401
|
-
message.enableSimulcastLayers = object.enableSimulcastLayers ?? false;
|
1402
|
-
return message;
|
1403
|
-
},
|
1404
|
-
};
|
1405
|
-
|
1406
|
-
function createBaseAddTrackRequest(): AddTrackRequest {
|
1407
|
-
return {
|
1408
|
-
cid: "",
|
1409
|
-
name: "",
|
1410
|
-
type: 0,
|
1411
|
-
width: 0,
|
1412
|
-
height: 0,
|
1413
|
-
muted: false,
|
1414
|
-
disableDtx: false,
|
1415
|
-
source: 0,
|
1416
|
-
layers: [],
|
1417
|
-
simulcastCodecs: [],
|
1418
|
-
sid: "",
|
1419
|
-
stereo: false,
|
1420
|
-
disableRed: false,
|
1421
|
-
encryption: 0,
|
1422
|
-
};
|
1423
|
-
}
|
1424
|
-
|
1425
|
-
export const AddTrackRequest = {
|
1426
|
-
encode(message: AddTrackRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
1427
|
-
if (message.cid !== "") {
|
1428
|
-
writer.uint32(10).string(message.cid);
|
1429
|
-
}
|
1430
|
-
if (message.name !== "") {
|
1431
|
-
writer.uint32(18).string(message.name);
|
1432
|
-
}
|
1433
|
-
if (message.type !== 0) {
|
1434
|
-
writer.uint32(24).int32(message.type);
|
1435
|
-
}
|
1436
|
-
if (message.width !== 0) {
|
1437
|
-
writer.uint32(32).uint32(message.width);
|
1438
|
-
}
|
1439
|
-
if (message.height !== 0) {
|
1440
|
-
writer.uint32(40).uint32(message.height);
|
1441
|
-
}
|
1442
|
-
if (message.muted === true) {
|
1443
|
-
writer.uint32(48).bool(message.muted);
|
1444
|
-
}
|
1445
|
-
if (message.disableDtx === true) {
|
1446
|
-
writer.uint32(56).bool(message.disableDtx);
|
1447
|
-
}
|
1448
|
-
if (message.source !== 0) {
|
1449
|
-
writer.uint32(64).int32(message.source);
|
1450
|
-
}
|
1451
|
-
for (const v of message.layers) {
|
1452
|
-
VideoLayer.encode(v!, writer.uint32(74).fork()).ldelim();
|
1453
|
-
}
|
1454
|
-
for (const v of message.simulcastCodecs) {
|
1455
|
-
SimulcastCodec.encode(v!, writer.uint32(82).fork()).ldelim();
|
1456
|
-
}
|
1457
|
-
if (message.sid !== "") {
|
1458
|
-
writer.uint32(90).string(message.sid);
|
1459
|
-
}
|
1460
|
-
if (message.stereo === true) {
|
1461
|
-
writer.uint32(96).bool(message.stereo);
|
1462
|
-
}
|
1463
|
-
if (message.disableRed === true) {
|
1464
|
-
writer.uint32(104).bool(message.disableRed);
|
1465
|
-
}
|
1466
|
-
if (message.encryption !== 0) {
|
1467
|
-
writer.uint32(112).int32(message.encryption);
|
1468
|
-
}
|
1469
|
-
return writer;
|
1470
|
-
},
|
1471
|
-
|
1472
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): AddTrackRequest {
|
1473
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
1474
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
1475
|
-
const message = createBaseAddTrackRequest();
|
1476
|
-
while (reader.pos < end) {
|
1477
|
-
const tag = reader.uint32();
|
1478
|
-
switch (tag >>> 3) {
|
1479
|
-
case 1:
|
1480
|
-
if (tag !== 10) {
|
1481
|
-
break;
|
1482
|
-
}
|
1483
|
-
|
1484
|
-
message.cid = reader.string();
|
1485
|
-
continue;
|
1486
|
-
case 2:
|
1487
|
-
if (tag !== 18) {
|
1488
|
-
break;
|
1489
|
-
}
|
1490
|
-
|
1491
|
-
message.name = reader.string();
|
1492
|
-
continue;
|
1493
|
-
case 3:
|
1494
|
-
if (tag !== 24) {
|
1495
|
-
break;
|
1496
|
-
}
|
1497
|
-
|
1498
|
-
message.type = reader.int32() as any;
|
1499
|
-
continue;
|
1500
|
-
case 4:
|
1501
|
-
if (tag !== 32) {
|
1502
|
-
break;
|
1503
|
-
}
|
1504
|
-
|
1505
|
-
message.width = reader.uint32();
|
1506
|
-
continue;
|
1507
|
-
case 5:
|
1508
|
-
if (tag !== 40) {
|
1509
|
-
break;
|
1510
|
-
}
|
1511
|
-
|
1512
|
-
message.height = reader.uint32();
|
1513
|
-
continue;
|
1514
|
-
case 6:
|
1515
|
-
if (tag !== 48) {
|
1516
|
-
break;
|
1517
|
-
}
|
1518
|
-
|
1519
|
-
message.muted = reader.bool();
|
1520
|
-
continue;
|
1521
|
-
case 7:
|
1522
|
-
if (tag !== 56) {
|
1523
|
-
break;
|
1524
|
-
}
|
1525
|
-
|
1526
|
-
message.disableDtx = reader.bool();
|
1527
|
-
continue;
|
1528
|
-
case 8:
|
1529
|
-
if (tag !== 64) {
|
1530
|
-
break;
|
1531
|
-
}
|
1532
|
-
|
1533
|
-
message.source = reader.int32() as any;
|
1534
|
-
continue;
|
1535
|
-
case 9:
|
1536
|
-
if (tag !== 74) {
|
1537
|
-
break;
|
1538
|
-
}
|
1539
|
-
|
1540
|
-
message.layers.push(VideoLayer.decode(reader, reader.uint32()));
|
1541
|
-
continue;
|
1542
|
-
case 10:
|
1543
|
-
if (tag !== 82) {
|
1544
|
-
break;
|
1545
|
-
}
|
1546
|
-
|
1547
|
-
message.simulcastCodecs.push(SimulcastCodec.decode(reader, reader.uint32()));
|
1548
|
-
continue;
|
1549
|
-
case 11:
|
1550
|
-
if (tag !== 90) {
|
1551
|
-
break;
|
1552
|
-
}
|
1553
|
-
|
1554
|
-
message.sid = reader.string();
|
1555
|
-
continue;
|
1556
|
-
case 12:
|
1557
|
-
if (tag !== 96) {
|
1558
|
-
break;
|
1559
|
-
}
|
1560
|
-
|
1561
|
-
message.stereo = reader.bool();
|
1562
|
-
continue;
|
1563
|
-
case 13:
|
1564
|
-
if (tag !== 104) {
|
1565
|
-
break;
|
1566
|
-
}
|
1567
|
-
|
1568
|
-
message.disableRed = reader.bool();
|
1569
|
-
continue;
|
1570
|
-
case 14:
|
1571
|
-
if (tag !== 112) {
|
1572
|
-
break;
|
1573
|
-
}
|
1574
|
-
|
1575
|
-
message.encryption = reader.int32() as any;
|
1576
|
-
continue;
|
1577
|
-
}
|
1578
|
-
if ((tag & 7) === 4 || tag === 0) {
|
1579
|
-
break;
|
1580
|
-
}
|
1581
|
-
reader.skipType(tag & 7);
|
1582
|
-
}
|
1583
|
-
return message;
|
1584
|
-
},
|
1585
|
-
|
1586
|
-
fromJSON(object: any): AddTrackRequest {
|
1587
|
-
return {
|
1588
|
-
cid: isSet(object.cid) ? String(object.cid) : "",
|
1589
|
-
name: isSet(object.name) ? String(object.name) : "",
|
1590
|
-
type: isSet(object.type) ? trackTypeFromJSON(object.type) : 0,
|
1591
|
-
width: isSet(object.width) ? Number(object.width) : 0,
|
1592
|
-
height: isSet(object.height) ? Number(object.height) : 0,
|
1593
|
-
muted: isSet(object.muted) ? Boolean(object.muted) : false,
|
1594
|
-
disableDtx: isSet(object.disableDtx) ? Boolean(object.disableDtx) : false,
|
1595
|
-
source: isSet(object.source) ? trackSourceFromJSON(object.source) : 0,
|
1596
|
-
layers: Array.isArray(object?.layers) ? object.layers.map((e: any) => VideoLayer.fromJSON(e)) : [],
|
1597
|
-
simulcastCodecs: Array.isArray(object?.simulcastCodecs)
|
1598
|
-
? object.simulcastCodecs.map((e: any) => SimulcastCodec.fromJSON(e))
|
1599
|
-
: [],
|
1600
|
-
sid: isSet(object.sid) ? String(object.sid) : "",
|
1601
|
-
stereo: isSet(object.stereo) ? Boolean(object.stereo) : false,
|
1602
|
-
disableRed: isSet(object.disableRed) ? Boolean(object.disableRed) : false,
|
1603
|
-
encryption: isSet(object.encryption) ? encryption_TypeFromJSON(object.encryption) : 0,
|
1604
|
-
};
|
1605
|
-
},
|
1606
|
-
|
1607
|
-
toJSON(message: AddTrackRequest): unknown {
|
1608
|
-
const obj: any = {};
|
1609
|
-
message.cid !== undefined && (obj.cid = message.cid);
|
1610
|
-
message.name !== undefined && (obj.name = message.name);
|
1611
|
-
message.type !== undefined && (obj.type = trackTypeToJSON(message.type));
|
1612
|
-
message.width !== undefined && (obj.width = Math.round(message.width));
|
1613
|
-
message.height !== undefined && (obj.height = Math.round(message.height));
|
1614
|
-
message.muted !== undefined && (obj.muted = message.muted);
|
1615
|
-
message.disableDtx !== undefined && (obj.disableDtx = message.disableDtx);
|
1616
|
-
message.source !== undefined && (obj.source = trackSourceToJSON(message.source));
|
1617
|
-
if (message.layers) {
|
1618
|
-
obj.layers = message.layers.map((e) => e ? VideoLayer.toJSON(e) : undefined);
|
1619
|
-
} else {
|
1620
|
-
obj.layers = [];
|
1621
|
-
}
|
1622
|
-
if (message.simulcastCodecs) {
|
1623
|
-
obj.simulcastCodecs = message.simulcastCodecs.map((e) => e ? SimulcastCodec.toJSON(e) : undefined);
|
1624
|
-
} else {
|
1625
|
-
obj.simulcastCodecs = [];
|
1626
|
-
}
|
1627
|
-
message.sid !== undefined && (obj.sid = message.sid);
|
1628
|
-
message.stereo !== undefined && (obj.stereo = message.stereo);
|
1629
|
-
message.disableRed !== undefined && (obj.disableRed = message.disableRed);
|
1630
|
-
message.encryption !== undefined && (obj.encryption = encryption_TypeToJSON(message.encryption));
|
1631
|
-
return obj;
|
1632
|
-
},
|
1633
|
-
|
1634
|
-
create<I extends Exact<DeepPartial<AddTrackRequest>, I>>(base?: I): AddTrackRequest {
|
1635
|
-
return AddTrackRequest.fromPartial(base ?? {});
|
1636
|
-
},
|
1637
|
-
|
1638
|
-
fromPartial<I extends Exact<DeepPartial<AddTrackRequest>, I>>(object: I): AddTrackRequest {
|
1639
|
-
const message = createBaseAddTrackRequest();
|
1640
|
-
message.cid = object.cid ?? "";
|
1641
|
-
message.name = object.name ?? "";
|
1642
|
-
message.type = object.type ?? 0;
|
1643
|
-
message.width = object.width ?? 0;
|
1644
|
-
message.height = object.height ?? 0;
|
1645
|
-
message.muted = object.muted ?? false;
|
1646
|
-
message.disableDtx = object.disableDtx ?? false;
|
1647
|
-
message.source = object.source ?? 0;
|
1648
|
-
message.layers = object.layers?.map((e) => VideoLayer.fromPartial(e)) || [];
|
1649
|
-
message.simulcastCodecs = object.simulcastCodecs?.map((e) => SimulcastCodec.fromPartial(e)) || [];
|
1650
|
-
message.sid = object.sid ?? "";
|
1651
|
-
message.stereo = object.stereo ?? false;
|
1652
|
-
message.disableRed = object.disableRed ?? false;
|
1653
|
-
message.encryption = object.encryption ?? 0;
|
1654
|
-
return message;
|
1655
|
-
},
|
1656
|
-
};
|
1657
|
-
|
1658
|
-
function createBaseTrickleRequest(): TrickleRequest {
|
1659
|
-
return { candidateInit: "", target: 0 };
|
1660
|
-
}
|
1661
|
-
|
1662
|
-
export const TrickleRequest = {
|
1663
|
-
encode(message: TrickleRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
1664
|
-
if (message.candidateInit !== "") {
|
1665
|
-
writer.uint32(10).string(message.candidateInit);
|
1666
|
-
}
|
1667
|
-
if (message.target !== 0) {
|
1668
|
-
writer.uint32(16).int32(message.target);
|
1669
|
-
}
|
1670
|
-
return writer;
|
1671
|
-
},
|
1672
|
-
|
1673
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): TrickleRequest {
|
1674
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
1675
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
1676
|
-
const message = createBaseTrickleRequest();
|
1677
|
-
while (reader.pos < end) {
|
1678
|
-
const tag = reader.uint32();
|
1679
|
-
switch (tag >>> 3) {
|
1680
|
-
case 1:
|
1681
|
-
if (tag !== 10) {
|
1682
|
-
break;
|
1683
|
-
}
|
1684
|
-
|
1685
|
-
message.candidateInit = reader.string();
|
1686
|
-
continue;
|
1687
|
-
case 2:
|
1688
|
-
if (tag !== 16) {
|
1689
|
-
break;
|
1690
|
-
}
|
1691
|
-
|
1692
|
-
message.target = reader.int32() as any;
|
1693
|
-
continue;
|
1694
|
-
}
|
1695
|
-
if ((tag & 7) === 4 || tag === 0) {
|
1696
|
-
break;
|
1697
|
-
}
|
1698
|
-
reader.skipType(tag & 7);
|
1699
|
-
}
|
1700
|
-
return message;
|
1701
|
-
},
|
1702
|
-
|
1703
|
-
fromJSON(object: any): TrickleRequest {
|
1704
|
-
return {
|
1705
|
-
candidateInit: isSet(object.candidateInit) ? String(object.candidateInit) : "",
|
1706
|
-
target: isSet(object.target) ? signalTargetFromJSON(object.target) : 0,
|
1707
|
-
};
|
1708
|
-
},
|
1709
|
-
|
1710
|
-
toJSON(message: TrickleRequest): unknown {
|
1711
|
-
const obj: any = {};
|
1712
|
-
message.candidateInit !== undefined && (obj.candidateInit = message.candidateInit);
|
1713
|
-
message.target !== undefined && (obj.target = signalTargetToJSON(message.target));
|
1714
|
-
return obj;
|
1715
|
-
},
|
1716
|
-
|
1717
|
-
create<I extends Exact<DeepPartial<TrickleRequest>, I>>(base?: I): TrickleRequest {
|
1718
|
-
return TrickleRequest.fromPartial(base ?? {});
|
1719
|
-
},
|
1720
|
-
|
1721
|
-
fromPartial<I extends Exact<DeepPartial<TrickleRequest>, I>>(object: I): TrickleRequest {
|
1722
|
-
const message = createBaseTrickleRequest();
|
1723
|
-
message.candidateInit = object.candidateInit ?? "";
|
1724
|
-
message.target = object.target ?? 0;
|
1725
|
-
return message;
|
1726
|
-
},
|
1727
|
-
};
|
1728
|
-
|
1729
|
-
function createBaseMuteTrackRequest(): MuteTrackRequest {
|
1730
|
-
return { sid: "", muted: false };
|
1731
|
-
}
|
1732
|
-
|
1733
|
-
export const MuteTrackRequest = {
|
1734
|
-
encode(message: MuteTrackRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
1735
|
-
if (message.sid !== "") {
|
1736
|
-
writer.uint32(10).string(message.sid);
|
1737
|
-
}
|
1738
|
-
if (message.muted === true) {
|
1739
|
-
writer.uint32(16).bool(message.muted);
|
1740
|
-
}
|
1741
|
-
return writer;
|
1742
|
-
},
|
1743
|
-
|
1744
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): MuteTrackRequest {
|
1745
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
1746
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
1747
|
-
const message = createBaseMuteTrackRequest();
|
1748
|
-
while (reader.pos < end) {
|
1749
|
-
const tag = reader.uint32();
|
1750
|
-
switch (tag >>> 3) {
|
1751
|
-
case 1:
|
1752
|
-
if (tag !== 10) {
|
1753
|
-
break;
|
1754
|
-
}
|
1755
|
-
|
1756
|
-
message.sid = reader.string();
|
1757
|
-
continue;
|
1758
|
-
case 2:
|
1759
|
-
if (tag !== 16) {
|
1760
|
-
break;
|
1761
|
-
}
|
1762
|
-
|
1763
|
-
message.muted = reader.bool();
|
1764
|
-
continue;
|
1765
|
-
}
|
1766
|
-
if ((tag & 7) === 4 || tag === 0) {
|
1767
|
-
break;
|
1768
|
-
}
|
1769
|
-
reader.skipType(tag & 7);
|
1770
|
-
}
|
1771
|
-
return message;
|
1772
|
-
},
|
1773
|
-
|
1774
|
-
fromJSON(object: any): MuteTrackRequest {
|
1775
|
-
return {
|
1776
|
-
sid: isSet(object.sid) ? String(object.sid) : "",
|
1777
|
-
muted: isSet(object.muted) ? Boolean(object.muted) : false,
|
1778
|
-
};
|
1779
|
-
},
|
1780
|
-
|
1781
|
-
toJSON(message: MuteTrackRequest): unknown {
|
1782
|
-
const obj: any = {};
|
1783
|
-
message.sid !== undefined && (obj.sid = message.sid);
|
1784
|
-
message.muted !== undefined && (obj.muted = message.muted);
|
1785
|
-
return obj;
|
1786
|
-
},
|
1787
|
-
|
1788
|
-
create<I extends Exact<DeepPartial<MuteTrackRequest>, I>>(base?: I): MuteTrackRequest {
|
1789
|
-
return MuteTrackRequest.fromPartial(base ?? {});
|
1790
|
-
},
|
1791
|
-
|
1792
|
-
fromPartial<I extends Exact<DeepPartial<MuteTrackRequest>, I>>(object: I): MuteTrackRequest {
|
1793
|
-
const message = createBaseMuteTrackRequest();
|
1794
|
-
message.sid = object.sid ?? "";
|
1795
|
-
message.muted = object.muted ?? false;
|
1796
|
-
return message;
|
1797
|
-
},
|
1798
|
-
};
|
1799
|
-
|
1800
|
-
function createBaseJoinResponse(): JoinResponse {
|
1801
|
-
return {
|
1802
|
-
room: undefined,
|
1803
|
-
participant: undefined,
|
1804
|
-
otherParticipants: [],
|
1805
|
-
serverVersion: "",
|
1806
|
-
iceServers: [],
|
1807
|
-
subscriberPrimary: false,
|
1808
|
-
alternativeUrl: "",
|
1809
|
-
clientConfiguration: undefined,
|
1810
|
-
serverRegion: "",
|
1811
|
-
pingTimeout: 0,
|
1812
|
-
pingInterval: 0,
|
1813
|
-
serverInfo: undefined,
|
1814
|
-
sifTrailer: new Uint8Array(),
|
1815
|
-
};
|
1816
|
-
}
|
1817
|
-
|
1818
|
-
export const JoinResponse = {
|
1819
|
-
encode(message: JoinResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
1820
|
-
if (message.room !== undefined) {
|
1821
|
-
Room.encode(message.room, writer.uint32(10).fork()).ldelim();
|
1822
|
-
}
|
1823
|
-
if (message.participant !== undefined) {
|
1824
|
-
ParticipantInfo.encode(message.participant, writer.uint32(18).fork()).ldelim();
|
1825
|
-
}
|
1826
|
-
for (const v of message.otherParticipants) {
|
1827
|
-
ParticipantInfo.encode(v!, writer.uint32(26).fork()).ldelim();
|
1828
|
-
}
|
1829
|
-
if (message.serverVersion !== "") {
|
1830
|
-
writer.uint32(34).string(message.serverVersion);
|
1831
|
-
}
|
1832
|
-
for (const v of message.iceServers) {
|
1833
|
-
ICEServer.encode(v!, writer.uint32(42).fork()).ldelim();
|
1834
|
-
}
|
1835
|
-
if (message.subscriberPrimary === true) {
|
1836
|
-
writer.uint32(48).bool(message.subscriberPrimary);
|
1837
|
-
}
|
1838
|
-
if (message.alternativeUrl !== "") {
|
1839
|
-
writer.uint32(58).string(message.alternativeUrl);
|
1840
|
-
}
|
1841
|
-
if (message.clientConfiguration !== undefined) {
|
1842
|
-
ClientConfiguration.encode(message.clientConfiguration, writer.uint32(66).fork()).ldelim();
|
1843
|
-
}
|
1844
|
-
if (message.serverRegion !== "") {
|
1845
|
-
writer.uint32(74).string(message.serverRegion);
|
1846
|
-
}
|
1847
|
-
if (message.pingTimeout !== 0) {
|
1848
|
-
writer.uint32(80).int32(message.pingTimeout);
|
1849
|
-
}
|
1850
|
-
if (message.pingInterval !== 0) {
|
1851
|
-
writer.uint32(88).int32(message.pingInterval);
|
1852
|
-
}
|
1853
|
-
if (message.serverInfo !== undefined) {
|
1854
|
-
ServerInfo.encode(message.serverInfo, writer.uint32(98).fork()).ldelim();
|
1855
|
-
}
|
1856
|
-
if (message.sifTrailer.length !== 0) {
|
1857
|
-
writer.uint32(106).bytes(message.sifTrailer);
|
1858
|
-
}
|
1859
|
-
return writer;
|
1860
|
-
},
|
1861
|
-
|
1862
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): JoinResponse {
|
1863
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
1864
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
1865
|
-
const message = createBaseJoinResponse();
|
1866
|
-
while (reader.pos < end) {
|
1867
|
-
const tag = reader.uint32();
|
1868
|
-
switch (tag >>> 3) {
|
1869
|
-
case 1:
|
1870
|
-
if (tag !== 10) {
|
1871
|
-
break;
|
1872
|
-
}
|
1873
|
-
|
1874
|
-
message.room = Room.decode(reader, reader.uint32());
|
1875
|
-
continue;
|
1876
|
-
case 2:
|
1877
|
-
if (tag !== 18) {
|
1878
|
-
break;
|
1879
|
-
}
|
1880
|
-
|
1881
|
-
message.participant = ParticipantInfo.decode(reader, reader.uint32());
|
1882
|
-
continue;
|
1883
|
-
case 3:
|
1884
|
-
if (tag !== 26) {
|
1885
|
-
break;
|
1886
|
-
}
|
1887
|
-
|
1888
|
-
message.otherParticipants.push(ParticipantInfo.decode(reader, reader.uint32()));
|
1889
|
-
continue;
|
1890
|
-
case 4:
|
1891
|
-
if (tag !== 34) {
|
1892
|
-
break;
|
1893
|
-
}
|
1894
|
-
|
1895
|
-
message.serverVersion = reader.string();
|
1896
|
-
continue;
|
1897
|
-
case 5:
|
1898
|
-
if (tag !== 42) {
|
1899
|
-
break;
|
1900
|
-
}
|
1901
|
-
|
1902
|
-
message.iceServers.push(ICEServer.decode(reader, reader.uint32()));
|
1903
|
-
continue;
|
1904
|
-
case 6:
|
1905
|
-
if (tag !== 48) {
|
1906
|
-
break;
|
1907
|
-
}
|
1908
|
-
|
1909
|
-
message.subscriberPrimary = reader.bool();
|
1910
|
-
continue;
|
1911
|
-
case 7:
|
1912
|
-
if (tag !== 58) {
|
1913
|
-
break;
|
1914
|
-
}
|
1915
|
-
|
1916
|
-
message.alternativeUrl = reader.string();
|
1917
|
-
continue;
|
1918
|
-
case 8:
|
1919
|
-
if (tag !== 66) {
|
1920
|
-
break;
|
1921
|
-
}
|
1922
|
-
|
1923
|
-
message.clientConfiguration = ClientConfiguration.decode(reader, reader.uint32());
|
1924
|
-
continue;
|
1925
|
-
case 9:
|
1926
|
-
if (tag !== 74) {
|
1927
|
-
break;
|
1928
|
-
}
|
1929
|
-
|
1930
|
-
message.serverRegion = reader.string();
|
1931
|
-
continue;
|
1932
|
-
case 10:
|
1933
|
-
if (tag !== 80) {
|
1934
|
-
break;
|
1935
|
-
}
|
1936
|
-
|
1937
|
-
message.pingTimeout = reader.int32();
|
1938
|
-
continue;
|
1939
|
-
case 11:
|
1940
|
-
if (tag !== 88) {
|
1941
|
-
break;
|
1942
|
-
}
|
1943
|
-
|
1944
|
-
message.pingInterval = reader.int32();
|
1945
|
-
continue;
|
1946
|
-
case 12:
|
1947
|
-
if (tag !== 98) {
|
1948
|
-
break;
|
1949
|
-
}
|
1950
|
-
|
1951
|
-
message.serverInfo = ServerInfo.decode(reader, reader.uint32());
|
1952
|
-
continue;
|
1953
|
-
case 13:
|
1954
|
-
if (tag !== 106) {
|
1955
|
-
break;
|
1956
|
-
}
|
1957
|
-
|
1958
|
-
message.sifTrailer = reader.bytes();
|
1959
|
-
continue;
|
1960
|
-
}
|
1961
|
-
if ((tag & 7) === 4 || tag === 0) {
|
1962
|
-
break;
|
1963
|
-
}
|
1964
|
-
reader.skipType(tag & 7);
|
1965
|
-
}
|
1966
|
-
return message;
|
1967
|
-
},
|
1968
|
-
|
1969
|
-
fromJSON(object: any): JoinResponse {
|
1970
|
-
return {
|
1971
|
-
room: isSet(object.room) ? Room.fromJSON(object.room) : undefined,
|
1972
|
-
participant: isSet(object.participant) ? ParticipantInfo.fromJSON(object.participant) : undefined,
|
1973
|
-
otherParticipants: Array.isArray(object?.otherParticipants)
|
1974
|
-
? object.otherParticipants.map((e: any) => ParticipantInfo.fromJSON(e))
|
1975
|
-
: [],
|
1976
|
-
serverVersion: isSet(object.serverVersion) ? String(object.serverVersion) : "",
|
1977
|
-
iceServers: Array.isArray(object?.iceServers) ? object.iceServers.map((e: any) => ICEServer.fromJSON(e)) : [],
|
1978
|
-
subscriberPrimary: isSet(object.subscriberPrimary) ? Boolean(object.subscriberPrimary) : false,
|
1979
|
-
alternativeUrl: isSet(object.alternativeUrl) ? String(object.alternativeUrl) : "",
|
1980
|
-
clientConfiguration: isSet(object.clientConfiguration)
|
1981
|
-
? ClientConfiguration.fromJSON(object.clientConfiguration)
|
1982
|
-
: undefined,
|
1983
|
-
serverRegion: isSet(object.serverRegion) ? String(object.serverRegion) : "",
|
1984
|
-
pingTimeout: isSet(object.pingTimeout) ? Number(object.pingTimeout) : 0,
|
1985
|
-
pingInterval: isSet(object.pingInterval) ? Number(object.pingInterval) : 0,
|
1986
|
-
serverInfo: isSet(object.serverInfo) ? ServerInfo.fromJSON(object.serverInfo) : undefined,
|
1987
|
-
sifTrailer: isSet(object.sifTrailer) ? bytesFromBase64(object.sifTrailer) : new Uint8Array(),
|
1988
|
-
};
|
1989
|
-
},
|
1990
|
-
|
1991
|
-
toJSON(message: JoinResponse): unknown {
|
1992
|
-
const obj: any = {};
|
1993
|
-
message.room !== undefined && (obj.room = message.room ? Room.toJSON(message.room) : undefined);
|
1994
|
-
message.participant !== undefined &&
|
1995
|
-
(obj.participant = message.participant ? ParticipantInfo.toJSON(message.participant) : undefined);
|
1996
|
-
if (message.otherParticipants) {
|
1997
|
-
obj.otherParticipants = message.otherParticipants.map((e) => e ? ParticipantInfo.toJSON(e) : undefined);
|
1998
|
-
} else {
|
1999
|
-
obj.otherParticipants = [];
|
2000
|
-
}
|
2001
|
-
message.serverVersion !== undefined && (obj.serverVersion = message.serverVersion);
|
2002
|
-
if (message.iceServers) {
|
2003
|
-
obj.iceServers = message.iceServers.map((e) => e ? ICEServer.toJSON(e) : undefined);
|
2004
|
-
} else {
|
2005
|
-
obj.iceServers = [];
|
2006
|
-
}
|
2007
|
-
message.subscriberPrimary !== undefined && (obj.subscriberPrimary = message.subscriberPrimary);
|
2008
|
-
message.alternativeUrl !== undefined && (obj.alternativeUrl = message.alternativeUrl);
|
2009
|
-
message.clientConfiguration !== undefined && (obj.clientConfiguration = message.clientConfiguration
|
2010
|
-
? ClientConfiguration.toJSON(message.clientConfiguration)
|
2011
|
-
: undefined);
|
2012
|
-
message.serverRegion !== undefined && (obj.serverRegion = message.serverRegion);
|
2013
|
-
message.pingTimeout !== undefined && (obj.pingTimeout = Math.round(message.pingTimeout));
|
2014
|
-
message.pingInterval !== undefined && (obj.pingInterval = Math.round(message.pingInterval));
|
2015
|
-
message.serverInfo !== undefined &&
|
2016
|
-
(obj.serverInfo = message.serverInfo ? ServerInfo.toJSON(message.serverInfo) : undefined);
|
2017
|
-
message.sifTrailer !== undefined &&
|
2018
|
-
(obj.sifTrailer = base64FromBytes(message.sifTrailer !== undefined ? message.sifTrailer : new Uint8Array()));
|
2019
|
-
return obj;
|
2020
|
-
},
|
2021
|
-
|
2022
|
-
create<I extends Exact<DeepPartial<JoinResponse>, I>>(base?: I): JoinResponse {
|
2023
|
-
return JoinResponse.fromPartial(base ?? {});
|
2024
|
-
},
|
2025
|
-
|
2026
|
-
fromPartial<I extends Exact<DeepPartial<JoinResponse>, I>>(object: I): JoinResponse {
|
2027
|
-
const message = createBaseJoinResponse();
|
2028
|
-
message.room = (object.room !== undefined && object.room !== null) ? Room.fromPartial(object.room) : undefined;
|
2029
|
-
message.participant = (object.participant !== undefined && object.participant !== null)
|
2030
|
-
? ParticipantInfo.fromPartial(object.participant)
|
2031
|
-
: undefined;
|
2032
|
-
message.otherParticipants = object.otherParticipants?.map((e) => ParticipantInfo.fromPartial(e)) || [];
|
2033
|
-
message.serverVersion = object.serverVersion ?? "";
|
2034
|
-
message.iceServers = object.iceServers?.map((e) => ICEServer.fromPartial(e)) || [];
|
2035
|
-
message.subscriberPrimary = object.subscriberPrimary ?? false;
|
2036
|
-
message.alternativeUrl = object.alternativeUrl ?? "";
|
2037
|
-
message.clientConfiguration = (object.clientConfiguration !== undefined && object.clientConfiguration !== null)
|
2038
|
-
? ClientConfiguration.fromPartial(object.clientConfiguration)
|
2039
|
-
: undefined;
|
2040
|
-
message.serverRegion = object.serverRegion ?? "";
|
2041
|
-
message.pingTimeout = object.pingTimeout ?? 0;
|
2042
|
-
message.pingInterval = object.pingInterval ?? 0;
|
2043
|
-
message.serverInfo = (object.serverInfo !== undefined && object.serverInfo !== null)
|
2044
|
-
? ServerInfo.fromPartial(object.serverInfo)
|
2045
|
-
: undefined;
|
2046
|
-
message.sifTrailer = object.sifTrailer ?? new Uint8Array();
|
2047
|
-
return message;
|
2048
|
-
},
|
2049
|
-
};
|
2050
|
-
|
2051
|
-
function createBaseReconnectResponse(): ReconnectResponse {
|
2052
|
-
return { iceServers: [], clientConfiguration: undefined };
|
2053
|
-
}
|
2054
|
-
|
2055
|
-
export const ReconnectResponse = {
|
2056
|
-
encode(message: ReconnectResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
2057
|
-
for (const v of message.iceServers) {
|
2058
|
-
ICEServer.encode(v!, writer.uint32(10).fork()).ldelim();
|
2059
|
-
}
|
2060
|
-
if (message.clientConfiguration !== undefined) {
|
2061
|
-
ClientConfiguration.encode(message.clientConfiguration, writer.uint32(18).fork()).ldelim();
|
2062
|
-
}
|
2063
|
-
return writer;
|
2064
|
-
},
|
2065
|
-
|
2066
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): ReconnectResponse {
|
2067
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
2068
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
2069
|
-
const message = createBaseReconnectResponse();
|
2070
|
-
while (reader.pos < end) {
|
2071
|
-
const tag = reader.uint32();
|
2072
|
-
switch (tag >>> 3) {
|
2073
|
-
case 1:
|
2074
|
-
if (tag !== 10) {
|
2075
|
-
break;
|
2076
|
-
}
|
2077
|
-
|
2078
|
-
message.iceServers.push(ICEServer.decode(reader, reader.uint32()));
|
2079
|
-
continue;
|
2080
|
-
case 2:
|
2081
|
-
if (tag !== 18) {
|
2082
|
-
break;
|
2083
|
-
}
|
2084
|
-
|
2085
|
-
message.clientConfiguration = ClientConfiguration.decode(reader, reader.uint32());
|
2086
|
-
continue;
|
2087
|
-
}
|
2088
|
-
if ((tag & 7) === 4 || tag === 0) {
|
2089
|
-
break;
|
2090
|
-
}
|
2091
|
-
reader.skipType(tag & 7);
|
2092
|
-
}
|
2093
|
-
return message;
|
2094
|
-
},
|
2095
|
-
|
2096
|
-
fromJSON(object: any): ReconnectResponse {
|
2097
|
-
return {
|
2098
|
-
iceServers: Array.isArray(object?.iceServers) ? object.iceServers.map((e: any) => ICEServer.fromJSON(e)) : [],
|
2099
|
-
clientConfiguration: isSet(object.clientConfiguration)
|
2100
|
-
? ClientConfiguration.fromJSON(object.clientConfiguration)
|
2101
|
-
: undefined,
|
2102
|
-
};
|
2103
|
-
},
|
2104
|
-
|
2105
|
-
toJSON(message: ReconnectResponse): unknown {
|
2106
|
-
const obj: any = {};
|
2107
|
-
if (message.iceServers) {
|
2108
|
-
obj.iceServers = message.iceServers.map((e) => e ? ICEServer.toJSON(e) : undefined);
|
2109
|
-
} else {
|
2110
|
-
obj.iceServers = [];
|
2111
|
-
}
|
2112
|
-
message.clientConfiguration !== undefined && (obj.clientConfiguration = message.clientConfiguration
|
2113
|
-
? ClientConfiguration.toJSON(message.clientConfiguration)
|
2114
|
-
: undefined);
|
2115
|
-
return obj;
|
2116
|
-
},
|
2117
|
-
|
2118
|
-
create<I extends Exact<DeepPartial<ReconnectResponse>, I>>(base?: I): ReconnectResponse {
|
2119
|
-
return ReconnectResponse.fromPartial(base ?? {});
|
2120
|
-
},
|
2121
|
-
|
2122
|
-
fromPartial<I extends Exact<DeepPartial<ReconnectResponse>, I>>(object: I): ReconnectResponse {
|
2123
|
-
const message = createBaseReconnectResponse();
|
2124
|
-
message.iceServers = object.iceServers?.map((e) => ICEServer.fromPartial(e)) || [];
|
2125
|
-
message.clientConfiguration = (object.clientConfiguration !== undefined && object.clientConfiguration !== null)
|
2126
|
-
? ClientConfiguration.fromPartial(object.clientConfiguration)
|
2127
|
-
: undefined;
|
2128
|
-
return message;
|
2129
|
-
},
|
2130
|
-
};
|
2131
|
-
|
2132
|
-
function createBaseTrackPublishedResponse(): TrackPublishedResponse {
|
2133
|
-
return { cid: "", track: undefined };
|
2134
|
-
}
|
2135
|
-
|
2136
|
-
export const TrackPublishedResponse = {
|
2137
|
-
encode(message: TrackPublishedResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
2138
|
-
if (message.cid !== "") {
|
2139
|
-
writer.uint32(10).string(message.cid);
|
2140
|
-
}
|
2141
|
-
if (message.track !== undefined) {
|
2142
|
-
TrackInfo.encode(message.track, writer.uint32(18).fork()).ldelim();
|
2143
|
-
}
|
2144
|
-
return writer;
|
2145
|
-
},
|
2146
|
-
|
2147
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): TrackPublishedResponse {
|
2148
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
2149
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
2150
|
-
const message = createBaseTrackPublishedResponse();
|
2151
|
-
while (reader.pos < end) {
|
2152
|
-
const tag = reader.uint32();
|
2153
|
-
switch (tag >>> 3) {
|
2154
|
-
case 1:
|
2155
|
-
if (tag !== 10) {
|
2156
|
-
break;
|
2157
|
-
}
|
2158
|
-
|
2159
|
-
message.cid = reader.string();
|
2160
|
-
continue;
|
2161
|
-
case 2:
|
2162
|
-
if (tag !== 18) {
|
2163
|
-
break;
|
2164
|
-
}
|
2165
|
-
|
2166
|
-
message.track = TrackInfo.decode(reader, reader.uint32());
|
2167
|
-
continue;
|
2168
|
-
}
|
2169
|
-
if ((tag & 7) === 4 || tag === 0) {
|
2170
|
-
break;
|
2171
|
-
}
|
2172
|
-
reader.skipType(tag & 7);
|
2173
|
-
}
|
2174
|
-
return message;
|
2175
|
-
},
|
2176
|
-
|
2177
|
-
fromJSON(object: any): TrackPublishedResponse {
|
2178
|
-
return {
|
2179
|
-
cid: isSet(object.cid) ? String(object.cid) : "",
|
2180
|
-
track: isSet(object.track) ? TrackInfo.fromJSON(object.track) : undefined,
|
2181
|
-
};
|
2182
|
-
},
|
2183
|
-
|
2184
|
-
toJSON(message: TrackPublishedResponse): unknown {
|
2185
|
-
const obj: any = {};
|
2186
|
-
message.cid !== undefined && (obj.cid = message.cid);
|
2187
|
-
message.track !== undefined && (obj.track = message.track ? TrackInfo.toJSON(message.track) : undefined);
|
2188
|
-
return obj;
|
2189
|
-
},
|
2190
|
-
|
2191
|
-
create<I extends Exact<DeepPartial<TrackPublishedResponse>, I>>(base?: I): TrackPublishedResponse {
|
2192
|
-
return TrackPublishedResponse.fromPartial(base ?? {});
|
2193
|
-
},
|
2194
|
-
|
2195
|
-
fromPartial<I extends Exact<DeepPartial<TrackPublishedResponse>, I>>(object: I): TrackPublishedResponse {
|
2196
|
-
const message = createBaseTrackPublishedResponse();
|
2197
|
-
message.cid = object.cid ?? "";
|
2198
|
-
message.track = (object.track !== undefined && object.track !== null)
|
2199
|
-
? TrackInfo.fromPartial(object.track)
|
2200
|
-
: undefined;
|
2201
|
-
return message;
|
2202
|
-
},
|
2203
|
-
};
|
2204
|
-
|
2205
|
-
function createBaseTrackUnpublishedResponse(): TrackUnpublishedResponse {
|
2206
|
-
return { trackSid: "" };
|
2207
|
-
}
|
2208
|
-
|
2209
|
-
export const TrackUnpublishedResponse = {
|
2210
|
-
encode(message: TrackUnpublishedResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
2211
|
-
if (message.trackSid !== "") {
|
2212
|
-
writer.uint32(10).string(message.trackSid);
|
2213
|
-
}
|
2214
|
-
return writer;
|
2215
|
-
},
|
2216
|
-
|
2217
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): TrackUnpublishedResponse {
|
2218
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
2219
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
2220
|
-
const message = createBaseTrackUnpublishedResponse();
|
2221
|
-
while (reader.pos < end) {
|
2222
|
-
const tag = reader.uint32();
|
2223
|
-
switch (tag >>> 3) {
|
2224
|
-
case 1:
|
2225
|
-
if (tag !== 10) {
|
2226
|
-
break;
|
2227
|
-
}
|
2228
|
-
|
2229
|
-
message.trackSid = reader.string();
|
2230
|
-
continue;
|
2231
|
-
}
|
2232
|
-
if ((tag & 7) === 4 || tag === 0) {
|
2233
|
-
break;
|
2234
|
-
}
|
2235
|
-
reader.skipType(tag & 7);
|
2236
|
-
}
|
2237
|
-
return message;
|
2238
|
-
},
|
2239
|
-
|
2240
|
-
fromJSON(object: any): TrackUnpublishedResponse {
|
2241
|
-
return { trackSid: isSet(object.trackSid) ? String(object.trackSid) : "" };
|
2242
|
-
},
|
2243
|
-
|
2244
|
-
toJSON(message: TrackUnpublishedResponse): unknown {
|
2245
|
-
const obj: any = {};
|
2246
|
-
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
2247
|
-
return obj;
|
2248
|
-
},
|
2249
|
-
|
2250
|
-
create<I extends Exact<DeepPartial<TrackUnpublishedResponse>, I>>(base?: I): TrackUnpublishedResponse {
|
2251
|
-
return TrackUnpublishedResponse.fromPartial(base ?? {});
|
2252
|
-
},
|
2253
|
-
|
2254
|
-
fromPartial<I extends Exact<DeepPartial<TrackUnpublishedResponse>, I>>(object: I): TrackUnpublishedResponse {
|
2255
|
-
const message = createBaseTrackUnpublishedResponse();
|
2256
|
-
message.trackSid = object.trackSid ?? "";
|
2257
|
-
return message;
|
2258
|
-
},
|
2259
|
-
};
|
2260
|
-
|
2261
|
-
function createBaseSessionDescription(): SessionDescription {
|
2262
|
-
return { type: "", sdp: "" };
|
2263
|
-
}
|
2264
|
-
|
2265
|
-
export const SessionDescription = {
|
2266
|
-
encode(message: SessionDescription, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
2267
|
-
if (message.type !== "") {
|
2268
|
-
writer.uint32(10).string(message.type);
|
2269
|
-
}
|
2270
|
-
if (message.sdp !== "") {
|
2271
|
-
writer.uint32(18).string(message.sdp);
|
2272
|
-
}
|
2273
|
-
return writer;
|
2274
|
-
},
|
2275
|
-
|
2276
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SessionDescription {
|
2277
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
2278
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
2279
|
-
const message = createBaseSessionDescription();
|
2280
|
-
while (reader.pos < end) {
|
2281
|
-
const tag = reader.uint32();
|
2282
|
-
switch (tag >>> 3) {
|
2283
|
-
case 1:
|
2284
|
-
if (tag !== 10) {
|
2285
|
-
break;
|
2286
|
-
}
|
2287
|
-
|
2288
|
-
message.type = reader.string();
|
2289
|
-
continue;
|
2290
|
-
case 2:
|
2291
|
-
if (tag !== 18) {
|
2292
|
-
break;
|
2293
|
-
}
|
2294
|
-
|
2295
|
-
message.sdp = reader.string();
|
2296
|
-
continue;
|
2297
|
-
}
|
2298
|
-
if ((tag & 7) === 4 || tag === 0) {
|
2299
|
-
break;
|
2300
|
-
}
|
2301
|
-
reader.skipType(tag & 7);
|
2302
|
-
}
|
2303
|
-
return message;
|
2304
|
-
},
|
2305
|
-
|
2306
|
-
fromJSON(object: any): SessionDescription {
|
2307
|
-
return { type: isSet(object.type) ? String(object.type) : "", sdp: isSet(object.sdp) ? String(object.sdp) : "" };
|
2308
|
-
},
|
2309
|
-
|
2310
|
-
toJSON(message: SessionDescription): unknown {
|
2311
|
-
const obj: any = {};
|
2312
|
-
message.type !== undefined && (obj.type = message.type);
|
2313
|
-
message.sdp !== undefined && (obj.sdp = message.sdp);
|
2314
|
-
return obj;
|
2315
|
-
},
|
2316
|
-
|
2317
|
-
create<I extends Exact<DeepPartial<SessionDescription>, I>>(base?: I): SessionDescription {
|
2318
|
-
return SessionDescription.fromPartial(base ?? {});
|
2319
|
-
},
|
2320
|
-
|
2321
|
-
fromPartial<I extends Exact<DeepPartial<SessionDescription>, I>>(object: I): SessionDescription {
|
2322
|
-
const message = createBaseSessionDescription();
|
2323
|
-
message.type = object.type ?? "";
|
2324
|
-
message.sdp = object.sdp ?? "";
|
2325
|
-
return message;
|
2326
|
-
},
|
2327
|
-
};
|
2328
|
-
|
2329
|
-
function createBaseParticipantUpdate(): ParticipantUpdate {
|
2330
|
-
return { participants: [] };
|
2331
|
-
}
|
2332
|
-
|
2333
|
-
export const ParticipantUpdate = {
|
2334
|
-
encode(message: ParticipantUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
2335
|
-
for (const v of message.participants) {
|
2336
|
-
ParticipantInfo.encode(v!, writer.uint32(10).fork()).ldelim();
|
2337
|
-
}
|
2338
|
-
return writer;
|
2339
|
-
},
|
2340
|
-
|
2341
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): ParticipantUpdate {
|
2342
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
2343
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
2344
|
-
const message = createBaseParticipantUpdate();
|
2345
|
-
while (reader.pos < end) {
|
2346
|
-
const tag = reader.uint32();
|
2347
|
-
switch (tag >>> 3) {
|
2348
|
-
case 1:
|
2349
|
-
if (tag !== 10) {
|
2350
|
-
break;
|
2351
|
-
}
|
2352
|
-
|
2353
|
-
message.participants.push(ParticipantInfo.decode(reader, reader.uint32()));
|
2354
|
-
continue;
|
2355
|
-
}
|
2356
|
-
if ((tag & 7) === 4 || tag === 0) {
|
2357
|
-
break;
|
2358
|
-
}
|
2359
|
-
reader.skipType(tag & 7);
|
2360
|
-
}
|
2361
|
-
return message;
|
2362
|
-
},
|
2363
|
-
|
2364
|
-
fromJSON(object: any): ParticipantUpdate {
|
2365
|
-
return {
|
2366
|
-
participants: Array.isArray(object?.participants)
|
2367
|
-
? object.participants.map((e: any) => ParticipantInfo.fromJSON(e))
|
2368
|
-
: [],
|
2369
|
-
};
|
2370
|
-
},
|
2371
|
-
|
2372
|
-
toJSON(message: ParticipantUpdate): unknown {
|
2373
|
-
const obj: any = {};
|
2374
|
-
if (message.participants) {
|
2375
|
-
obj.participants = message.participants.map((e) => e ? ParticipantInfo.toJSON(e) : undefined);
|
2376
|
-
} else {
|
2377
|
-
obj.participants = [];
|
2378
|
-
}
|
2379
|
-
return obj;
|
2380
|
-
},
|
2381
|
-
|
2382
|
-
create<I extends Exact<DeepPartial<ParticipantUpdate>, I>>(base?: I): ParticipantUpdate {
|
2383
|
-
return ParticipantUpdate.fromPartial(base ?? {});
|
2384
|
-
},
|
2385
|
-
|
2386
|
-
fromPartial<I extends Exact<DeepPartial<ParticipantUpdate>, I>>(object: I): ParticipantUpdate {
|
2387
|
-
const message = createBaseParticipantUpdate();
|
2388
|
-
message.participants = object.participants?.map((e) => ParticipantInfo.fromPartial(e)) || [];
|
2389
|
-
return message;
|
2390
|
-
},
|
2391
|
-
};
|
2392
|
-
|
2393
|
-
function createBaseUpdateSubscription(): UpdateSubscription {
|
2394
|
-
return { trackSids: [], subscribe: false, participantTracks: [] };
|
2395
|
-
}
|
2396
|
-
|
2397
|
-
export const UpdateSubscription = {
|
2398
|
-
encode(message: UpdateSubscription, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
2399
|
-
for (const v of message.trackSids) {
|
2400
|
-
writer.uint32(10).string(v!);
|
2401
|
-
}
|
2402
|
-
if (message.subscribe === true) {
|
2403
|
-
writer.uint32(16).bool(message.subscribe);
|
2404
|
-
}
|
2405
|
-
for (const v of message.participantTracks) {
|
2406
|
-
ParticipantTracks.encode(v!, writer.uint32(26).fork()).ldelim();
|
2407
|
-
}
|
2408
|
-
return writer;
|
2409
|
-
},
|
2410
|
-
|
2411
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): UpdateSubscription {
|
2412
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
2413
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
2414
|
-
const message = createBaseUpdateSubscription();
|
2415
|
-
while (reader.pos < end) {
|
2416
|
-
const tag = reader.uint32();
|
2417
|
-
switch (tag >>> 3) {
|
2418
|
-
case 1:
|
2419
|
-
if (tag !== 10) {
|
2420
|
-
break;
|
2421
|
-
}
|
2422
|
-
|
2423
|
-
message.trackSids.push(reader.string());
|
2424
|
-
continue;
|
2425
|
-
case 2:
|
2426
|
-
if (tag !== 16) {
|
2427
|
-
break;
|
2428
|
-
}
|
2429
|
-
|
2430
|
-
message.subscribe = reader.bool();
|
2431
|
-
continue;
|
2432
|
-
case 3:
|
2433
|
-
if (tag !== 26) {
|
2434
|
-
break;
|
2435
|
-
}
|
2436
|
-
|
2437
|
-
message.participantTracks.push(ParticipantTracks.decode(reader, reader.uint32()));
|
2438
|
-
continue;
|
2439
|
-
}
|
2440
|
-
if ((tag & 7) === 4 || tag === 0) {
|
2441
|
-
break;
|
2442
|
-
}
|
2443
|
-
reader.skipType(tag & 7);
|
2444
|
-
}
|
2445
|
-
return message;
|
2446
|
-
},
|
2447
|
-
|
2448
|
-
fromJSON(object: any): UpdateSubscription {
|
2449
|
-
return {
|
2450
|
-
trackSids: Array.isArray(object?.trackSids) ? object.trackSids.map((e: any) => String(e)) : [],
|
2451
|
-
subscribe: isSet(object.subscribe) ? Boolean(object.subscribe) : false,
|
2452
|
-
participantTracks: Array.isArray(object?.participantTracks)
|
2453
|
-
? object.participantTracks.map((e: any) => ParticipantTracks.fromJSON(e))
|
2454
|
-
: [],
|
2455
|
-
};
|
2456
|
-
},
|
2457
|
-
|
2458
|
-
toJSON(message: UpdateSubscription): unknown {
|
2459
|
-
const obj: any = {};
|
2460
|
-
if (message.trackSids) {
|
2461
|
-
obj.trackSids = message.trackSids.map((e) => e);
|
2462
|
-
} else {
|
2463
|
-
obj.trackSids = [];
|
2464
|
-
}
|
2465
|
-
message.subscribe !== undefined && (obj.subscribe = message.subscribe);
|
2466
|
-
if (message.participantTracks) {
|
2467
|
-
obj.participantTracks = message.participantTracks.map((e) => e ? ParticipantTracks.toJSON(e) : undefined);
|
2468
|
-
} else {
|
2469
|
-
obj.participantTracks = [];
|
2470
|
-
}
|
2471
|
-
return obj;
|
2472
|
-
},
|
2473
|
-
|
2474
|
-
create<I extends Exact<DeepPartial<UpdateSubscription>, I>>(base?: I): UpdateSubscription {
|
2475
|
-
return UpdateSubscription.fromPartial(base ?? {});
|
2476
|
-
},
|
2477
|
-
|
2478
|
-
fromPartial<I extends Exact<DeepPartial<UpdateSubscription>, I>>(object: I): UpdateSubscription {
|
2479
|
-
const message = createBaseUpdateSubscription();
|
2480
|
-
message.trackSids = object.trackSids?.map((e) => e) || [];
|
2481
|
-
message.subscribe = object.subscribe ?? false;
|
2482
|
-
message.participantTracks = object.participantTracks?.map((e) => ParticipantTracks.fromPartial(e)) || [];
|
2483
|
-
return message;
|
2484
|
-
},
|
2485
|
-
};
|
2486
|
-
|
2487
|
-
function createBaseUpdateTrackSettings(): UpdateTrackSettings {
|
2488
|
-
return { trackSids: [], disabled: false, quality: 0, width: 0, height: 0, fps: 0, priority: 0 };
|
2489
|
-
}
|
2490
|
-
|
2491
|
-
export const UpdateTrackSettings = {
|
2492
|
-
encode(message: UpdateTrackSettings, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
2493
|
-
for (const v of message.trackSids) {
|
2494
|
-
writer.uint32(10).string(v!);
|
2495
|
-
}
|
2496
|
-
if (message.disabled === true) {
|
2497
|
-
writer.uint32(24).bool(message.disabled);
|
2498
|
-
}
|
2499
|
-
if (message.quality !== 0) {
|
2500
|
-
writer.uint32(32).int32(message.quality);
|
2501
|
-
}
|
2502
|
-
if (message.width !== 0) {
|
2503
|
-
writer.uint32(40).uint32(message.width);
|
2504
|
-
}
|
2505
|
-
if (message.height !== 0) {
|
2506
|
-
writer.uint32(48).uint32(message.height);
|
2507
|
-
}
|
2508
|
-
if (message.fps !== 0) {
|
2509
|
-
writer.uint32(56).uint32(message.fps);
|
2510
|
-
}
|
2511
|
-
if (message.priority !== 0) {
|
2512
|
-
writer.uint32(64).uint32(message.priority);
|
2513
|
-
}
|
2514
|
-
return writer;
|
2515
|
-
},
|
2516
|
-
|
2517
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): UpdateTrackSettings {
|
2518
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
2519
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
2520
|
-
const message = createBaseUpdateTrackSettings();
|
2521
|
-
while (reader.pos < end) {
|
2522
|
-
const tag = reader.uint32();
|
2523
|
-
switch (tag >>> 3) {
|
2524
|
-
case 1:
|
2525
|
-
if (tag !== 10) {
|
2526
|
-
break;
|
2527
|
-
}
|
2528
|
-
|
2529
|
-
message.trackSids.push(reader.string());
|
2530
|
-
continue;
|
2531
|
-
case 3:
|
2532
|
-
if (tag !== 24) {
|
2533
|
-
break;
|
2534
|
-
}
|
2535
|
-
|
2536
|
-
message.disabled = reader.bool();
|
2537
|
-
continue;
|
2538
|
-
case 4:
|
2539
|
-
if (tag !== 32) {
|
2540
|
-
break;
|
2541
|
-
}
|
2542
|
-
|
2543
|
-
message.quality = reader.int32() as any;
|
2544
|
-
continue;
|
2545
|
-
case 5:
|
2546
|
-
if (tag !== 40) {
|
2547
|
-
break;
|
2548
|
-
}
|
2549
|
-
|
2550
|
-
message.width = reader.uint32();
|
2551
|
-
continue;
|
2552
|
-
case 6:
|
2553
|
-
if (tag !== 48) {
|
2554
|
-
break;
|
2555
|
-
}
|
2556
|
-
|
2557
|
-
message.height = reader.uint32();
|
2558
|
-
continue;
|
2559
|
-
case 7:
|
2560
|
-
if (tag !== 56) {
|
2561
|
-
break;
|
2562
|
-
}
|
2563
|
-
|
2564
|
-
message.fps = reader.uint32();
|
2565
|
-
continue;
|
2566
|
-
case 8:
|
2567
|
-
if (tag !== 64) {
|
2568
|
-
break;
|
2569
|
-
}
|
2570
|
-
|
2571
|
-
message.priority = reader.uint32();
|
2572
|
-
continue;
|
2573
|
-
}
|
2574
|
-
if ((tag & 7) === 4 || tag === 0) {
|
2575
|
-
break;
|
2576
|
-
}
|
2577
|
-
reader.skipType(tag & 7);
|
2578
|
-
}
|
2579
|
-
return message;
|
2580
|
-
},
|
2581
|
-
|
2582
|
-
fromJSON(object: any): UpdateTrackSettings {
|
2583
|
-
return {
|
2584
|
-
trackSids: Array.isArray(object?.trackSids) ? object.trackSids.map((e: any) => String(e)) : [],
|
2585
|
-
disabled: isSet(object.disabled) ? Boolean(object.disabled) : false,
|
2586
|
-
quality: isSet(object.quality) ? videoQualityFromJSON(object.quality) : 0,
|
2587
|
-
width: isSet(object.width) ? Number(object.width) : 0,
|
2588
|
-
height: isSet(object.height) ? Number(object.height) : 0,
|
2589
|
-
fps: isSet(object.fps) ? Number(object.fps) : 0,
|
2590
|
-
priority: isSet(object.priority) ? Number(object.priority) : 0,
|
2591
|
-
};
|
2592
|
-
},
|
2593
|
-
|
2594
|
-
toJSON(message: UpdateTrackSettings): unknown {
|
2595
|
-
const obj: any = {};
|
2596
|
-
if (message.trackSids) {
|
2597
|
-
obj.trackSids = message.trackSids.map((e) => e);
|
2598
|
-
} else {
|
2599
|
-
obj.trackSids = [];
|
2600
|
-
}
|
2601
|
-
message.disabled !== undefined && (obj.disabled = message.disabled);
|
2602
|
-
message.quality !== undefined && (obj.quality = videoQualityToJSON(message.quality));
|
2603
|
-
message.width !== undefined && (obj.width = Math.round(message.width));
|
2604
|
-
message.height !== undefined && (obj.height = Math.round(message.height));
|
2605
|
-
message.fps !== undefined && (obj.fps = Math.round(message.fps));
|
2606
|
-
message.priority !== undefined && (obj.priority = Math.round(message.priority));
|
2607
|
-
return obj;
|
2608
|
-
},
|
2609
|
-
|
2610
|
-
create<I extends Exact<DeepPartial<UpdateTrackSettings>, I>>(base?: I): UpdateTrackSettings {
|
2611
|
-
return UpdateTrackSettings.fromPartial(base ?? {});
|
2612
|
-
},
|
2613
|
-
|
2614
|
-
fromPartial<I extends Exact<DeepPartial<UpdateTrackSettings>, I>>(object: I): UpdateTrackSettings {
|
2615
|
-
const message = createBaseUpdateTrackSettings();
|
2616
|
-
message.trackSids = object.trackSids?.map((e) => e) || [];
|
2617
|
-
message.disabled = object.disabled ?? false;
|
2618
|
-
message.quality = object.quality ?? 0;
|
2619
|
-
message.width = object.width ?? 0;
|
2620
|
-
message.height = object.height ?? 0;
|
2621
|
-
message.fps = object.fps ?? 0;
|
2622
|
-
message.priority = object.priority ?? 0;
|
2623
|
-
return message;
|
2624
|
-
},
|
2625
|
-
};
|
2626
|
-
|
2627
|
-
function createBaseLeaveRequest(): LeaveRequest {
|
2628
|
-
return { canReconnect: false, reason: 0 };
|
2629
|
-
}
|
2630
|
-
|
2631
|
-
export const LeaveRequest = {
|
2632
|
-
encode(message: LeaveRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
2633
|
-
if (message.canReconnect === true) {
|
2634
|
-
writer.uint32(8).bool(message.canReconnect);
|
2635
|
-
}
|
2636
|
-
if (message.reason !== 0) {
|
2637
|
-
writer.uint32(16).int32(message.reason);
|
2638
|
-
}
|
2639
|
-
return writer;
|
2640
|
-
},
|
2641
|
-
|
2642
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): LeaveRequest {
|
2643
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
2644
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
2645
|
-
const message = createBaseLeaveRequest();
|
2646
|
-
while (reader.pos < end) {
|
2647
|
-
const tag = reader.uint32();
|
2648
|
-
switch (tag >>> 3) {
|
2649
|
-
case 1:
|
2650
|
-
if (tag !== 8) {
|
2651
|
-
break;
|
2652
|
-
}
|
2653
|
-
|
2654
|
-
message.canReconnect = reader.bool();
|
2655
|
-
continue;
|
2656
|
-
case 2:
|
2657
|
-
if (tag !== 16) {
|
2658
|
-
break;
|
2659
|
-
}
|
2660
|
-
|
2661
|
-
message.reason = reader.int32() as any;
|
2662
|
-
continue;
|
2663
|
-
}
|
2664
|
-
if ((tag & 7) === 4 || tag === 0) {
|
2665
|
-
break;
|
2666
|
-
}
|
2667
|
-
reader.skipType(tag & 7);
|
2668
|
-
}
|
2669
|
-
return message;
|
2670
|
-
},
|
2671
|
-
|
2672
|
-
fromJSON(object: any): LeaveRequest {
|
2673
|
-
return {
|
2674
|
-
canReconnect: isSet(object.canReconnect) ? Boolean(object.canReconnect) : false,
|
2675
|
-
reason: isSet(object.reason) ? disconnectReasonFromJSON(object.reason) : 0,
|
2676
|
-
};
|
2677
|
-
},
|
2678
|
-
|
2679
|
-
toJSON(message: LeaveRequest): unknown {
|
2680
|
-
const obj: any = {};
|
2681
|
-
message.canReconnect !== undefined && (obj.canReconnect = message.canReconnect);
|
2682
|
-
message.reason !== undefined && (obj.reason = disconnectReasonToJSON(message.reason));
|
2683
|
-
return obj;
|
2684
|
-
},
|
2685
|
-
|
2686
|
-
create<I extends Exact<DeepPartial<LeaveRequest>, I>>(base?: I): LeaveRequest {
|
2687
|
-
return LeaveRequest.fromPartial(base ?? {});
|
2688
|
-
},
|
2689
|
-
|
2690
|
-
fromPartial<I extends Exact<DeepPartial<LeaveRequest>, I>>(object: I): LeaveRequest {
|
2691
|
-
const message = createBaseLeaveRequest();
|
2692
|
-
message.canReconnect = object.canReconnect ?? false;
|
2693
|
-
message.reason = object.reason ?? 0;
|
2694
|
-
return message;
|
2695
|
-
},
|
2696
|
-
};
|
2697
|
-
|
2698
|
-
function createBaseUpdateVideoLayers(): UpdateVideoLayers {
|
2699
|
-
return { trackSid: "", layers: [] };
|
2700
|
-
}
|
2701
|
-
|
2702
|
-
export const UpdateVideoLayers = {
|
2703
|
-
encode(message: UpdateVideoLayers, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
2704
|
-
if (message.trackSid !== "") {
|
2705
|
-
writer.uint32(10).string(message.trackSid);
|
2706
|
-
}
|
2707
|
-
for (const v of message.layers) {
|
2708
|
-
VideoLayer.encode(v!, writer.uint32(18).fork()).ldelim();
|
2709
|
-
}
|
2710
|
-
return writer;
|
2711
|
-
},
|
2712
|
-
|
2713
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): UpdateVideoLayers {
|
2714
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
2715
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
2716
|
-
const message = createBaseUpdateVideoLayers();
|
2717
|
-
while (reader.pos < end) {
|
2718
|
-
const tag = reader.uint32();
|
2719
|
-
switch (tag >>> 3) {
|
2720
|
-
case 1:
|
2721
|
-
if (tag !== 10) {
|
2722
|
-
break;
|
2723
|
-
}
|
2724
|
-
|
2725
|
-
message.trackSid = reader.string();
|
2726
|
-
continue;
|
2727
|
-
case 2:
|
2728
|
-
if (tag !== 18) {
|
2729
|
-
break;
|
2730
|
-
}
|
2731
|
-
|
2732
|
-
message.layers.push(VideoLayer.decode(reader, reader.uint32()));
|
2733
|
-
continue;
|
2734
|
-
}
|
2735
|
-
if ((tag & 7) === 4 || tag === 0) {
|
2736
|
-
break;
|
2737
|
-
}
|
2738
|
-
reader.skipType(tag & 7);
|
2739
|
-
}
|
2740
|
-
return message;
|
2741
|
-
},
|
2742
|
-
|
2743
|
-
fromJSON(object: any): UpdateVideoLayers {
|
2744
|
-
return {
|
2745
|
-
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
2746
|
-
layers: Array.isArray(object?.layers) ? object.layers.map((e: any) => VideoLayer.fromJSON(e)) : [],
|
2747
|
-
};
|
2748
|
-
},
|
2749
|
-
|
2750
|
-
toJSON(message: UpdateVideoLayers): unknown {
|
2751
|
-
const obj: any = {};
|
2752
|
-
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
2753
|
-
if (message.layers) {
|
2754
|
-
obj.layers = message.layers.map((e) => e ? VideoLayer.toJSON(e) : undefined);
|
2755
|
-
} else {
|
2756
|
-
obj.layers = [];
|
2757
|
-
}
|
2758
|
-
return obj;
|
2759
|
-
},
|
2760
|
-
|
2761
|
-
create<I extends Exact<DeepPartial<UpdateVideoLayers>, I>>(base?: I): UpdateVideoLayers {
|
2762
|
-
return UpdateVideoLayers.fromPartial(base ?? {});
|
2763
|
-
},
|
2764
|
-
|
2765
|
-
fromPartial<I extends Exact<DeepPartial<UpdateVideoLayers>, I>>(object: I): UpdateVideoLayers {
|
2766
|
-
const message = createBaseUpdateVideoLayers();
|
2767
|
-
message.trackSid = object.trackSid ?? "";
|
2768
|
-
message.layers = object.layers?.map((e) => VideoLayer.fromPartial(e)) || [];
|
2769
|
-
return message;
|
2770
|
-
},
|
2771
|
-
};
|
2772
|
-
|
2773
|
-
function createBaseUpdateParticipantMetadata(): UpdateParticipantMetadata {
|
2774
|
-
return { metadata: "", name: "" };
|
2775
|
-
}
|
2776
|
-
|
2777
|
-
export const UpdateParticipantMetadata = {
|
2778
|
-
encode(message: UpdateParticipantMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
2779
|
-
if (message.metadata !== "") {
|
2780
|
-
writer.uint32(10).string(message.metadata);
|
2781
|
-
}
|
2782
|
-
if (message.name !== "") {
|
2783
|
-
writer.uint32(18).string(message.name);
|
2784
|
-
}
|
2785
|
-
return writer;
|
2786
|
-
},
|
2787
|
-
|
2788
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): UpdateParticipantMetadata {
|
2789
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
2790
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
2791
|
-
const message = createBaseUpdateParticipantMetadata();
|
2792
|
-
while (reader.pos < end) {
|
2793
|
-
const tag = reader.uint32();
|
2794
|
-
switch (tag >>> 3) {
|
2795
|
-
case 1:
|
2796
|
-
if (tag !== 10) {
|
2797
|
-
break;
|
2798
|
-
}
|
2799
|
-
|
2800
|
-
message.metadata = reader.string();
|
2801
|
-
continue;
|
2802
|
-
case 2:
|
2803
|
-
if (tag !== 18) {
|
2804
|
-
break;
|
2805
|
-
}
|
2806
|
-
|
2807
|
-
message.name = reader.string();
|
2808
|
-
continue;
|
2809
|
-
}
|
2810
|
-
if ((tag & 7) === 4 || tag === 0) {
|
2811
|
-
break;
|
2812
|
-
}
|
2813
|
-
reader.skipType(tag & 7);
|
2814
|
-
}
|
2815
|
-
return message;
|
2816
|
-
},
|
2817
|
-
|
2818
|
-
fromJSON(object: any): UpdateParticipantMetadata {
|
2819
|
-
return {
|
2820
|
-
metadata: isSet(object.metadata) ? String(object.metadata) : "",
|
2821
|
-
name: isSet(object.name) ? String(object.name) : "",
|
2822
|
-
};
|
2823
|
-
},
|
2824
|
-
|
2825
|
-
toJSON(message: UpdateParticipantMetadata): unknown {
|
2826
|
-
const obj: any = {};
|
2827
|
-
message.metadata !== undefined && (obj.metadata = message.metadata);
|
2828
|
-
message.name !== undefined && (obj.name = message.name);
|
2829
|
-
return obj;
|
2830
|
-
},
|
2831
|
-
|
2832
|
-
create<I extends Exact<DeepPartial<UpdateParticipantMetadata>, I>>(base?: I): UpdateParticipantMetadata {
|
2833
|
-
return UpdateParticipantMetadata.fromPartial(base ?? {});
|
2834
|
-
},
|
2835
|
-
|
2836
|
-
fromPartial<I extends Exact<DeepPartial<UpdateParticipantMetadata>, I>>(object: I): UpdateParticipantMetadata {
|
2837
|
-
const message = createBaseUpdateParticipantMetadata();
|
2838
|
-
message.metadata = object.metadata ?? "";
|
2839
|
-
message.name = object.name ?? "";
|
2840
|
-
return message;
|
2841
|
-
},
|
2842
|
-
};
|
2843
|
-
|
2844
|
-
function createBaseICEServer(): ICEServer {
|
2845
|
-
return { urls: [], username: "", credential: "" };
|
2846
|
-
}
|
2847
|
-
|
2848
|
-
export const ICEServer = {
|
2849
|
-
encode(message: ICEServer, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
2850
|
-
for (const v of message.urls) {
|
2851
|
-
writer.uint32(10).string(v!);
|
2852
|
-
}
|
2853
|
-
if (message.username !== "") {
|
2854
|
-
writer.uint32(18).string(message.username);
|
2855
|
-
}
|
2856
|
-
if (message.credential !== "") {
|
2857
|
-
writer.uint32(26).string(message.credential);
|
2858
|
-
}
|
2859
|
-
return writer;
|
2860
|
-
},
|
2861
|
-
|
2862
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): ICEServer {
|
2863
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
2864
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
2865
|
-
const message = createBaseICEServer();
|
2866
|
-
while (reader.pos < end) {
|
2867
|
-
const tag = reader.uint32();
|
2868
|
-
switch (tag >>> 3) {
|
2869
|
-
case 1:
|
2870
|
-
if (tag !== 10) {
|
2871
|
-
break;
|
2872
|
-
}
|
2873
|
-
|
2874
|
-
message.urls.push(reader.string());
|
2875
|
-
continue;
|
2876
|
-
case 2:
|
2877
|
-
if (tag !== 18) {
|
2878
|
-
break;
|
2879
|
-
}
|
2880
|
-
|
2881
|
-
message.username = reader.string();
|
2882
|
-
continue;
|
2883
|
-
case 3:
|
2884
|
-
if (tag !== 26) {
|
2885
|
-
break;
|
2886
|
-
}
|
2887
|
-
|
2888
|
-
message.credential = reader.string();
|
2889
|
-
continue;
|
2890
|
-
}
|
2891
|
-
if ((tag & 7) === 4 || tag === 0) {
|
2892
|
-
break;
|
2893
|
-
}
|
2894
|
-
reader.skipType(tag & 7);
|
2895
|
-
}
|
2896
|
-
return message;
|
2897
|
-
},
|
2898
|
-
|
2899
|
-
fromJSON(object: any): ICEServer {
|
2900
|
-
return {
|
2901
|
-
urls: Array.isArray(object?.urls) ? object.urls.map((e: any) => String(e)) : [],
|
2902
|
-
username: isSet(object.username) ? String(object.username) : "",
|
2903
|
-
credential: isSet(object.credential) ? String(object.credential) : "",
|
2904
|
-
};
|
2905
|
-
},
|
2906
|
-
|
2907
|
-
toJSON(message: ICEServer): unknown {
|
2908
|
-
const obj: any = {};
|
2909
|
-
if (message.urls) {
|
2910
|
-
obj.urls = message.urls.map((e) => e);
|
2911
|
-
} else {
|
2912
|
-
obj.urls = [];
|
2913
|
-
}
|
2914
|
-
message.username !== undefined && (obj.username = message.username);
|
2915
|
-
message.credential !== undefined && (obj.credential = message.credential);
|
2916
|
-
return obj;
|
2917
|
-
},
|
2918
|
-
|
2919
|
-
create<I extends Exact<DeepPartial<ICEServer>, I>>(base?: I): ICEServer {
|
2920
|
-
return ICEServer.fromPartial(base ?? {});
|
2921
|
-
},
|
2922
|
-
|
2923
|
-
fromPartial<I extends Exact<DeepPartial<ICEServer>, I>>(object: I): ICEServer {
|
2924
|
-
const message = createBaseICEServer();
|
2925
|
-
message.urls = object.urls?.map((e) => e) || [];
|
2926
|
-
message.username = object.username ?? "";
|
2927
|
-
message.credential = object.credential ?? "";
|
2928
|
-
return message;
|
2929
|
-
},
|
2930
|
-
};
|
2931
|
-
|
2932
|
-
function createBaseSpeakersChanged(): SpeakersChanged {
|
2933
|
-
return { speakers: [] };
|
2934
|
-
}
|
2935
|
-
|
2936
|
-
export const SpeakersChanged = {
|
2937
|
-
encode(message: SpeakersChanged, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
2938
|
-
for (const v of message.speakers) {
|
2939
|
-
SpeakerInfo.encode(v!, writer.uint32(10).fork()).ldelim();
|
2940
|
-
}
|
2941
|
-
return writer;
|
2942
|
-
},
|
2943
|
-
|
2944
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SpeakersChanged {
|
2945
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
2946
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
2947
|
-
const message = createBaseSpeakersChanged();
|
2948
|
-
while (reader.pos < end) {
|
2949
|
-
const tag = reader.uint32();
|
2950
|
-
switch (tag >>> 3) {
|
2951
|
-
case 1:
|
2952
|
-
if (tag !== 10) {
|
2953
|
-
break;
|
2954
|
-
}
|
2955
|
-
|
2956
|
-
message.speakers.push(SpeakerInfo.decode(reader, reader.uint32()));
|
2957
|
-
continue;
|
2958
|
-
}
|
2959
|
-
if ((tag & 7) === 4 || tag === 0) {
|
2960
|
-
break;
|
2961
|
-
}
|
2962
|
-
reader.skipType(tag & 7);
|
2963
|
-
}
|
2964
|
-
return message;
|
2965
|
-
},
|
2966
|
-
|
2967
|
-
fromJSON(object: any): SpeakersChanged {
|
2968
|
-
return {
|
2969
|
-
speakers: Array.isArray(object?.speakers) ? object.speakers.map((e: any) => SpeakerInfo.fromJSON(e)) : [],
|
2970
|
-
};
|
2971
|
-
},
|
2972
|
-
|
2973
|
-
toJSON(message: SpeakersChanged): unknown {
|
2974
|
-
const obj: any = {};
|
2975
|
-
if (message.speakers) {
|
2976
|
-
obj.speakers = message.speakers.map((e) => e ? SpeakerInfo.toJSON(e) : undefined);
|
2977
|
-
} else {
|
2978
|
-
obj.speakers = [];
|
2979
|
-
}
|
2980
|
-
return obj;
|
2981
|
-
},
|
2982
|
-
|
2983
|
-
create<I extends Exact<DeepPartial<SpeakersChanged>, I>>(base?: I): SpeakersChanged {
|
2984
|
-
return SpeakersChanged.fromPartial(base ?? {});
|
2985
|
-
},
|
2986
|
-
|
2987
|
-
fromPartial<I extends Exact<DeepPartial<SpeakersChanged>, I>>(object: I): SpeakersChanged {
|
2988
|
-
const message = createBaseSpeakersChanged();
|
2989
|
-
message.speakers = object.speakers?.map((e) => SpeakerInfo.fromPartial(e)) || [];
|
2990
|
-
return message;
|
2991
|
-
},
|
2992
|
-
};
|
2993
|
-
|
2994
|
-
function createBaseRoomUpdate(): RoomUpdate {
|
2995
|
-
return { room: undefined };
|
2996
|
-
}
|
2997
|
-
|
2998
|
-
export const RoomUpdate = {
|
2999
|
-
encode(message: RoomUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
3000
|
-
if (message.room !== undefined) {
|
3001
|
-
Room.encode(message.room, writer.uint32(10).fork()).ldelim();
|
3002
|
-
}
|
3003
|
-
return writer;
|
3004
|
-
},
|
3005
|
-
|
3006
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): RoomUpdate {
|
3007
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
3008
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
3009
|
-
const message = createBaseRoomUpdate();
|
3010
|
-
while (reader.pos < end) {
|
3011
|
-
const tag = reader.uint32();
|
3012
|
-
switch (tag >>> 3) {
|
3013
|
-
case 1:
|
3014
|
-
if (tag !== 10) {
|
3015
|
-
break;
|
3016
|
-
}
|
3017
|
-
|
3018
|
-
message.room = Room.decode(reader, reader.uint32());
|
3019
|
-
continue;
|
3020
|
-
}
|
3021
|
-
if ((tag & 7) === 4 || tag === 0) {
|
3022
|
-
break;
|
3023
|
-
}
|
3024
|
-
reader.skipType(tag & 7);
|
3025
|
-
}
|
3026
|
-
return message;
|
3027
|
-
},
|
3028
|
-
|
3029
|
-
fromJSON(object: any): RoomUpdate {
|
3030
|
-
return { room: isSet(object.room) ? Room.fromJSON(object.room) : undefined };
|
3031
|
-
},
|
3032
|
-
|
3033
|
-
toJSON(message: RoomUpdate): unknown {
|
3034
|
-
const obj: any = {};
|
3035
|
-
message.room !== undefined && (obj.room = message.room ? Room.toJSON(message.room) : undefined);
|
3036
|
-
return obj;
|
3037
|
-
},
|
3038
|
-
|
3039
|
-
create<I extends Exact<DeepPartial<RoomUpdate>, I>>(base?: I): RoomUpdate {
|
3040
|
-
return RoomUpdate.fromPartial(base ?? {});
|
3041
|
-
},
|
3042
|
-
|
3043
|
-
fromPartial<I extends Exact<DeepPartial<RoomUpdate>, I>>(object: I): RoomUpdate {
|
3044
|
-
const message = createBaseRoomUpdate();
|
3045
|
-
message.room = (object.room !== undefined && object.room !== null) ? Room.fromPartial(object.room) : undefined;
|
3046
|
-
return message;
|
3047
|
-
},
|
3048
|
-
};
|
3049
|
-
|
3050
|
-
function createBaseConnectionQualityInfo(): ConnectionQualityInfo {
|
3051
|
-
return { participantSid: "", quality: 0, score: 0 };
|
3052
|
-
}
|
3053
|
-
|
3054
|
-
export const ConnectionQualityInfo = {
|
3055
|
-
encode(message: ConnectionQualityInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
3056
|
-
if (message.participantSid !== "") {
|
3057
|
-
writer.uint32(10).string(message.participantSid);
|
3058
|
-
}
|
3059
|
-
if (message.quality !== 0) {
|
3060
|
-
writer.uint32(16).int32(message.quality);
|
3061
|
-
}
|
3062
|
-
if (message.score !== 0) {
|
3063
|
-
writer.uint32(29).float(message.score);
|
3064
|
-
}
|
3065
|
-
return writer;
|
3066
|
-
},
|
3067
|
-
|
3068
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): ConnectionQualityInfo {
|
3069
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
3070
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
3071
|
-
const message = createBaseConnectionQualityInfo();
|
3072
|
-
while (reader.pos < end) {
|
3073
|
-
const tag = reader.uint32();
|
3074
|
-
switch (tag >>> 3) {
|
3075
|
-
case 1:
|
3076
|
-
if (tag !== 10) {
|
3077
|
-
break;
|
3078
|
-
}
|
3079
|
-
|
3080
|
-
message.participantSid = reader.string();
|
3081
|
-
continue;
|
3082
|
-
case 2:
|
3083
|
-
if (tag !== 16) {
|
3084
|
-
break;
|
3085
|
-
}
|
3086
|
-
|
3087
|
-
message.quality = reader.int32() as any;
|
3088
|
-
continue;
|
3089
|
-
case 3:
|
3090
|
-
if (tag !== 29) {
|
3091
|
-
break;
|
3092
|
-
}
|
3093
|
-
|
3094
|
-
message.score = reader.float();
|
3095
|
-
continue;
|
3096
|
-
}
|
3097
|
-
if ((tag & 7) === 4 || tag === 0) {
|
3098
|
-
break;
|
3099
|
-
}
|
3100
|
-
reader.skipType(tag & 7);
|
3101
|
-
}
|
3102
|
-
return message;
|
3103
|
-
},
|
3104
|
-
|
3105
|
-
fromJSON(object: any): ConnectionQualityInfo {
|
3106
|
-
return {
|
3107
|
-
participantSid: isSet(object.participantSid) ? String(object.participantSid) : "",
|
3108
|
-
quality: isSet(object.quality) ? connectionQualityFromJSON(object.quality) : 0,
|
3109
|
-
score: isSet(object.score) ? Number(object.score) : 0,
|
3110
|
-
};
|
3111
|
-
},
|
3112
|
-
|
3113
|
-
toJSON(message: ConnectionQualityInfo): unknown {
|
3114
|
-
const obj: any = {};
|
3115
|
-
message.participantSid !== undefined && (obj.participantSid = message.participantSid);
|
3116
|
-
message.quality !== undefined && (obj.quality = connectionQualityToJSON(message.quality));
|
3117
|
-
message.score !== undefined && (obj.score = message.score);
|
3118
|
-
return obj;
|
3119
|
-
},
|
3120
|
-
|
3121
|
-
create<I extends Exact<DeepPartial<ConnectionQualityInfo>, I>>(base?: I): ConnectionQualityInfo {
|
3122
|
-
return ConnectionQualityInfo.fromPartial(base ?? {});
|
3123
|
-
},
|
3124
|
-
|
3125
|
-
fromPartial<I extends Exact<DeepPartial<ConnectionQualityInfo>, I>>(object: I): ConnectionQualityInfo {
|
3126
|
-
const message = createBaseConnectionQualityInfo();
|
3127
|
-
message.participantSid = object.participantSid ?? "";
|
3128
|
-
message.quality = object.quality ?? 0;
|
3129
|
-
message.score = object.score ?? 0;
|
3130
|
-
return message;
|
3131
|
-
},
|
3132
|
-
};
|
3133
|
-
|
3134
|
-
function createBaseConnectionQualityUpdate(): ConnectionQualityUpdate {
|
3135
|
-
return { updates: [] };
|
3136
|
-
}
|
3137
|
-
|
3138
|
-
export const ConnectionQualityUpdate = {
|
3139
|
-
encode(message: ConnectionQualityUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
3140
|
-
for (const v of message.updates) {
|
3141
|
-
ConnectionQualityInfo.encode(v!, writer.uint32(10).fork()).ldelim();
|
3142
|
-
}
|
3143
|
-
return writer;
|
3144
|
-
},
|
3145
|
-
|
3146
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): ConnectionQualityUpdate {
|
3147
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
3148
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
3149
|
-
const message = createBaseConnectionQualityUpdate();
|
3150
|
-
while (reader.pos < end) {
|
3151
|
-
const tag = reader.uint32();
|
3152
|
-
switch (tag >>> 3) {
|
3153
|
-
case 1:
|
3154
|
-
if (tag !== 10) {
|
3155
|
-
break;
|
3156
|
-
}
|
3157
|
-
|
3158
|
-
message.updates.push(ConnectionQualityInfo.decode(reader, reader.uint32()));
|
3159
|
-
continue;
|
3160
|
-
}
|
3161
|
-
if ((tag & 7) === 4 || tag === 0) {
|
3162
|
-
break;
|
3163
|
-
}
|
3164
|
-
reader.skipType(tag & 7);
|
3165
|
-
}
|
3166
|
-
return message;
|
3167
|
-
},
|
3168
|
-
|
3169
|
-
fromJSON(object: any): ConnectionQualityUpdate {
|
3170
|
-
return {
|
3171
|
-
updates: Array.isArray(object?.updates) ? object.updates.map((e: any) => ConnectionQualityInfo.fromJSON(e)) : [],
|
3172
|
-
};
|
3173
|
-
},
|
3174
|
-
|
3175
|
-
toJSON(message: ConnectionQualityUpdate): unknown {
|
3176
|
-
const obj: any = {};
|
3177
|
-
if (message.updates) {
|
3178
|
-
obj.updates = message.updates.map((e) => e ? ConnectionQualityInfo.toJSON(e) : undefined);
|
3179
|
-
} else {
|
3180
|
-
obj.updates = [];
|
3181
|
-
}
|
3182
|
-
return obj;
|
3183
|
-
},
|
3184
|
-
|
3185
|
-
create<I extends Exact<DeepPartial<ConnectionQualityUpdate>, I>>(base?: I): ConnectionQualityUpdate {
|
3186
|
-
return ConnectionQualityUpdate.fromPartial(base ?? {});
|
3187
|
-
},
|
3188
|
-
|
3189
|
-
fromPartial<I extends Exact<DeepPartial<ConnectionQualityUpdate>, I>>(object: I): ConnectionQualityUpdate {
|
3190
|
-
const message = createBaseConnectionQualityUpdate();
|
3191
|
-
message.updates = object.updates?.map((e) => ConnectionQualityInfo.fromPartial(e)) || [];
|
3192
|
-
return message;
|
3193
|
-
},
|
3194
|
-
};
|
3195
|
-
|
3196
|
-
function createBaseStreamStateInfo(): StreamStateInfo {
|
3197
|
-
return { participantSid: "", trackSid: "", state: 0 };
|
3198
|
-
}
|
3199
|
-
|
3200
|
-
export const StreamStateInfo = {
|
3201
|
-
encode(message: StreamStateInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
3202
|
-
if (message.participantSid !== "") {
|
3203
|
-
writer.uint32(10).string(message.participantSid);
|
3204
|
-
}
|
3205
|
-
if (message.trackSid !== "") {
|
3206
|
-
writer.uint32(18).string(message.trackSid);
|
3207
|
-
}
|
3208
|
-
if (message.state !== 0) {
|
3209
|
-
writer.uint32(24).int32(message.state);
|
3210
|
-
}
|
3211
|
-
return writer;
|
3212
|
-
},
|
3213
|
-
|
3214
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): StreamStateInfo {
|
3215
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
3216
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
3217
|
-
const message = createBaseStreamStateInfo();
|
3218
|
-
while (reader.pos < end) {
|
3219
|
-
const tag = reader.uint32();
|
3220
|
-
switch (tag >>> 3) {
|
3221
|
-
case 1:
|
3222
|
-
if (tag !== 10) {
|
3223
|
-
break;
|
3224
|
-
}
|
3225
|
-
|
3226
|
-
message.participantSid = reader.string();
|
3227
|
-
continue;
|
3228
|
-
case 2:
|
3229
|
-
if (tag !== 18) {
|
3230
|
-
break;
|
3231
|
-
}
|
3232
|
-
|
3233
|
-
message.trackSid = reader.string();
|
3234
|
-
continue;
|
3235
|
-
case 3:
|
3236
|
-
if (tag !== 24) {
|
3237
|
-
break;
|
3238
|
-
}
|
3239
|
-
|
3240
|
-
message.state = reader.int32() as any;
|
3241
|
-
continue;
|
3242
|
-
}
|
3243
|
-
if ((tag & 7) === 4 || tag === 0) {
|
3244
|
-
break;
|
3245
|
-
}
|
3246
|
-
reader.skipType(tag & 7);
|
3247
|
-
}
|
3248
|
-
return message;
|
3249
|
-
},
|
3250
|
-
|
3251
|
-
fromJSON(object: any): StreamStateInfo {
|
3252
|
-
return {
|
3253
|
-
participantSid: isSet(object.participantSid) ? String(object.participantSid) : "",
|
3254
|
-
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
3255
|
-
state: isSet(object.state) ? streamStateFromJSON(object.state) : 0,
|
3256
|
-
};
|
3257
|
-
},
|
3258
|
-
|
3259
|
-
toJSON(message: StreamStateInfo): unknown {
|
3260
|
-
const obj: any = {};
|
3261
|
-
message.participantSid !== undefined && (obj.participantSid = message.participantSid);
|
3262
|
-
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
3263
|
-
message.state !== undefined && (obj.state = streamStateToJSON(message.state));
|
3264
|
-
return obj;
|
3265
|
-
},
|
3266
|
-
|
3267
|
-
create<I extends Exact<DeepPartial<StreamStateInfo>, I>>(base?: I): StreamStateInfo {
|
3268
|
-
return StreamStateInfo.fromPartial(base ?? {});
|
3269
|
-
},
|
3270
|
-
|
3271
|
-
fromPartial<I extends Exact<DeepPartial<StreamStateInfo>, I>>(object: I): StreamStateInfo {
|
3272
|
-
const message = createBaseStreamStateInfo();
|
3273
|
-
message.participantSid = object.participantSid ?? "";
|
3274
|
-
message.trackSid = object.trackSid ?? "";
|
3275
|
-
message.state = object.state ?? 0;
|
3276
|
-
return message;
|
3277
|
-
},
|
3278
|
-
};
|
3279
|
-
|
3280
|
-
function createBaseStreamStateUpdate(): StreamStateUpdate {
|
3281
|
-
return { streamStates: [] };
|
3282
|
-
}
|
3283
|
-
|
3284
|
-
export const StreamStateUpdate = {
|
3285
|
-
encode(message: StreamStateUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
3286
|
-
for (const v of message.streamStates) {
|
3287
|
-
StreamStateInfo.encode(v!, writer.uint32(10).fork()).ldelim();
|
3288
|
-
}
|
3289
|
-
return writer;
|
3290
|
-
},
|
3291
|
-
|
3292
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): StreamStateUpdate {
|
3293
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
3294
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
3295
|
-
const message = createBaseStreamStateUpdate();
|
3296
|
-
while (reader.pos < end) {
|
3297
|
-
const tag = reader.uint32();
|
3298
|
-
switch (tag >>> 3) {
|
3299
|
-
case 1:
|
3300
|
-
if (tag !== 10) {
|
3301
|
-
break;
|
3302
|
-
}
|
3303
|
-
|
3304
|
-
message.streamStates.push(StreamStateInfo.decode(reader, reader.uint32()));
|
3305
|
-
continue;
|
3306
|
-
}
|
3307
|
-
if ((tag & 7) === 4 || tag === 0) {
|
3308
|
-
break;
|
3309
|
-
}
|
3310
|
-
reader.skipType(tag & 7);
|
3311
|
-
}
|
3312
|
-
return message;
|
3313
|
-
},
|
3314
|
-
|
3315
|
-
fromJSON(object: any): StreamStateUpdate {
|
3316
|
-
return {
|
3317
|
-
streamStates: Array.isArray(object?.streamStates)
|
3318
|
-
? object.streamStates.map((e: any) => StreamStateInfo.fromJSON(e))
|
3319
|
-
: [],
|
3320
|
-
};
|
3321
|
-
},
|
3322
|
-
|
3323
|
-
toJSON(message: StreamStateUpdate): unknown {
|
3324
|
-
const obj: any = {};
|
3325
|
-
if (message.streamStates) {
|
3326
|
-
obj.streamStates = message.streamStates.map((e) => e ? StreamStateInfo.toJSON(e) : undefined);
|
3327
|
-
} else {
|
3328
|
-
obj.streamStates = [];
|
3329
|
-
}
|
3330
|
-
return obj;
|
3331
|
-
},
|
3332
|
-
|
3333
|
-
create<I extends Exact<DeepPartial<StreamStateUpdate>, I>>(base?: I): StreamStateUpdate {
|
3334
|
-
return StreamStateUpdate.fromPartial(base ?? {});
|
3335
|
-
},
|
3336
|
-
|
3337
|
-
fromPartial<I extends Exact<DeepPartial<StreamStateUpdate>, I>>(object: I): StreamStateUpdate {
|
3338
|
-
const message = createBaseStreamStateUpdate();
|
3339
|
-
message.streamStates = object.streamStates?.map((e) => StreamStateInfo.fromPartial(e)) || [];
|
3340
|
-
return message;
|
3341
|
-
},
|
3342
|
-
};
|
3343
|
-
|
3344
|
-
function createBaseSubscribedQuality(): SubscribedQuality {
|
3345
|
-
return { quality: 0, enabled: false };
|
3346
|
-
}
|
3347
|
-
|
3348
|
-
export const SubscribedQuality = {
|
3349
|
-
encode(message: SubscribedQuality, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
3350
|
-
if (message.quality !== 0) {
|
3351
|
-
writer.uint32(8).int32(message.quality);
|
3352
|
-
}
|
3353
|
-
if (message.enabled === true) {
|
3354
|
-
writer.uint32(16).bool(message.enabled);
|
3355
|
-
}
|
3356
|
-
return writer;
|
3357
|
-
},
|
3358
|
-
|
3359
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SubscribedQuality {
|
3360
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
3361
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
3362
|
-
const message = createBaseSubscribedQuality();
|
3363
|
-
while (reader.pos < end) {
|
3364
|
-
const tag = reader.uint32();
|
3365
|
-
switch (tag >>> 3) {
|
3366
|
-
case 1:
|
3367
|
-
if (tag !== 8) {
|
3368
|
-
break;
|
3369
|
-
}
|
3370
|
-
|
3371
|
-
message.quality = reader.int32() as any;
|
3372
|
-
continue;
|
3373
|
-
case 2:
|
3374
|
-
if (tag !== 16) {
|
3375
|
-
break;
|
3376
|
-
}
|
3377
|
-
|
3378
|
-
message.enabled = reader.bool();
|
3379
|
-
continue;
|
3380
|
-
}
|
3381
|
-
if ((tag & 7) === 4 || tag === 0) {
|
3382
|
-
break;
|
3383
|
-
}
|
3384
|
-
reader.skipType(tag & 7);
|
3385
|
-
}
|
3386
|
-
return message;
|
3387
|
-
},
|
3388
|
-
|
3389
|
-
fromJSON(object: any): SubscribedQuality {
|
3390
|
-
return {
|
3391
|
-
quality: isSet(object.quality) ? videoQualityFromJSON(object.quality) : 0,
|
3392
|
-
enabled: isSet(object.enabled) ? Boolean(object.enabled) : false,
|
3393
|
-
};
|
3394
|
-
},
|
3395
|
-
|
3396
|
-
toJSON(message: SubscribedQuality): unknown {
|
3397
|
-
const obj: any = {};
|
3398
|
-
message.quality !== undefined && (obj.quality = videoQualityToJSON(message.quality));
|
3399
|
-
message.enabled !== undefined && (obj.enabled = message.enabled);
|
3400
|
-
return obj;
|
3401
|
-
},
|
3402
|
-
|
3403
|
-
create<I extends Exact<DeepPartial<SubscribedQuality>, I>>(base?: I): SubscribedQuality {
|
3404
|
-
return SubscribedQuality.fromPartial(base ?? {});
|
3405
|
-
},
|
3406
|
-
|
3407
|
-
fromPartial<I extends Exact<DeepPartial<SubscribedQuality>, I>>(object: I): SubscribedQuality {
|
3408
|
-
const message = createBaseSubscribedQuality();
|
3409
|
-
message.quality = object.quality ?? 0;
|
3410
|
-
message.enabled = object.enabled ?? false;
|
3411
|
-
return message;
|
3412
|
-
},
|
3413
|
-
};
|
3414
|
-
|
3415
|
-
function createBaseSubscribedCodec(): SubscribedCodec {
|
3416
|
-
return { codec: "", qualities: [] };
|
3417
|
-
}
|
3418
|
-
|
3419
|
-
export const SubscribedCodec = {
|
3420
|
-
encode(message: SubscribedCodec, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
3421
|
-
if (message.codec !== "") {
|
3422
|
-
writer.uint32(10).string(message.codec);
|
3423
|
-
}
|
3424
|
-
for (const v of message.qualities) {
|
3425
|
-
SubscribedQuality.encode(v!, writer.uint32(18).fork()).ldelim();
|
3426
|
-
}
|
3427
|
-
return writer;
|
3428
|
-
},
|
3429
|
-
|
3430
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SubscribedCodec {
|
3431
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
3432
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
3433
|
-
const message = createBaseSubscribedCodec();
|
3434
|
-
while (reader.pos < end) {
|
3435
|
-
const tag = reader.uint32();
|
3436
|
-
switch (tag >>> 3) {
|
3437
|
-
case 1:
|
3438
|
-
if (tag !== 10) {
|
3439
|
-
break;
|
3440
|
-
}
|
3441
|
-
|
3442
|
-
message.codec = reader.string();
|
3443
|
-
continue;
|
3444
|
-
case 2:
|
3445
|
-
if (tag !== 18) {
|
3446
|
-
break;
|
3447
|
-
}
|
3448
|
-
|
3449
|
-
message.qualities.push(SubscribedQuality.decode(reader, reader.uint32()));
|
3450
|
-
continue;
|
3451
|
-
}
|
3452
|
-
if ((tag & 7) === 4 || tag === 0) {
|
3453
|
-
break;
|
3454
|
-
}
|
3455
|
-
reader.skipType(tag & 7);
|
3456
|
-
}
|
3457
|
-
return message;
|
3458
|
-
},
|
3459
|
-
|
3460
|
-
fromJSON(object: any): SubscribedCodec {
|
3461
|
-
return {
|
3462
|
-
codec: isSet(object.codec) ? String(object.codec) : "",
|
3463
|
-
qualities: Array.isArray(object?.qualities)
|
3464
|
-
? object.qualities.map((e: any) => SubscribedQuality.fromJSON(e))
|
3465
|
-
: [],
|
3466
|
-
};
|
3467
|
-
},
|
3468
|
-
|
3469
|
-
toJSON(message: SubscribedCodec): unknown {
|
3470
|
-
const obj: any = {};
|
3471
|
-
message.codec !== undefined && (obj.codec = message.codec);
|
3472
|
-
if (message.qualities) {
|
3473
|
-
obj.qualities = message.qualities.map((e) => e ? SubscribedQuality.toJSON(e) : undefined);
|
3474
|
-
} else {
|
3475
|
-
obj.qualities = [];
|
3476
|
-
}
|
3477
|
-
return obj;
|
3478
|
-
},
|
3479
|
-
|
3480
|
-
create<I extends Exact<DeepPartial<SubscribedCodec>, I>>(base?: I): SubscribedCodec {
|
3481
|
-
return SubscribedCodec.fromPartial(base ?? {});
|
3482
|
-
},
|
3483
|
-
|
3484
|
-
fromPartial<I extends Exact<DeepPartial<SubscribedCodec>, I>>(object: I): SubscribedCodec {
|
3485
|
-
const message = createBaseSubscribedCodec();
|
3486
|
-
message.codec = object.codec ?? "";
|
3487
|
-
message.qualities = object.qualities?.map((e) => SubscribedQuality.fromPartial(e)) || [];
|
3488
|
-
return message;
|
3489
|
-
},
|
3490
|
-
};
|
3491
|
-
|
3492
|
-
function createBaseSubscribedQualityUpdate(): SubscribedQualityUpdate {
|
3493
|
-
return { trackSid: "", subscribedQualities: [], subscribedCodecs: [] };
|
3494
|
-
}
|
3495
|
-
|
3496
|
-
export const SubscribedQualityUpdate = {
|
3497
|
-
encode(message: SubscribedQualityUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
3498
|
-
if (message.trackSid !== "") {
|
3499
|
-
writer.uint32(10).string(message.trackSid);
|
3500
|
-
}
|
3501
|
-
for (const v of message.subscribedQualities) {
|
3502
|
-
SubscribedQuality.encode(v!, writer.uint32(18).fork()).ldelim();
|
3503
|
-
}
|
3504
|
-
for (const v of message.subscribedCodecs) {
|
3505
|
-
SubscribedCodec.encode(v!, writer.uint32(26).fork()).ldelim();
|
3506
|
-
}
|
3507
|
-
return writer;
|
3508
|
-
},
|
3509
|
-
|
3510
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SubscribedQualityUpdate {
|
3511
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
3512
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
3513
|
-
const message = createBaseSubscribedQualityUpdate();
|
3514
|
-
while (reader.pos < end) {
|
3515
|
-
const tag = reader.uint32();
|
3516
|
-
switch (tag >>> 3) {
|
3517
|
-
case 1:
|
3518
|
-
if (tag !== 10) {
|
3519
|
-
break;
|
3520
|
-
}
|
3521
|
-
|
3522
|
-
message.trackSid = reader.string();
|
3523
|
-
continue;
|
3524
|
-
case 2:
|
3525
|
-
if (tag !== 18) {
|
3526
|
-
break;
|
3527
|
-
}
|
3528
|
-
|
3529
|
-
message.subscribedQualities.push(SubscribedQuality.decode(reader, reader.uint32()));
|
3530
|
-
continue;
|
3531
|
-
case 3:
|
3532
|
-
if (tag !== 26) {
|
3533
|
-
break;
|
3534
|
-
}
|
3535
|
-
|
3536
|
-
message.subscribedCodecs.push(SubscribedCodec.decode(reader, reader.uint32()));
|
3537
|
-
continue;
|
3538
|
-
}
|
3539
|
-
if ((tag & 7) === 4 || tag === 0) {
|
3540
|
-
break;
|
3541
|
-
}
|
3542
|
-
reader.skipType(tag & 7);
|
3543
|
-
}
|
3544
|
-
return message;
|
3545
|
-
},
|
3546
|
-
|
3547
|
-
fromJSON(object: any): SubscribedQualityUpdate {
|
3548
|
-
return {
|
3549
|
-
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
3550
|
-
subscribedQualities: Array.isArray(object?.subscribedQualities)
|
3551
|
-
? object.subscribedQualities.map((e: any) => SubscribedQuality.fromJSON(e))
|
3552
|
-
: [],
|
3553
|
-
subscribedCodecs: Array.isArray(object?.subscribedCodecs)
|
3554
|
-
? object.subscribedCodecs.map((e: any) => SubscribedCodec.fromJSON(e))
|
3555
|
-
: [],
|
3556
|
-
};
|
3557
|
-
},
|
3558
|
-
|
3559
|
-
toJSON(message: SubscribedQualityUpdate): unknown {
|
3560
|
-
const obj: any = {};
|
3561
|
-
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
3562
|
-
if (message.subscribedQualities) {
|
3563
|
-
obj.subscribedQualities = message.subscribedQualities.map((e) => e ? SubscribedQuality.toJSON(e) : undefined);
|
3564
|
-
} else {
|
3565
|
-
obj.subscribedQualities = [];
|
3566
|
-
}
|
3567
|
-
if (message.subscribedCodecs) {
|
3568
|
-
obj.subscribedCodecs = message.subscribedCodecs.map((e) => e ? SubscribedCodec.toJSON(e) : undefined);
|
3569
|
-
} else {
|
3570
|
-
obj.subscribedCodecs = [];
|
3571
|
-
}
|
3572
|
-
return obj;
|
3573
|
-
},
|
3574
|
-
|
3575
|
-
create<I extends Exact<DeepPartial<SubscribedQualityUpdate>, I>>(base?: I): SubscribedQualityUpdate {
|
3576
|
-
return SubscribedQualityUpdate.fromPartial(base ?? {});
|
3577
|
-
},
|
3578
|
-
|
3579
|
-
fromPartial<I extends Exact<DeepPartial<SubscribedQualityUpdate>, I>>(object: I): SubscribedQualityUpdate {
|
3580
|
-
const message = createBaseSubscribedQualityUpdate();
|
3581
|
-
message.trackSid = object.trackSid ?? "";
|
3582
|
-
message.subscribedQualities = object.subscribedQualities?.map((e) => SubscribedQuality.fromPartial(e)) || [];
|
3583
|
-
message.subscribedCodecs = object.subscribedCodecs?.map((e) => SubscribedCodec.fromPartial(e)) || [];
|
3584
|
-
return message;
|
3585
|
-
},
|
3586
|
-
};
|
3587
|
-
|
3588
|
-
function createBaseTrackPermission(): TrackPermission {
|
3589
|
-
return { participantSid: "", allTracks: false, trackSids: [], participantIdentity: "" };
|
3590
|
-
}
|
3591
|
-
|
3592
|
-
export const TrackPermission = {
|
3593
|
-
encode(message: TrackPermission, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
3594
|
-
if (message.participantSid !== "") {
|
3595
|
-
writer.uint32(10).string(message.participantSid);
|
3596
|
-
}
|
3597
|
-
if (message.allTracks === true) {
|
3598
|
-
writer.uint32(16).bool(message.allTracks);
|
3599
|
-
}
|
3600
|
-
for (const v of message.trackSids) {
|
3601
|
-
writer.uint32(26).string(v!);
|
3602
|
-
}
|
3603
|
-
if (message.participantIdentity !== "") {
|
3604
|
-
writer.uint32(34).string(message.participantIdentity);
|
3605
|
-
}
|
3606
|
-
return writer;
|
3607
|
-
},
|
3608
|
-
|
3609
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): TrackPermission {
|
3610
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
3611
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
3612
|
-
const message = createBaseTrackPermission();
|
3613
|
-
while (reader.pos < end) {
|
3614
|
-
const tag = reader.uint32();
|
3615
|
-
switch (tag >>> 3) {
|
3616
|
-
case 1:
|
3617
|
-
if (tag !== 10) {
|
3618
|
-
break;
|
3619
|
-
}
|
3620
|
-
|
3621
|
-
message.participantSid = reader.string();
|
3622
|
-
continue;
|
3623
|
-
case 2:
|
3624
|
-
if (tag !== 16) {
|
3625
|
-
break;
|
3626
|
-
}
|
3627
|
-
|
3628
|
-
message.allTracks = reader.bool();
|
3629
|
-
continue;
|
3630
|
-
case 3:
|
3631
|
-
if (tag !== 26) {
|
3632
|
-
break;
|
3633
|
-
}
|
3634
|
-
|
3635
|
-
message.trackSids.push(reader.string());
|
3636
|
-
continue;
|
3637
|
-
case 4:
|
3638
|
-
if (tag !== 34) {
|
3639
|
-
break;
|
3640
|
-
}
|
3641
|
-
|
3642
|
-
message.participantIdentity = reader.string();
|
3643
|
-
continue;
|
3644
|
-
}
|
3645
|
-
if ((tag & 7) === 4 || tag === 0) {
|
3646
|
-
break;
|
3647
|
-
}
|
3648
|
-
reader.skipType(tag & 7);
|
3649
|
-
}
|
3650
|
-
return message;
|
3651
|
-
},
|
3652
|
-
|
3653
|
-
fromJSON(object: any): TrackPermission {
|
3654
|
-
return {
|
3655
|
-
participantSid: isSet(object.participantSid) ? String(object.participantSid) : "",
|
3656
|
-
allTracks: isSet(object.allTracks) ? Boolean(object.allTracks) : false,
|
3657
|
-
trackSids: Array.isArray(object?.trackSids) ? object.trackSids.map((e: any) => String(e)) : [],
|
3658
|
-
participantIdentity: isSet(object.participantIdentity) ? String(object.participantIdentity) : "",
|
3659
|
-
};
|
3660
|
-
},
|
3661
|
-
|
3662
|
-
toJSON(message: TrackPermission): unknown {
|
3663
|
-
const obj: any = {};
|
3664
|
-
message.participantSid !== undefined && (obj.participantSid = message.participantSid);
|
3665
|
-
message.allTracks !== undefined && (obj.allTracks = message.allTracks);
|
3666
|
-
if (message.trackSids) {
|
3667
|
-
obj.trackSids = message.trackSids.map((e) => e);
|
3668
|
-
} else {
|
3669
|
-
obj.trackSids = [];
|
3670
|
-
}
|
3671
|
-
message.participantIdentity !== undefined && (obj.participantIdentity = message.participantIdentity);
|
3672
|
-
return obj;
|
3673
|
-
},
|
3674
|
-
|
3675
|
-
create<I extends Exact<DeepPartial<TrackPermission>, I>>(base?: I): TrackPermission {
|
3676
|
-
return TrackPermission.fromPartial(base ?? {});
|
3677
|
-
},
|
3678
|
-
|
3679
|
-
fromPartial<I extends Exact<DeepPartial<TrackPermission>, I>>(object: I): TrackPermission {
|
3680
|
-
const message = createBaseTrackPermission();
|
3681
|
-
message.participantSid = object.participantSid ?? "";
|
3682
|
-
message.allTracks = object.allTracks ?? false;
|
3683
|
-
message.trackSids = object.trackSids?.map((e) => e) || [];
|
3684
|
-
message.participantIdentity = object.participantIdentity ?? "";
|
3685
|
-
return message;
|
3686
|
-
},
|
3687
|
-
};
|
3688
|
-
|
3689
|
-
function createBaseSubscriptionPermission(): SubscriptionPermission {
|
3690
|
-
return { allParticipants: false, trackPermissions: [] };
|
3691
|
-
}
|
3692
|
-
|
3693
|
-
export const SubscriptionPermission = {
|
3694
|
-
encode(message: SubscriptionPermission, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
3695
|
-
if (message.allParticipants === true) {
|
3696
|
-
writer.uint32(8).bool(message.allParticipants);
|
3697
|
-
}
|
3698
|
-
for (const v of message.trackPermissions) {
|
3699
|
-
TrackPermission.encode(v!, writer.uint32(18).fork()).ldelim();
|
3700
|
-
}
|
3701
|
-
return writer;
|
3702
|
-
},
|
3703
|
-
|
3704
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SubscriptionPermission {
|
3705
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
3706
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
3707
|
-
const message = createBaseSubscriptionPermission();
|
3708
|
-
while (reader.pos < end) {
|
3709
|
-
const tag = reader.uint32();
|
3710
|
-
switch (tag >>> 3) {
|
3711
|
-
case 1:
|
3712
|
-
if (tag !== 8) {
|
3713
|
-
break;
|
3714
|
-
}
|
3715
|
-
|
3716
|
-
message.allParticipants = reader.bool();
|
3717
|
-
continue;
|
3718
|
-
case 2:
|
3719
|
-
if (tag !== 18) {
|
3720
|
-
break;
|
3721
|
-
}
|
3722
|
-
|
3723
|
-
message.trackPermissions.push(TrackPermission.decode(reader, reader.uint32()));
|
3724
|
-
continue;
|
3725
|
-
}
|
3726
|
-
if ((tag & 7) === 4 || tag === 0) {
|
3727
|
-
break;
|
3728
|
-
}
|
3729
|
-
reader.skipType(tag & 7);
|
3730
|
-
}
|
3731
|
-
return message;
|
3732
|
-
},
|
3733
|
-
|
3734
|
-
fromJSON(object: any): SubscriptionPermission {
|
3735
|
-
return {
|
3736
|
-
allParticipants: isSet(object.allParticipants) ? Boolean(object.allParticipants) : false,
|
3737
|
-
trackPermissions: Array.isArray(object?.trackPermissions)
|
3738
|
-
? object.trackPermissions.map((e: any) => TrackPermission.fromJSON(e))
|
3739
|
-
: [],
|
3740
|
-
};
|
3741
|
-
},
|
3742
|
-
|
3743
|
-
toJSON(message: SubscriptionPermission): unknown {
|
3744
|
-
const obj: any = {};
|
3745
|
-
message.allParticipants !== undefined && (obj.allParticipants = message.allParticipants);
|
3746
|
-
if (message.trackPermissions) {
|
3747
|
-
obj.trackPermissions = message.trackPermissions.map((e) => e ? TrackPermission.toJSON(e) : undefined);
|
3748
|
-
} else {
|
3749
|
-
obj.trackPermissions = [];
|
3750
|
-
}
|
3751
|
-
return obj;
|
3752
|
-
},
|
3753
|
-
|
3754
|
-
create<I extends Exact<DeepPartial<SubscriptionPermission>, I>>(base?: I): SubscriptionPermission {
|
3755
|
-
return SubscriptionPermission.fromPartial(base ?? {});
|
3756
|
-
},
|
3757
|
-
|
3758
|
-
fromPartial<I extends Exact<DeepPartial<SubscriptionPermission>, I>>(object: I): SubscriptionPermission {
|
3759
|
-
const message = createBaseSubscriptionPermission();
|
3760
|
-
message.allParticipants = object.allParticipants ?? false;
|
3761
|
-
message.trackPermissions = object.trackPermissions?.map((e) => TrackPermission.fromPartial(e)) || [];
|
3762
|
-
return message;
|
3763
|
-
},
|
3764
|
-
};
|
3765
|
-
|
3766
|
-
function createBaseSubscriptionPermissionUpdate(): SubscriptionPermissionUpdate {
|
3767
|
-
return { participantSid: "", trackSid: "", allowed: false };
|
3768
|
-
}
|
3769
|
-
|
3770
|
-
export const SubscriptionPermissionUpdate = {
|
3771
|
-
encode(message: SubscriptionPermissionUpdate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
3772
|
-
if (message.participantSid !== "") {
|
3773
|
-
writer.uint32(10).string(message.participantSid);
|
3774
|
-
}
|
3775
|
-
if (message.trackSid !== "") {
|
3776
|
-
writer.uint32(18).string(message.trackSid);
|
3777
|
-
}
|
3778
|
-
if (message.allowed === true) {
|
3779
|
-
writer.uint32(24).bool(message.allowed);
|
3780
|
-
}
|
3781
|
-
return writer;
|
3782
|
-
},
|
3783
|
-
|
3784
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SubscriptionPermissionUpdate {
|
3785
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
3786
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
3787
|
-
const message = createBaseSubscriptionPermissionUpdate();
|
3788
|
-
while (reader.pos < end) {
|
3789
|
-
const tag = reader.uint32();
|
3790
|
-
switch (tag >>> 3) {
|
3791
|
-
case 1:
|
3792
|
-
if (tag !== 10) {
|
3793
|
-
break;
|
3794
|
-
}
|
3795
|
-
|
3796
|
-
message.participantSid = reader.string();
|
3797
|
-
continue;
|
3798
|
-
case 2:
|
3799
|
-
if (tag !== 18) {
|
3800
|
-
break;
|
3801
|
-
}
|
3802
|
-
|
3803
|
-
message.trackSid = reader.string();
|
3804
|
-
continue;
|
3805
|
-
case 3:
|
3806
|
-
if (tag !== 24) {
|
3807
|
-
break;
|
3808
|
-
}
|
3809
|
-
|
3810
|
-
message.allowed = reader.bool();
|
3811
|
-
continue;
|
3812
|
-
}
|
3813
|
-
if ((tag & 7) === 4 || tag === 0) {
|
3814
|
-
break;
|
3815
|
-
}
|
3816
|
-
reader.skipType(tag & 7);
|
3817
|
-
}
|
3818
|
-
return message;
|
3819
|
-
},
|
3820
|
-
|
3821
|
-
fromJSON(object: any): SubscriptionPermissionUpdate {
|
3822
|
-
return {
|
3823
|
-
participantSid: isSet(object.participantSid) ? String(object.participantSid) : "",
|
3824
|
-
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
3825
|
-
allowed: isSet(object.allowed) ? Boolean(object.allowed) : false,
|
3826
|
-
};
|
3827
|
-
},
|
3828
|
-
|
3829
|
-
toJSON(message: SubscriptionPermissionUpdate): unknown {
|
3830
|
-
const obj: any = {};
|
3831
|
-
message.participantSid !== undefined && (obj.participantSid = message.participantSid);
|
3832
|
-
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
3833
|
-
message.allowed !== undefined && (obj.allowed = message.allowed);
|
3834
|
-
return obj;
|
3835
|
-
},
|
3836
|
-
|
3837
|
-
create<I extends Exact<DeepPartial<SubscriptionPermissionUpdate>, I>>(base?: I): SubscriptionPermissionUpdate {
|
3838
|
-
return SubscriptionPermissionUpdate.fromPartial(base ?? {});
|
3839
|
-
},
|
3840
|
-
|
3841
|
-
fromPartial<I extends Exact<DeepPartial<SubscriptionPermissionUpdate>, I>>(object: I): SubscriptionPermissionUpdate {
|
3842
|
-
const message = createBaseSubscriptionPermissionUpdate();
|
3843
|
-
message.participantSid = object.participantSid ?? "";
|
3844
|
-
message.trackSid = object.trackSid ?? "";
|
3845
|
-
message.allowed = object.allowed ?? false;
|
3846
|
-
return message;
|
3847
|
-
},
|
3848
|
-
};
|
3849
|
-
|
3850
|
-
function createBaseSyncState(): SyncState {
|
3851
|
-
return { answer: undefined, subscription: undefined, publishTracks: [], dataChannels: [], offer: undefined };
|
3852
|
-
}
|
3853
|
-
|
3854
|
-
export const SyncState = {
|
3855
|
-
encode(message: SyncState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
3856
|
-
if (message.answer !== undefined) {
|
3857
|
-
SessionDescription.encode(message.answer, writer.uint32(10).fork()).ldelim();
|
3858
|
-
}
|
3859
|
-
if (message.subscription !== undefined) {
|
3860
|
-
UpdateSubscription.encode(message.subscription, writer.uint32(18).fork()).ldelim();
|
3861
|
-
}
|
3862
|
-
for (const v of message.publishTracks) {
|
3863
|
-
TrackPublishedResponse.encode(v!, writer.uint32(26).fork()).ldelim();
|
3864
|
-
}
|
3865
|
-
for (const v of message.dataChannels) {
|
3866
|
-
DataChannelInfo.encode(v!, writer.uint32(34).fork()).ldelim();
|
3867
|
-
}
|
3868
|
-
if (message.offer !== undefined) {
|
3869
|
-
SessionDescription.encode(message.offer, writer.uint32(42).fork()).ldelim();
|
3870
|
-
}
|
3871
|
-
return writer;
|
3872
|
-
},
|
3873
|
-
|
3874
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SyncState {
|
3875
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
3876
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
3877
|
-
const message = createBaseSyncState();
|
3878
|
-
while (reader.pos < end) {
|
3879
|
-
const tag = reader.uint32();
|
3880
|
-
switch (tag >>> 3) {
|
3881
|
-
case 1:
|
3882
|
-
if (tag !== 10) {
|
3883
|
-
break;
|
3884
|
-
}
|
3885
|
-
|
3886
|
-
message.answer = SessionDescription.decode(reader, reader.uint32());
|
3887
|
-
continue;
|
3888
|
-
case 2:
|
3889
|
-
if (tag !== 18) {
|
3890
|
-
break;
|
3891
|
-
}
|
3892
|
-
|
3893
|
-
message.subscription = UpdateSubscription.decode(reader, reader.uint32());
|
3894
|
-
continue;
|
3895
|
-
case 3:
|
3896
|
-
if (tag !== 26) {
|
3897
|
-
break;
|
3898
|
-
}
|
3899
|
-
|
3900
|
-
message.publishTracks.push(TrackPublishedResponse.decode(reader, reader.uint32()));
|
3901
|
-
continue;
|
3902
|
-
case 4:
|
3903
|
-
if (tag !== 34) {
|
3904
|
-
break;
|
3905
|
-
}
|
3906
|
-
|
3907
|
-
message.dataChannels.push(DataChannelInfo.decode(reader, reader.uint32()));
|
3908
|
-
continue;
|
3909
|
-
case 5:
|
3910
|
-
if (tag !== 42) {
|
3911
|
-
break;
|
3912
|
-
}
|
3913
|
-
|
3914
|
-
message.offer = SessionDescription.decode(reader, reader.uint32());
|
3915
|
-
continue;
|
3916
|
-
}
|
3917
|
-
if ((tag & 7) === 4 || tag === 0) {
|
3918
|
-
break;
|
3919
|
-
}
|
3920
|
-
reader.skipType(tag & 7);
|
3921
|
-
}
|
3922
|
-
return message;
|
3923
|
-
},
|
3924
|
-
|
3925
|
-
fromJSON(object: any): SyncState {
|
3926
|
-
return {
|
3927
|
-
answer: isSet(object.answer) ? SessionDescription.fromJSON(object.answer) : undefined,
|
3928
|
-
subscription: isSet(object.subscription) ? UpdateSubscription.fromJSON(object.subscription) : undefined,
|
3929
|
-
publishTracks: Array.isArray(object?.publishTracks)
|
3930
|
-
? object.publishTracks.map((e: any) => TrackPublishedResponse.fromJSON(e))
|
3931
|
-
: [],
|
3932
|
-
dataChannels: Array.isArray(object?.dataChannels)
|
3933
|
-
? object.dataChannels.map((e: any) => DataChannelInfo.fromJSON(e))
|
3934
|
-
: [],
|
3935
|
-
offer: isSet(object.offer) ? SessionDescription.fromJSON(object.offer) : undefined,
|
3936
|
-
};
|
3937
|
-
},
|
3938
|
-
|
3939
|
-
toJSON(message: SyncState): unknown {
|
3940
|
-
const obj: any = {};
|
3941
|
-
message.answer !== undefined &&
|
3942
|
-
(obj.answer = message.answer ? SessionDescription.toJSON(message.answer) : undefined);
|
3943
|
-
message.subscription !== undefined &&
|
3944
|
-
(obj.subscription = message.subscription ? UpdateSubscription.toJSON(message.subscription) : undefined);
|
3945
|
-
if (message.publishTracks) {
|
3946
|
-
obj.publishTracks = message.publishTracks.map((e) => e ? TrackPublishedResponse.toJSON(e) : undefined);
|
3947
|
-
} else {
|
3948
|
-
obj.publishTracks = [];
|
3949
|
-
}
|
3950
|
-
if (message.dataChannels) {
|
3951
|
-
obj.dataChannels = message.dataChannels.map((e) => e ? DataChannelInfo.toJSON(e) : undefined);
|
3952
|
-
} else {
|
3953
|
-
obj.dataChannels = [];
|
3954
|
-
}
|
3955
|
-
message.offer !== undefined && (obj.offer = message.offer ? SessionDescription.toJSON(message.offer) : undefined);
|
3956
|
-
return obj;
|
3957
|
-
},
|
3958
|
-
|
3959
|
-
create<I extends Exact<DeepPartial<SyncState>, I>>(base?: I): SyncState {
|
3960
|
-
return SyncState.fromPartial(base ?? {});
|
3961
|
-
},
|
3962
|
-
|
3963
|
-
fromPartial<I extends Exact<DeepPartial<SyncState>, I>>(object: I): SyncState {
|
3964
|
-
const message = createBaseSyncState();
|
3965
|
-
message.answer = (object.answer !== undefined && object.answer !== null)
|
3966
|
-
? SessionDescription.fromPartial(object.answer)
|
3967
|
-
: undefined;
|
3968
|
-
message.subscription = (object.subscription !== undefined && object.subscription !== null)
|
3969
|
-
? UpdateSubscription.fromPartial(object.subscription)
|
3970
|
-
: undefined;
|
3971
|
-
message.publishTracks = object.publishTracks?.map((e) => TrackPublishedResponse.fromPartial(e)) || [];
|
3972
|
-
message.dataChannels = object.dataChannels?.map((e) => DataChannelInfo.fromPartial(e)) || [];
|
3973
|
-
message.offer = (object.offer !== undefined && object.offer !== null)
|
3974
|
-
? SessionDescription.fromPartial(object.offer)
|
3975
|
-
: undefined;
|
3976
|
-
return message;
|
3977
|
-
},
|
3978
|
-
};
|
3979
|
-
|
3980
|
-
function createBaseDataChannelInfo(): DataChannelInfo {
|
3981
|
-
return { label: "", id: 0, target: 0 };
|
3982
|
-
}
|
3983
|
-
|
3984
|
-
export const DataChannelInfo = {
|
3985
|
-
encode(message: DataChannelInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
3986
|
-
if (message.label !== "") {
|
3987
|
-
writer.uint32(10).string(message.label);
|
3988
|
-
}
|
3989
|
-
if (message.id !== 0) {
|
3990
|
-
writer.uint32(16).uint32(message.id);
|
3991
|
-
}
|
3992
|
-
if (message.target !== 0) {
|
3993
|
-
writer.uint32(24).int32(message.target);
|
3994
|
-
}
|
3995
|
-
return writer;
|
3996
|
-
},
|
3997
|
-
|
3998
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): DataChannelInfo {
|
3999
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
4000
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
4001
|
-
const message = createBaseDataChannelInfo();
|
4002
|
-
while (reader.pos < end) {
|
4003
|
-
const tag = reader.uint32();
|
4004
|
-
switch (tag >>> 3) {
|
4005
|
-
case 1:
|
4006
|
-
if (tag !== 10) {
|
4007
|
-
break;
|
4008
|
-
}
|
4009
|
-
|
4010
|
-
message.label = reader.string();
|
4011
|
-
continue;
|
4012
|
-
case 2:
|
4013
|
-
if (tag !== 16) {
|
4014
|
-
break;
|
4015
|
-
}
|
4016
|
-
|
4017
|
-
message.id = reader.uint32();
|
4018
|
-
continue;
|
4019
|
-
case 3:
|
4020
|
-
if (tag !== 24) {
|
4021
|
-
break;
|
4022
|
-
}
|
4023
|
-
|
4024
|
-
message.target = reader.int32() as any;
|
4025
|
-
continue;
|
4026
|
-
}
|
4027
|
-
if ((tag & 7) === 4 || tag === 0) {
|
4028
|
-
break;
|
4029
|
-
}
|
4030
|
-
reader.skipType(tag & 7);
|
4031
|
-
}
|
4032
|
-
return message;
|
4033
|
-
},
|
4034
|
-
|
4035
|
-
fromJSON(object: any): DataChannelInfo {
|
4036
|
-
return {
|
4037
|
-
label: isSet(object.label) ? String(object.label) : "",
|
4038
|
-
id: isSet(object.id) ? Number(object.id) : 0,
|
4039
|
-
target: isSet(object.target) ? signalTargetFromJSON(object.target) : 0,
|
4040
|
-
};
|
4041
|
-
},
|
4042
|
-
|
4043
|
-
toJSON(message: DataChannelInfo): unknown {
|
4044
|
-
const obj: any = {};
|
4045
|
-
message.label !== undefined && (obj.label = message.label);
|
4046
|
-
message.id !== undefined && (obj.id = Math.round(message.id));
|
4047
|
-
message.target !== undefined && (obj.target = signalTargetToJSON(message.target));
|
4048
|
-
return obj;
|
4049
|
-
},
|
4050
|
-
|
4051
|
-
create<I extends Exact<DeepPartial<DataChannelInfo>, I>>(base?: I): DataChannelInfo {
|
4052
|
-
return DataChannelInfo.fromPartial(base ?? {});
|
4053
|
-
},
|
4054
|
-
|
4055
|
-
fromPartial<I extends Exact<DeepPartial<DataChannelInfo>, I>>(object: I): DataChannelInfo {
|
4056
|
-
const message = createBaseDataChannelInfo();
|
4057
|
-
message.label = object.label ?? "";
|
4058
|
-
message.id = object.id ?? 0;
|
4059
|
-
message.target = object.target ?? 0;
|
4060
|
-
return message;
|
4061
|
-
},
|
4062
|
-
};
|
4063
|
-
|
4064
|
-
function createBaseSimulateScenario(): SimulateScenario {
|
4065
|
-
return { scenario: undefined };
|
4066
|
-
}
|
4067
|
-
|
4068
|
-
export const SimulateScenario = {
|
4069
|
-
encode(message: SimulateScenario, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
4070
|
-
switch (message.scenario?.$case) {
|
4071
|
-
case "speakerUpdate":
|
4072
|
-
writer.uint32(8).int32(message.scenario.speakerUpdate);
|
4073
|
-
break;
|
4074
|
-
case "nodeFailure":
|
4075
|
-
writer.uint32(16).bool(message.scenario.nodeFailure);
|
4076
|
-
break;
|
4077
|
-
case "migration":
|
4078
|
-
writer.uint32(24).bool(message.scenario.migration);
|
4079
|
-
break;
|
4080
|
-
case "serverLeave":
|
4081
|
-
writer.uint32(32).bool(message.scenario.serverLeave);
|
4082
|
-
break;
|
4083
|
-
case "switchCandidateProtocol":
|
4084
|
-
writer.uint32(40).int32(message.scenario.switchCandidateProtocol);
|
4085
|
-
break;
|
4086
|
-
case "subscriberBandwidth":
|
4087
|
-
writer.uint32(48).int64(message.scenario.subscriberBandwidth);
|
4088
|
-
break;
|
4089
|
-
}
|
4090
|
-
return writer;
|
4091
|
-
},
|
4092
|
-
|
4093
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SimulateScenario {
|
4094
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
4095
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
4096
|
-
const message = createBaseSimulateScenario();
|
4097
|
-
while (reader.pos < end) {
|
4098
|
-
const tag = reader.uint32();
|
4099
|
-
switch (tag >>> 3) {
|
4100
|
-
case 1:
|
4101
|
-
if (tag !== 8) {
|
4102
|
-
break;
|
4103
|
-
}
|
4104
|
-
|
4105
|
-
message.scenario = { $case: "speakerUpdate", speakerUpdate: reader.int32() };
|
4106
|
-
continue;
|
4107
|
-
case 2:
|
4108
|
-
if (tag !== 16) {
|
4109
|
-
break;
|
4110
|
-
}
|
4111
|
-
|
4112
|
-
message.scenario = { $case: "nodeFailure", nodeFailure: reader.bool() };
|
4113
|
-
continue;
|
4114
|
-
case 3:
|
4115
|
-
if (tag !== 24) {
|
4116
|
-
break;
|
4117
|
-
}
|
4118
|
-
|
4119
|
-
message.scenario = { $case: "migration", migration: reader.bool() };
|
4120
|
-
continue;
|
4121
|
-
case 4:
|
4122
|
-
if (tag !== 32) {
|
4123
|
-
break;
|
4124
|
-
}
|
4125
|
-
|
4126
|
-
message.scenario = { $case: "serverLeave", serverLeave: reader.bool() };
|
4127
|
-
continue;
|
4128
|
-
case 5:
|
4129
|
-
if (tag !== 40) {
|
4130
|
-
break;
|
4131
|
-
}
|
4132
|
-
|
4133
|
-
message.scenario = { $case: "switchCandidateProtocol", switchCandidateProtocol: reader.int32() as any };
|
4134
|
-
continue;
|
4135
|
-
case 6:
|
4136
|
-
if (tag !== 48) {
|
4137
|
-
break;
|
4138
|
-
}
|
4139
|
-
|
4140
|
-
message.scenario = {
|
4141
|
-
$case: "subscriberBandwidth",
|
4142
|
-
subscriberBandwidth: longToNumber(reader.int64() as Long),
|
4143
|
-
};
|
4144
|
-
continue;
|
4145
|
-
}
|
4146
|
-
if ((tag & 7) === 4 || tag === 0) {
|
4147
|
-
break;
|
4148
|
-
}
|
4149
|
-
reader.skipType(tag & 7);
|
4150
|
-
}
|
4151
|
-
return message;
|
4152
|
-
},
|
4153
|
-
|
4154
|
-
fromJSON(object: any): SimulateScenario {
|
4155
|
-
return {
|
4156
|
-
scenario: isSet(object.speakerUpdate)
|
4157
|
-
? { $case: "speakerUpdate", speakerUpdate: Number(object.speakerUpdate) }
|
4158
|
-
: isSet(object.nodeFailure)
|
4159
|
-
? { $case: "nodeFailure", nodeFailure: Boolean(object.nodeFailure) }
|
4160
|
-
: isSet(object.migration)
|
4161
|
-
? { $case: "migration", migration: Boolean(object.migration) }
|
4162
|
-
: isSet(object.serverLeave)
|
4163
|
-
? { $case: "serverLeave", serverLeave: Boolean(object.serverLeave) }
|
4164
|
-
: isSet(object.switchCandidateProtocol)
|
4165
|
-
? {
|
4166
|
-
$case: "switchCandidateProtocol",
|
4167
|
-
switchCandidateProtocol: candidateProtocolFromJSON(object.switchCandidateProtocol),
|
4168
|
-
}
|
4169
|
-
: isSet(object.subscriberBandwidth)
|
4170
|
-
? { $case: "subscriberBandwidth", subscriberBandwidth: Number(object.subscriberBandwidth) }
|
4171
|
-
: undefined,
|
4172
|
-
};
|
4173
|
-
},
|
4174
|
-
|
4175
|
-
toJSON(message: SimulateScenario): unknown {
|
4176
|
-
const obj: any = {};
|
4177
|
-
message.scenario?.$case === "speakerUpdate" && (obj.speakerUpdate = Math.round(message.scenario?.speakerUpdate));
|
4178
|
-
message.scenario?.$case === "nodeFailure" && (obj.nodeFailure = message.scenario?.nodeFailure);
|
4179
|
-
message.scenario?.$case === "migration" && (obj.migration = message.scenario?.migration);
|
4180
|
-
message.scenario?.$case === "serverLeave" && (obj.serverLeave = message.scenario?.serverLeave);
|
4181
|
-
message.scenario?.$case === "switchCandidateProtocol" &&
|
4182
|
-
(obj.switchCandidateProtocol = message.scenario?.switchCandidateProtocol !== undefined
|
4183
|
-
? candidateProtocolToJSON(message.scenario?.switchCandidateProtocol)
|
4184
|
-
: undefined);
|
4185
|
-
message.scenario?.$case === "subscriberBandwidth" &&
|
4186
|
-
(obj.subscriberBandwidth = Math.round(message.scenario?.subscriberBandwidth));
|
4187
|
-
return obj;
|
4188
|
-
},
|
4189
|
-
|
4190
|
-
create<I extends Exact<DeepPartial<SimulateScenario>, I>>(base?: I): SimulateScenario {
|
4191
|
-
return SimulateScenario.fromPartial(base ?? {});
|
4192
|
-
},
|
4193
|
-
|
4194
|
-
fromPartial<I extends Exact<DeepPartial<SimulateScenario>, I>>(object: I): SimulateScenario {
|
4195
|
-
const message = createBaseSimulateScenario();
|
4196
|
-
if (
|
4197
|
-
object.scenario?.$case === "speakerUpdate" &&
|
4198
|
-
object.scenario?.speakerUpdate !== undefined &&
|
4199
|
-
object.scenario?.speakerUpdate !== null
|
4200
|
-
) {
|
4201
|
-
message.scenario = { $case: "speakerUpdate", speakerUpdate: object.scenario.speakerUpdate };
|
4202
|
-
}
|
4203
|
-
if (
|
4204
|
-
object.scenario?.$case === "nodeFailure" &&
|
4205
|
-
object.scenario?.nodeFailure !== undefined &&
|
4206
|
-
object.scenario?.nodeFailure !== null
|
4207
|
-
) {
|
4208
|
-
message.scenario = { $case: "nodeFailure", nodeFailure: object.scenario.nodeFailure };
|
4209
|
-
}
|
4210
|
-
if (
|
4211
|
-
object.scenario?.$case === "migration" &&
|
4212
|
-
object.scenario?.migration !== undefined &&
|
4213
|
-
object.scenario?.migration !== null
|
4214
|
-
) {
|
4215
|
-
message.scenario = { $case: "migration", migration: object.scenario.migration };
|
4216
|
-
}
|
4217
|
-
if (
|
4218
|
-
object.scenario?.$case === "serverLeave" &&
|
4219
|
-
object.scenario?.serverLeave !== undefined &&
|
4220
|
-
object.scenario?.serverLeave !== null
|
4221
|
-
) {
|
4222
|
-
message.scenario = { $case: "serverLeave", serverLeave: object.scenario.serverLeave };
|
4223
|
-
}
|
4224
|
-
if (
|
4225
|
-
object.scenario?.$case === "switchCandidateProtocol" &&
|
4226
|
-
object.scenario?.switchCandidateProtocol !== undefined &&
|
4227
|
-
object.scenario?.switchCandidateProtocol !== null
|
4228
|
-
) {
|
4229
|
-
message.scenario = {
|
4230
|
-
$case: "switchCandidateProtocol",
|
4231
|
-
switchCandidateProtocol: object.scenario.switchCandidateProtocol,
|
4232
|
-
};
|
4233
|
-
}
|
4234
|
-
if (
|
4235
|
-
object.scenario?.$case === "subscriberBandwidth" &&
|
4236
|
-
object.scenario?.subscriberBandwidth !== undefined &&
|
4237
|
-
object.scenario?.subscriberBandwidth !== null
|
4238
|
-
) {
|
4239
|
-
message.scenario = { $case: "subscriberBandwidth", subscriberBandwidth: object.scenario.subscriberBandwidth };
|
4240
|
-
}
|
4241
|
-
return message;
|
4242
|
-
},
|
4243
|
-
};
|
4244
|
-
|
4245
|
-
function createBasePing(): Ping {
|
4246
|
-
return { timestamp: 0, rtt: 0 };
|
4247
|
-
}
|
4248
|
-
|
4249
|
-
export const Ping = {
|
4250
|
-
encode(message: Ping, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
4251
|
-
if (message.timestamp !== 0) {
|
4252
|
-
writer.uint32(8).int64(message.timestamp);
|
4253
|
-
}
|
4254
|
-
if (message.rtt !== 0) {
|
4255
|
-
writer.uint32(16).int64(message.rtt);
|
4256
|
-
}
|
4257
|
-
return writer;
|
4258
|
-
},
|
4259
|
-
|
4260
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): Ping {
|
4261
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
4262
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
4263
|
-
const message = createBasePing();
|
4264
|
-
while (reader.pos < end) {
|
4265
|
-
const tag = reader.uint32();
|
4266
|
-
switch (tag >>> 3) {
|
4267
|
-
case 1:
|
4268
|
-
if (tag !== 8) {
|
4269
|
-
break;
|
4270
|
-
}
|
4271
|
-
|
4272
|
-
message.timestamp = longToNumber(reader.int64() as Long);
|
4273
|
-
continue;
|
4274
|
-
case 2:
|
4275
|
-
if (tag !== 16) {
|
4276
|
-
break;
|
4277
|
-
}
|
4278
|
-
|
4279
|
-
message.rtt = longToNumber(reader.int64() as Long);
|
4280
|
-
continue;
|
4281
|
-
}
|
4282
|
-
if ((tag & 7) === 4 || tag === 0) {
|
4283
|
-
break;
|
4284
|
-
}
|
4285
|
-
reader.skipType(tag & 7);
|
4286
|
-
}
|
4287
|
-
return message;
|
4288
|
-
},
|
4289
|
-
|
4290
|
-
fromJSON(object: any): Ping {
|
4291
|
-
return {
|
4292
|
-
timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
|
4293
|
-
rtt: isSet(object.rtt) ? Number(object.rtt) : 0,
|
4294
|
-
};
|
4295
|
-
},
|
4296
|
-
|
4297
|
-
toJSON(message: Ping): unknown {
|
4298
|
-
const obj: any = {};
|
4299
|
-
message.timestamp !== undefined && (obj.timestamp = Math.round(message.timestamp));
|
4300
|
-
message.rtt !== undefined && (obj.rtt = Math.round(message.rtt));
|
4301
|
-
return obj;
|
4302
|
-
},
|
4303
|
-
|
4304
|
-
create<I extends Exact<DeepPartial<Ping>, I>>(base?: I): Ping {
|
4305
|
-
return Ping.fromPartial(base ?? {});
|
4306
|
-
},
|
4307
|
-
|
4308
|
-
fromPartial<I extends Exact<DeepPartial<Ping>, I>>(object: I): Ping {
|
4309
|
-
const message = createBasePing();
|
4310
|
-
message.timestamp = object.timestamp ?? 0;
|
4311
|
-
message.rtt = object.rtt ?? 0;
|
4312
|
-
return message;
|
4313
|
-
},
|
4314
|
-
};
|
4315
|
-
|
4316
|
-
function createBasePong(): Pong {
|
4317
|
-
return { lastPingTimestamp: 0, timestamp: 0 };
|
4318
|
-
}
|
4319
|
-
|
4320
|
-
export const Pong = {
|
4321
|
-
encode(message: Pong, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
4322
|
-
if (message.lastPingTimestamp !== 0) {
|
4323
|
-
writer.uint32(8).int64(message.lastPingTimestamp);
|
4324
|
-
}
|
4325
|
-
if (message.timestamp !== 0) {
|
4326
|
-
writer.uint32(16).int64(message.timestamp);
|
4327
|
-
}
|
4328
|
-
return writer;
|
4329
|
-
},
|
4330
|
-
|
4331
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): Pong {
|
4332
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
4333
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
4334
|
-
const message = createBasePong();
|
4335
|
-
while (reader.pos < end) {
|
4336
|
-
const tag = reader.uint32();
|
4337
|
-
switch (tag >>> 3) {
|
4338
|
-
case 1:
|
4339
|
-
if (tag !== 8) {
|
4340
|
-
break;
|
4341
|
-
}
|
4342
|
-
|
4343
|
-
message.lastPingTimestamp = longToNumber(reader.int64() as Long);
|
4344
|
-
continue;
|
4345
|
-
case 2:
|
4346
|
-
if (tag !== 16) {
|
4347
|
-
break;
|
4348
|
-
}
|
4349
|
-
|
4350
|
-
message.timestamp = longToNumber(reader.int64() as Long);
|
4351
|
-
continue;
|
4352
|
-
}
|
4353
|
-
if ((tag & 7) === 4 || tag === 0) {
|
4354
|
-
break;
|
4355
|
-
}
|
4356
|
-
reader.skipType(tag & 7);
|
4357
|
-
}
|
4358
|
-
return message;
|
4359
|
-
},
|
4360
|
-
|
4361
|
-
fromJSON(object: any): Pong {
|
4362
|
-
return {
|
4363
|
-
lastPingTimestamp: isSet(object.lastPingTimestamp) ? Number(object.lastPingTimestamp) : 0,
|
4364
|
-
timestamp: isSet(object.timestamp) ? Number(object.timestamp) : 0,
|
4365
|
-
};
|
4366
|
-
},
|
4367
|
-
|
4368
|
-
toJSON(message: Pong): unknown {
|
4369
|
-
const obj: any = {};
|
4370
|
-
message.lastPingTimestamp !== undefined && (obj.lastPingTimestamp = Math.round(message.lastPingTimestamp));
|
4371
|
-
message.timestamp !== undefined && (obj.timestamp = Math.round(message.timestamp));
|
4372
|
-
return obj;
|
4373
|
-
},
|
4374
|
-
|
4375
|
-
create<I extends Exact<DeepPartial<Pong>, I>>(base?: I): Pong {
|
4376
|
-
return Pong.fromPartial(base ?? {});
|
4377
|
-
},
|
4378
|
-
|
4379
|
-
fromPartial<I extends Exact<DeepPartial<Pong>, I>>(object: I): Pong {
|
4380
|
-
const message = createBasePong();
|
4381
|
-
message.lastPingTimestamp = object.lastPingTimestamp ?? 0;
|
4382
|
-
message.timestamp = object.timestamp ?? 0;
|
4383
|
-
return message;
|
4384
|
-
},
|
4385
|
-
};
|
4386
|
-
|
4387
|
-
function createBaseRegionSettings(): RegionSettings {
|
4388
|
-
return { regions: [] };
|
4389
|
-
}
|
4390
|
-
|
4391
|
-
export const RegionSettings = {
|
4392
|
-
encode(message: RegionSettings, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
4393
|
-
for (const v of message.regions) {
|
4394
|
-
RegionInfo.encode(v!, writer.uint32(10).fork()).ldelim();
|
4395
|
-
}
|
4396
|
-
return writer;
|
4397
|
-
},
|
4398
|
-
|
4399
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): RegionSettings {
|
4400
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
4401
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
4402
|
-
const message = createBaseRegionSettings();
|
4403
|
-
while (reader.pos < end) {
|
4404
|
-
const tag = reader.uint32();
|
4405
|
-
switch (tag >>> 3) {
|
4406
|
-
case 1:
|
4407
|
-
if (tag !== 10) {
|
4408
|
-
break;
|
4409
|
-
}
|
4410
|
-
|
4411
|
-
message.regions.push(RegionInfo.decode(reader, reader.uint32()));
|
4412
|
-
continue;
|
4413
|
-
}
|
4414
|
-
if ((tag & 7) === 4 || tag === 0) {
|
4415
|
-
break;
|
4416
|
-
}
|
4417
|
-
reader.skipType(tag & 7);
|
4418
|
-
}
|
4419
|
-
return message;
|
4420
|
-
},
|
4421
|
-
|
4422
|
-
fromJSON(object: any): RegionSettings {
|
4423
|
-
return { regions: Array.isArray(object?.regions) ? object.regions.map((e: any) => RegionInfo.fromJSON(e)) : [] };
|
4424
|
-
},
|
4425
|
-
|
4426
|
-
toJSON(message: RegionSettings): unknown {
|
4427
|
-
const obj: any = {};
|
4428
|
-
if (message.regions) {
|
4429
|
-
obj.regions = message.regions.map((e) => e ? RegionInfo.toJSON(e) : undefined);
|
4430
|
-
} else {
|
4431
|
-
obj.regions = [];
|
4432
|
-
}
|
4433
|
-
return obj;
|
4434
|
-
},
|
4435
|
-
|
4436
|
-
create<I extends Exact<DeepPartial<RegionSettings>, I>>(base?: I): RegionSettings {
|
4437
|
-
return RegionSettings.fromPartial(base ?? {});
|
4438
|
-
},
|
4439
|
-
|
4440
|
-
fromPartial<I extends Exact<DeepPartial<RegionSettings>, I>>(object: I): RegionSettings {
|
4441
|
-
const message = createBaseRegionSettings();
|
4442
|
-
message.regions = object.regions?.map((e) => RegionInfo.fromPartial(e)) || [];
|
4443
|
-
return message;
|
4444
|
-
},
|
4445
|
-
};
|
4446
|
-
|
4447
|
-
function createBaseRegionInfo(): RegionInfo {
|
4448
|
-
return { region: "", url: "", distance: 0 };
|
4449
|
-
}
|
4450
|
-
|
4451
|
-
export const RegionInfo = {
|
4452
|
-
encode(message: RegionInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
4453
|
-
if (message.region !== "") {
|
4454
|
-
writer.uint32(10).string(message.region);
|
4455
|
-
}
|
4456
|
-
if (message.url !== "") {
|
4457
|
-
writer.uint32(18).string(message.url);
|
4458
|
-
}
|
4459
|
-
if (message.distance !== 0) {
|
4460
|
-
writer.uint32(24).int64(message.distance);
|
4461
|
-
}
|
4462
|
-
return writer;
|
4463
|
-
},
|
4464
|
-
|
4465
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): RegionInfo {
|
4466
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
4467
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
4468
|
-
const message = createBaseRegionInfo();
|
4469
|
-
while (reader.pos < end) {
|
4470
|
-
const tag = reader.uint32();
|
4471
|
-
switch (tag >>> 3) {
|
4472
|
-
case 1:
|
4473
|
-
if (tag !== 10) {
|
4474
|
-
break;
|
4475
|
-
}
|
4476
|
-
|
4477
|
-
message.region = reader.string();
|
4478
|
-
continue;
|
4479
|
-
case 2:
|
4480
|
-
if (tag !== 18) {
|
4481
|
-
break;
|
4482
|
-
}
|
4483
|
-
|
4484
|
-
message.url = reader.string();
|
4485
|
-
continue;
|
4486
|
-
case 3:
|
4487
|
-
if (tag !== 24) {
|
4488
|
-
break;
|
4489
|
-
}
|
4490
|
-
|
4491
|
-
message.distance = longToNumber(reader.int64() as Long);
|
4492
|
-
continue;
|
4493
|
-
}
|
4494
|
-
if ((tag & 7) === 4 || tag === 0) {
|
4495
|
-
break;
|
4496
|
-
}
|
4497
|
-
reader.skipType(tag & 7);
|
4498
|
-
}
|
4499
|
-
return message;
|
4500
|
-
},
|
4501
|
-
|
4502
|
-
fromJSON(object: any): RegionInfo {
|
4503
|
-
return {
|
4504
|
-
region: isSet(object.region) ? String(object.region) : "",
|
4505
|
-
url: isSet(object.url) ? String(object.url) : "",
|
4506
|
-
distance: isSet(object.distance) ? Number(object.distance) : 0,
|
4507
|
-
};
|
4508
|
-
},
|
4509
|
-
|
4510
|
-
toJSON(message: RegionInfo): unknown {
|
4511
|
-
const obj: any = {};
|
4512
|
-
message.region !== undefined && (obj.region = message.region);
|
4513
|
-
message.url !== undefined && (obj.url = message.url);
|
4514
|
-
message.distance !== undefined && (obj.distance = Math.round(message.distance));
|
4515
|
-
return obj;
|
4516
|
-
},
|
4517
|
-
|
4518
|
-
create<I extends Exact<DeepPartial<RegionInfo>, I>>(base?: I): RegionInfo {
|
4519
|
-
return RegionInfo.fromPartial(base ?? {});
|
4520
|
-
},
|
4521
|
-
|
4522
|
-
fromPartial<I extends Exact<DeepPartial<RegionInfo>, I>>(object: I): RegionInfo {
|
4523
|
-
const message = createBaseRegionInfo();
|
4524
|
-
message.region = object.region ?? "";
|
4525
|
-
message.url = object.url ?? "";
|
4526
|
-
message.distance = object.distance ?? 0;
|
4527
|
-
return message;
|
4528
|
-
},
|
4529
|
-
};
|
4530
|
-
|
4531
|
-
function createBaseSubscriptionResponse(): SubscriptionResponse {
|
4532
|
-
return { trackSid: "", err: 0 };
|
4533
|
-
}
|
4534
|
-
|
4535
|
-
export const SubscriptionResponse = {
|
4536
|
-
encode(message: SubscriptionResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
4537
|
-
if (message.trackSid !== "") {
|
4538
|
-
writer.uint32(10).string(message.trackSid);
|
4539
|
-
}
|
4540
|
-
if (message.err !== 0) {
|
4541
|
-
writer.uint32(16).int32(message.err);
|
4542
|
-
}
|
4543
|
-
return writer;
|
4544
|
-
},
|
4545
|
-
|
4546
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): SubscriptionResponse {
|
4547
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
4548
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
4549
|
-
const message = createBaseSubscriptionResponse();
|
4550
|
-
while (reader.pos < end) {
|
4551
|
-
const tag = reader.uint32();
|
4552
|
-
switch (tag >>> 3) {
|
4553
|
-
case 1:
|
4554
|
-
if (tag !== 10) {
|
4555
|
-
break;
|
4556
|
-
}
|
4557
|
-
|
4558
|
-
message.trackSid = reader.string();
|
4559
|
-
continue;
|
4560
|
-
case 2:
|
4561
|
-
if (tag !== 16) {
|
4562
|
-
break;
|
4563
|
-
}
|
4564
|
-
|
4565
|
-
message.err = reader.int32() as any;
|
4566
|
-
continue;
|
4567
|
-
}
|
4568
|
-
if ((tag & 7) === 4 || tag === 0) {
|
4569
|
-
break;
|
4570
|
-
}
|
4571
|
-
reader.skipType(tag & 7);
|
4572
|
-
}
|
4573
|
-
return message;
|
4574
|
-
},
|
4575
|
-
|
4576
|
-
fromJSON(object: any): SubscriptionResponse {
|
4577
|
-
return {
|
4578
|
-
trackSid: isSet(object.trackSid) ? String(object.trackSid) : "",
|
4579
|
-
err: isSet(object.err) ? subscriptionErrorFromJSON(object.err) : 0,
|
4580
|
-
};
|
4581
|
-
},
|
4582
|
-
|
4583
|
-
toJSON(message: SubscriptionResponse): unknown {
|
4584
|
-
const obj: any = {};
|
4585
|
-
message.trackSid !== undefined && (obj.trackSid = message.trackSid);
|
4586
|
-
message.err !== undefined && (obj.err = subscriptionErrorToJSON(message.err));
|
4587
|
-
return obj;
|
4588
|
-
},
|
4589
|
-
|
4590
|
-
create<I extends Exact<DeepPartial<SubscriptionResponse>, I>>(base?: I): SubscriptionResponse {
|
4591
|
-
return SubscriptionResponse.fromPartial(base ?? {});
|
4592
|
-
},
|
4593
|
-
|
4594
|
-
fromPartial<I extends Exact<DeepPartial<SubscriptionResponse>, I>>(object: I): SubscriptionResponse {
|
4595
|
-
const message = createBaseSubscriptionResponse();
|
4596
|
-
message.trackSid = object.trackSid ?? "";
|
4597
|
-
message.err = object.err ?? 0;
|
4598
|
-
return message;
|
4599
|
-
},
|
4600
|
-
};
|
4601
|
-
|
4602
|
-
declare var self: any | undefined;
|
4603
|
-
declare var window: any | undefined;
|
4604
|
-
declare var global: any | undefined;
|
4605
|
-
var tsProtoGlobalThis: any = (() => {
|
4606
|
-
if (typeof globalThis !== "undefined") {
|
4607
|
-
return globalThis;
|
4608
|
-
}
|
4609
|
-
if (typeof self !== "undefined") {
|
4610
|
-
return self;
|
4611
|
-
}
|
4612
|
-
if (typeof window !== "undefined") {
|
4613
|
-
return window;
|
4614
|
-
}
|
4615
|
-
if (typeof global !== "undefined") {
|
4616
|
-
return global;
|
4617
|
-
}
|
4618
|
-
throw "Unable to locate global object";
|
4619
|
-
})();
|
4620
|
-
|
4621
|
-
function bytesFromBase64(b64: string): Uint8Array {
|
4622
|
-
if (tsProtoGlobalThis.Buffer) {
|
4623
|
-
return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
|
4624
|
-
} else {
|
4625
|
-
const bin = tsProtoGlobalThis.atob(b64);
|
4626
|
-
const arr = new Uint8Array(bin.length);
|
4627
|
-
for (let i = 0; i < bin.length; ++i) {
|
4628
|
-
arr[i] = bin.charCodeAt(i);
|
4629
|
-
}
|
4630
|
-
return arr;
|
4631
|
-
}
|
4632
|
-
}
|
4633
|
-
|
4634
|
-
function base64FromBytes(arr: Uint8Array): string {
|
4635
|
-
if (tsProtoGlobalThis.Buffer) {
|
4636
|
-
return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
|
4637
|
-
} else {
|
4638
|
-
const bin: string[] = [];
|
4639
|
-
arr.forEach((byte) => {
|
4640
|
-
bin.push(String.fromCharCode(byte));
|
4641
|
-
});
|
4642
|
-
return tsProtoGlobalThis.btoa(bin.join(""));
|
4643
|
-
}
|
4644
|
-
}
|
4645
|
-
|
4646
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
4647
|
-
|
4648
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
4649
|
-
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
4650
|
-
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
4651
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
4652
|
-
: Partial<T>;
|
4653
|
-
|
4654
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
4655
|
-
export type Exact<P, I extends P> = P extends Builtin ? P
|
4656
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
4657
|
-
|
4658
|
-
function longToNumber(long: Long): number {
|
4659
|
-
if (long.gt(Number.MAX_SAFE_INTEGER)) {
|
4660
|
-
throw new tsProtoGlobalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
4661
|
-
}
|
4662
|
-
return long.toNumber();
|
4663
|
-
}
|
4664
|
-
|
4665
|
-
if (_m0.util.Long !== Long) {
|
4666
|
-
_m0.util.Long = Long as any;
|
4667
|
-
_m0.configure();
|
4668
|
-
}
|
4669
|
-
|
4670
|
-
function isSet(value: any): boolean {
|
4671
|
-
return value !== null && value !== undefined;
|
4672
|
-
}
|