@stream-io/video-client 0.0.1-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +219 -0
- package/README.md +14 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +14663 -0
- package/dist/index.js.map +1 -0
- package/dist/src/Batcher.d.ts +12 -0
- package/dist/src/CallDropScheduler.d.ts +44 -0
- package/dist/src/StreamSfuClient.d.ts +25 -0
- package/dist/src/StreamVideoClient.d.ts +145 -0
- package/dist/src/__tests__/StreamVideoClient.test.d.ts +1 -0
- package/dist/src/config/defaultConfigs.d.ts +2 -0
- package/dist/src/config/types.d.ts +29 -0
- package/dist/src/coordinator/StreamCoordinatorClient.d.ts +19 -0
- package/dist/src/coordinator/connection/base64.d.ts +2 -0
- package/dist/src/coordinator/connection/client.d.ts +174 -0
- package/dist/src/coordinator/connection/connection.d.ts +139 -0
- package/dist/src/coordinator/connection/connection_fallback.d.ts +38 -0
- package/dist/src/coordinator/connection/errors.d.ts +16 -0
- package/dist/src/coordinator/connection/events.d.ts +7 -0
- package/dist/src/coordinator/connection/insights.d.ts +58 -0
- package/dist/src/coordinator/connection/signing.d.ts +30 -0
- package/dist/src/coordinator/connection/token_manager.d.ts +39 -0
- package/dist/src/coordinator/connection/types.d.ts +96 -0
- package/dist/src/coordinator/connection/utils.d.ts +25 -0
- package/dist/src/devices.d.ts +79 -0
- package/dist/src/events/call.d.ts +26 -0
- package/dist/src/events/internal.d.ts +8 -0
- package/dist/src/events/participant.d.ts +21 -0
- package/dist/src/events/speaker.d.ts +10 -0
- package/dist/src/gen/coordinator/index.d.ts +1664 -0
- package/dist/src/gen/google/protobuf/descriptor.d.ts +1650 -0
- package/dist/src/gen/google/protobuf/duration.d.ts +113 -0
- package/dist/src/gen/google/protobuf/struct.d.ts +184 -0
- package/dist/src/gen/google/protobuf/timestamp.d.ts +158 -0
- package/dist/src/gen/video/coordinator/broadcast_v1/broadcast.d.ts +66 -0
- package/dist/src/gen/video/coordinator/call_v1/call.d.ts +254 -0
- package/dist/src/gen/video/coordinator/client_v1_rpc/client_rpc.client.d.ts +351 -0
- package/dist/src/gen/video/coordinator/client_v1_rpc/client_rpc.d.ts +1488 -0
- package/dist/src/gen/video/coordinator/client_v1_rpc/envelopes.d.ts +143 -0
- package/dist/src/gen/video/coordinator/client_v1_rpc/websocket.d.ts +292 -0
- package/dist/src/gen/video/coordinator/edge_v1/edge.d.ts +183 -0
- package/dist/src/gen/video/coordinator/event_v1/event.d.ts +411 -0
- package/dist/src/gen/video/coordinator/geofence_v1/geofence.d.ts +63 -0
- package/dist/src/gen/video/coordinator/member_v1/member.d.ts +59 -0
- package/dist/src/gen/video/coordinator/participant_v1/participant.d.ts +103 -0
- package/dist/src/gen/video/coordinator/push_v1/push.d.ts +240 -0
- package/dist/src/gen/video/coordinator/stat_v1/stat.d.ts +308 -0
- package/dist/src/gen/video/coordinator/user_v1/user.d.ts +112 -0
- package/dist/src/gen/video/coordinator/utils_v1/utils.d.ts +47 -0
- package/dist/src/gen/video/sfu/event/events.d.ts +736 -0
- package/dist/src/gen/video/sfu/models/models.d.ts +460 -0
- package/dist/src/gen/video/sfu/signal_rpc/signal.client.d.ts +89 -0
- package/dist/src/gen/video/sfu/signal_rpc/signal.d.ts +320 -0
- package/dist/src/helpers/browsers.d.ts +8 -0
- package/dist/src/helpers/sound-detector.d.ts +34 -0
- package/dist/src/rpc/createClient.d.ts +10 -0
- package/dist/src/rpc/index.d.ts +2 -0
- package/dist/src/rpc/latency.d.ts +9 -0
- package/dist/src/rtc/Call.d.ts +180 -0
- package/dist/src/rtc/CallMetadata.d.ts +9 -0
- package/dist/src/rtc/Dispatcher.d.ts +9 -0
- package/dist/src/rtc/IceTrickleBuffer.d.ts +11 -0
- package/dist/src/rtc/callEventHandlers.d.ts +5 -0
- package/dist/src/rtc/codecs.d.ts +2 -0
- package/dist/src/rtc/helpers/iceCandidate.d.ts +2 -0
- package/dist/src/rtc/helpers/tracks.d.ts +3 -0
- package/dist/src/rtc/publisher.d.ts +53 -0
- package/dist/src/rtc/signal.d.ts +5 -0
- package/dist/src/rtc/subscriber.d.ts +7 -0
- package/dist/src/rtc/types.d.ts +84 -0
- package/dist/src/rtc/videoLayers.d.ts +17 -0
- package/dist/src/stats/coordinator-stats-reporter.d.ts +10 -0
- package/dist/src/stats/state-store-stats-reporter.d.ts +57 -0
- package/dist/src/stats/types.d.ts +42 -0
- package/dist/src/store/index.d.ts +2 -0
- package/dist/src/store/rxUtils.d.ts +18 -0
- package/dist/src/store/stateStore.d.ts +182 -0
- package/generate-openapi.sh +32 -0
- package/index.ts +30 -0
- package/openapitools.json +7 -0
- package/package.json +54 -0
- package/rollup.config.mjs +48 -0
- package/src/Batcher.ts +43 -0
- package/src/CallDropScheduler.ts +192 -0
- package/src/StreamSfuClient.ts +185 -0
- package/src/StreamVideoClient.ts +487 -0
- package/src/__tests__/StreamVideoClient.test.ts +83 -0
- package/src/config/defaultConfigs.ts +15 -0
- package/src/config/types.ts +30 -0
- package/src/coordinator/StreamCoordinatorClient.ts +111 -0
- package/src/coordinator/connection/base64.ts +80 -0
- package/src/coordinator/connection/client.ts +815 -0
- package/src/coordinator/connection/connection.ts +750 -0
- package/src/coordinator/connection/connection_fallback.ts +239 -0
- package/src/coordinator/connection/errors.ts +70 -0
- package/src/coordinator/connection/events.ts +10 -0
- package/src/coordinator/connection/insights.ts +88 -0
- package/src/coordinator/connection/signing.ts +104 -0
- package/src/coordinator/connection/token_manager.ts +160 -0
- package/src/coordinator/connection/types.ts +120 -0
- package/src/coordinator/connection/utils.ts +148 -0
- package/src/devices.ts +266 -0
- package/src/events/call.ts +166 -0
- package/src/events/internal.ts +47 -0
- package/src/events/participant.ts +97 -0
- package/src/events/speaker.ts +62 -0
- package/src/gen/coordinator/index.ts +1653 -0
- package/src/gen/google/protobuf/descriptor.ts +3466 -0
- package/src/gen/google/protobuf/duration.ts +232 -0
- package/src/gen/google/protobuf/struct.ts +481 -0
- package/src/gen/google/protobuf/timestamp.ts +291 -0
- package/src/gen/video/coordinator/broadcast_v1/broadcast.ts +154 -0
- package/src/gen/video/coordinator/call_v1/call.ts +651 -0
- package/src/gen/video/coordinator/client_v1_rpc/client_rpc.client.ts +463 -0
- package/src/gen/video/coordinator/client_v1_rpc/client_rpc.ts +3819 -0
- package/src/gen/video/coordinator/client_v1_rpc/envelopes.ts +424 -0
- package/src/gen/video/coordinator/client_v1_rpc/websocket.ts +719 -0
- package/src/gen/video/coordinator/edge_v1/edge.ts +532 -0
- package/src/gen/video/coordinator/event_v1/event.ts +1171 -0
- package/src/gen/video/coordinator/geofence_v1/geofence.ts +128 -0
- package/src/gen/video/coordinator/member_v1/member.ts +138 -0
- package/src/gen/video/coordinator/participant_v1/participant.ts +261 -0
- package/src/gen/video/coordinator/push_v1/push.ts +651 -0
- package/src/gen/video/coordinator/stat_v1/stat.ts +656 -0
- package/src/gen/video/coordinator/user_v1/user.ts +277 -0
- package/src/gen/video/coordinator/utils_v1/utils.ts +98 -0
- package/src/gen/video/sfu/event/events.ts +1962 -0
- package/src/gen/video/sfu/models/models.ts +1062 -0
- package/src/gen/video/sfu/signal_rpc/signal.client.ts +108 -0
- package/src/gen/video/sfu/signal_rpc/signal.ts +906 -0
- package/src/helpers/browsers.ts +13 -0
- package/src/helpers/sound-detector.ts +85 -0
- package/src/rpc/createClient.ts +50 -0
- package/src/rpc/index.ts +2 -0
- package/src/rpc/latency.ts +43 -0
- package/src/rtc/Call.ts +585 -0
- package/src/rtc/CallMetadata.ts +24 -0
- package/src/rtc/Dispatcher.ts +46 -0
- package/src/rtc/IceTrickleBuffer.ts +21 -0
- package/src/rtc/callEventHandlers.ts +37 -0
- package/src/rtc/codecs.ts +61 -0
- package/src/rtc/helpers/iceCandidate.ts +16 -0
- package/src/rtc/helpers/tracks.ts +18 -0
- package/src/rtc/publisher.ts +305 -0
- package/src/rtc/signal.ts +34 -0
- package/src/rtc/subscriber.ts +85 -0
- package/src/rtc/types.ts +105 -0
- package/src/rtc/videoLayers.ts +103 -0
- package/src/stats/coordinator-stats-reporter.ts +167 -0
- package/src/stats/state-store-stats-reporter.ts +364 -0
- package/src/stats/types.ts +46 -0
- package/src/store/index.ts +2 -0
- package/src/store/rxUtils.ts +42 -0
- package/src/store/stateStore.ts +341 -0
- package/tsconfig.json +25 -0
- package/typedoc.json +11 -0
- package/vite.config.ts +11 -0
|
@@ -0,0 +1,719 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
// @generated by protobuf-ts 2.8.1 with parameter long_type_string,client_generic,server_none,eslint_disable
|
|
3
|
+
// @generated from protobuf file "video/coordinator/client_v1_rpc/websocket.proto" (package "stream.video.coordinator.client_v1_rpc", syntax proto3)
|
|
4
|
+
// tslint:disable
|
|
5
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
6
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
7
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
9
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
10
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
11
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
12
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
13
|
+
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
|
14
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
15
|
+
import { DeviceInput } from "../push_v1/push";
|
|
16
|
+
import { UserInput } from "../user_v1/user";
|
|
17
|
+
import { CallCustom } from "../event_v1/event";
|
|
18
|
+
import { UserUpdated } from "../event_v1/event";
|
|
19
|
+
import { CallCancelled } from "../event_v1/event";
|
|
20
|
+
import { CallRejected } from "../event_v1/event";
|
|
21
|
+
import { CallAccepted } from "../event_v1/event";
|
|
22
|
+
import { CallEnded } from "../event_v1/event";
|
|
23
|
+
import { CallMembersDeleted } from "../event_v1/event";
|
|
24
|
+
import { CallMembersUpdated } from "../event_v1/event";
|
|
25
|
+
import { CallMembersCreated } from "../event_v1/event";
|
|
26
|
+
import { CallDeleted } from "../event_v1/event";
|
|
27
|
+
import { CallUpdated } from "../event_v1/event";
|
|
28
|
+
import { CallCreated } from "../event_v1/event";
|
|
29
|
+
import { User } from "../user_v1/user";
|
|
30
|
+
/**
|
|
31
|
+
* WebsocketEvent only includes events that are sent to the client via websocket connection
|
|
32
|
+
* This is not an exhaustive list of events, since not all of them are sent via websocket
|
|
33
|
+
*
|
|
34
|
+
* @generated from protobuf message stream.video.coordinator.client_v1_rpc.WebsocketEvent
|
|
35
|
+
*/
|
|
36
|
+
export interface WebsocketEvent {
|
|
37
|
+
/**
|
|
38
|
+
* All users mentioned in the event payload, indexed by User.id
|
|
39
|
+
*
|
|
40
|
+
* @generated from protobuf field: map<string, stream.video.coordinator.user_v1.User> users = 1;
|
|
41
|
+
*/
|
|
42
|
+
users: {
|
|
43
|
+
[key: string]: User;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* @generated from protobuf oneof: event
|
|
47
|
+
*/
|
|
48
|
+
event: {
|
|
49
|
+
oneofKind: "error";
|
|
50
|
+
/**
|
|
51
|
+
* @generated from protobuf field: stream.video.coordinator.client_v1_rpc.WebsocketError error = 19;
|
|
52
|
+
*/
|
|
53
|
+
error: WebsocketError;
|
|
54
|
+
} | {
|
|
55
|
+
oneofKind: "healthcheck";
|
|
56
|
+
/**
|
|
57
|
+
* @generated from protobuf field: stream.video.coordinator.client_v1_rpc.WebsocketHealthcheck healthcheck = 20;
|
|
58
|
+
*/
|
|
59
|
+
healthcheck: WebsocketHealthcheck;
|
|
60
|
+
} | {
|
|
61
|
+
oneofKind: "callCreated";
|
|
62
|
+
/**
|
|
63
|
+
* Call events
|
|
64
|
+
*
|
|
65
|
+
* @generated from protobuf field: stream.video.coordinator.event_v1.CallCreated call_created = 30;
|
|
66
|
+
*/
|
|
67
|
+
callCreated: CallCreated;
|
|
68
|
+
} | {
|
|
69
|
+
oneofKind: "callUpdated";
|
|
70
|
+
/**
|
|
71
|
+
* @generated from protobuf field: stream.video.coordinator.event_v1.CallUpdated call_updated = 31;
|
|
72
|
+
*/
|
|
73
|
+
callUpdated: CallUpdated;
|
|
74
|
+
} | {
|
|
75
|
+
oneofKind: "callDeleted";
|
|
76
|
+
/**
|
|
77
|
+
* @generated from protobuf field: stream.video.coordinator.event_v1.CallDeleted call_deleted = 32;
|
|
78
|
+
*/
|
|
79
|
+
callDeleted: CallDeleted;
|
|
80
|
+
} | {
|
|
81
|
+
oneofKind: "callMembersCreated";
|
|
82
|
+
/**
|
|
83
|
+
* @generated from protobuf field: stream.video.coordinator.event_v1.CallMembersCreated call_members_created = 33;
|
|
84
|
+
*/
|
|
85
|
+
callMembersCreated: CallMembersCreated;
|
|
86
|
+
} | {
|
|
87
|
+
oneofKind: "callMembersUpdated";
|
|
88
|
+
/**
|
|
89
|
+
* @generated from protobuf field: stream.video.coordinator.event_v1.CallMembersUpdated call_members_updated = 34;
|
|
90
|
+
*/
|
|
91
|
+
callMembersUpdated: CallMembersUpdated;
|
|
92
|
+
} | {
|
|
93
|
+
oneofKind: "callMembersDeleted";
|
|
94
|
+
/**
|
|
95
|
+
* @generated from protobuf field: stream.video.coordinator.event_v1.CallMembersDeleted call_members_deleted = 35;
|
|
96
|
+
*/
|
|
97
|
+
callMembersDeleted: CallMembersDeleted;
|
|
98
|
+
} | {
|
|
99
|
+
oneofKind: "callEnded";
|
|
100
|
+
/**
|
|
101
|
+
* @generated from protobuf field: stream.video.coordinator.event_v1.CallEnded call_ended = 36;
|
|
102
|
+
*/
|
|
103
|
+
callEnded: CallEnded;
|
|
104
|
+
} | {
|
|
105
|
+
oneofKind: "callAccepted";
|
|
106
|
+
/**
|
|
107
|
+
* User initiated call events
|
|
108
|
+
*
|
|
109
|
+
* @generated from protobuf field: stream.video.coordinator.event_v1.CallAccepted call_accepted = 40;
|
|
110
|
+
*/
|
|
111
|
+
callAccepted: CallAccepted;
|
|
112
|
+
} | {
|
|
113
|
+
oneofKind: "callRejected";
|
|
114
|
+
/**
|
|
115
|
+
* @generated from protobuf field: stream.video.coordinator.event_v1.CallRejected call_rejected = 41;
|
|
116
|
+
*/
|
|
117
|
+
callRejected: CallRejected;
|
|
118
|
+
} | {
|
|
119
|
+
oneofKind: "callCancelled";
|
|
120
|
+
/**
|
|
121
|
+
* @generated from protobuf field: stream.video.coordinator.event_v1.CallCancelled call_cancelled = 42;
|
|
122
|
+
*/
|
|
123
|
+
callCancelled: CallCancelled;
|
|
124
|
+
} | {
|
|
125
|
+
oneofKind: "userUpdated";
|
|
126
|
+
/**
|
|
127
|
+
* User events
|
|
128
|
+
*
|
|
129
|
+
* @generated from protobuf field: stream.video.coordinator.event_v1.UserUpdated user_updated = 50;
|
|
130
|
+
*/
|
|
131
|
+
userUpdated: UserUpdated;
|
|
132
|
+
} | {
|
|
133
|
+
oneofKind: "callCustom";
|
|
134
|
+
/**
|
|
135
|
+
* Custom event
|
|
136
|
+
*
|
|
137
|
+
* @generated from protobuf field: stream.video.coordinator.event_v1.CallCustom call_custom = 99;
|
|
138
|
+
*/
|
|
139
|
+
callCustom: CallCustom;
|
|
140
|
+
} | {
|
|
141
|
+
oneofKind: undefined;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* WebsocketClientEvent contains all events that client is allowed to send to the server
|
|
146
|
+
* When clients sends any of mentioned events, they should be wrapped into ClientEvent
|
|
147
|
+
*
|
|
148
|
+
* @generated from protobuf message stream.video.coordinator.client_v1_rpc.WebsocketClientEvent
|
|
149
|
+
*/
|
|
150
|
+
export interface WebsocketClientEvent {
|
|
151
|
+
/**
|
|
152
|
+
* @generated from protobuf oneof: event
|
|
153
|
+
*/
|
|
154
|
+
event: {
|
|
155
|
+
oneofKind: "healthcheck";
|
|
156
|
+
/**
|
|
157
|
+
* @generated from protobuf field: stream.video.coordinator.client_v1_rpc.WebsocketHealthcheck healthcheck = 1;
|
|
158
|
+
*/
|
|
159
|
+
healthcheck: WebsocketHealthcheck;
|
|
160
|
+
} | {
|
|
161
|
+
oneofKind: "authRequest";
|
|
162
|
+
/**
|
|
163
|
+
* @generated from protobuf field: stream.video.coordinator.client_v1_rpc.WebsocketAuthRequest auth_request = 2;
|
|
164
|
+
*/
|
|
165
|
+
authRequest: WebsocketAuthRequest;
|
|
166
|
+
} | {
|
|
167
|
+
oneofKind: undefined;
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* A payload that is sent through websocket to authenticate a connection
|
|
172
|
+
*
|
|
173
|
+
* @generated from protobuf message stream.video.coordinator.client_v1_rpc.WebsocketAuthRequest
|
|
174
|
+
*/
|
|
175
|
+
export interface WebsocketAuthRequest {
|
|
176
|
+
/**
|
|
177
|
+
* Application API key that matches a secret is used to sign a token
|
|
178
|
+
*
|
|
179
|
+
* @generated from protobuf field: string api_key = 1;
|
|
180
|
+
*/
|
|
181
|
+
apiKey: string;
|
|
182
|
+
/**
|
|
183
|
+
* A client JWT token
|
|
184
|
+
*
|
|
185
|
+
* @generated from protobuf field: string token = 2;
|
|
186
|
+
*/
|
|
187
|
+
token: string;
|
|
188
|
+
/**
|
|
189
|
+
* Optional UserInput. When present, it is used to create or update user information.
|
|
190
|
+
* If contains some changes, a permission check will be performed
|
|
191
|
+
*
|
|
192
|
+
* @generated from protobuf field: stream.video.coordinator.user_v1.UserInput user = 3;
|
|
193
|
+
*/
|
|
194
|
+
user?: UserInput;
|
|
195
|
+
/**
|
|
196
|
+
* Optional DeviceInput. When present, a device will be created for a user. If device
|
|
197
|
+
* already exists, nothing will happen
|
|
198
|
+
*
|
|
199
|
+
* @generated from protobuf field: stream.video.coordinator.push_v1.DeviceInput device = 4;
|
|
200
|
+
*/
|
|
201
|
+
device?: DeviceInput;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Healthcheck is sent back and forth between websocket client and server
|
|
205
|
+
* When server sends a healthcheck, it is wrapped into WebsocketEvent
|
|
206
|
+
* When client sends healthcheck, it should be wrapped into WebsocketClientEvent
|
|
207
|
+
*
|
|
208
|
+
* @generated from protobuf message stream.video.coordinator.client_v1_rpc.WebsocketHealthcheck
|
|
209
|
+
*/
|
|
210
|
+
export interface WebsocketHealthcheck {
|
|
211
|
+
/**
|
|
212
|
+
* @generated from protobuf field: string user_id = 1;
|
|
213
|
+
*/
|
|
214
|
+
userId: string;
|
|
215
|
+
/**
|
|
216
|
+
* @generated from protobuf field: string client_id = 2;
|
|
217
|
+
*/
|
|
218
|
+
clientId: string;
|
|
219
|
+
/**
|
|
220
|
+
* @generated from protobuf field: string call_type = 3;
|
|
221
|
+
*/
|
|
222
|
+
callType: string;
|
|
223
|
+
/**
|
|
224
|
+
* @generated from protobuf field: string call_id = 4;
|
|
225
|
+
*/
|
|
226
|
+
callId: string;
|
|
227
|
+
/**
|
|
228
|
+
* @generated from protobuf field: bool video = 5;
|
|
229
|
+
*/
|
|
230
|
+
video: boolean;
|
|
231
|
+
/**
|
|
232
|
+
* @generated from protobuf field: bool audio = 6;
|
|
233
|
+
*/
|
|
234
|
+
audio: boolean;
|
|
235
|
+
}
|
|
236
|
+
/**
|
|
237
|
+
* @generated from protobuf message stream.video.coordinator.client_v1_rpc.WebsocketError
|
|
238
|
+
*/
|
|
239
|
+
export interface WebsocketError {
|
|
240
|
+
/**
|
|
241
|
+
* @generated from protobuf field: int32 code = 1;
|
|
242
|
+
*/
|
|
243
|
+
code: number;
|
|
244
|
+
/**
|
|
245
|
+
* @generated from protobuf field: string message = 2;
|
|
246
|
+
*/
|
|
247
|
+
message: string;
|
|
248
|
+
}
|
|
249
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
250
|
+
class WebsocketEvent$Type extends MessageType<WebsocketEvent> {
|
|
251
|
+
constructor() {
|
|
252
|
+
super("stream.video.coordinator.client_v1_rpc.WebsocketEvent", [
|
|
253
|
+
{ no: 1, name: "users", kind: "map", K: 9 /*ScalarType.STRING*/, V: { kind: "message", T: () => User } },
|
|
254
|
+
{ no: 19, name: "error", kind: "message", oneof: "event", T: () => WebsocketError },
|
|
255
|
+
{ no: 20, name: "healthcheck", kind: "message", oneof: "event", T: () => WebsocketHealthcheck },
|
|
256
|
+
{ no: 30, name: "call_created", kind: "message", oneof: "event", T: () => CallCreated },
|
|
257
|
+
{ no: 31, name: "call_updated", kind: "message", oneof: "event", T: () => CallUpdated },
|
|
258
|
+
{ no: 32, name: "call_deleted", kind: "message", oneof: "event", T: () => CallDeleted },
|
|
259
|
+
{ no: 33, name: "call_members_created", kind: "message", oneof: "event", T: () => CallMembersCreated },
|
|
260
|
+
{ no: 34, name: "call_members_updated", kind: "message", oneof: "event", T: () => CallMembersUpdated },
|
|
261
|
+
{ no: 35, name: "call_members_deleted", kind: "message", oneof: "event", T: () => CallMembersDeleted },
|
|
262
|
+
{ no: 36, name: "call_ended", kind: "message", oneof: "event", T: () => CallEnded },
|
|
263
|
+
{ no: 40, name: "call_accepted", kind: "message", oneof: "event", T: () => CallAccepted },
|
|
264
|
+
{ no: 41, name: "call_rejected", kind: "message", oneof: "event", T: () => CallRejected },
|
|
265
|
+
{ no: 42, name: "call_cancelled", kind: "message", oneof: "event", T: () => CallCancelled },
|
|
266
|
+
{ no: 50, name: "user_updated", kind: "message", oneof: "event", T: () => UserUpdated },
|
|
267
|
+
{ no: 99, name: "call_custom", kind: "message", oneof: "event", T: () => CallCustom }
|
|
268
|
+
]);
|
|
269
|
+
}
|
|
270
|
+
create(value?: PartialMessage<WebsocketEvent>): WebsocketEvent {
|
|
271
|
+
const message = { users: {}, event: { oneofKind: undefined } };
|
|
272
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
273
|
+
if (value !== undefined)
|
|
274
|
+
reflectionMergePartial<WebsocketEvent>(this, message, value);
|
|
275
|
+
return message;
|
|
276
|
+
}
|
|
277
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WebsocketEvent): WebsocketEvent {
|
|
278
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
279
|
+
while (reader.pos < end) {
|
|
280
|
+
let [fieldNo, wireType] = reader.tag();
|
|
281
|
+
switch (fieldNo) {
|
|
282
|
+
case /* map<string, stream.video.coordinator.user_v1.User> users */ 1:
|
|
283
|
+
this.binaryReadMap1(message.users, reader, options);
|
|
284
|
+
break;
|
|
285
|
+
case /* stream.video.coordinator.client_v1_rpc.WebsocketError error */ 19:
|
|
286
|
+
message.event = {
|
|
287
|
+
oneofKind: "error",
|
|
288
|
+
error: WebsocketError.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).error)
|
|
289
|
+
};
|
|
290
|
+
break;
|
|
291
|
+
case /* stream.video.coordinator.client_v1_rpc.WebsocketHealthcheck healthcheck */ 20:
|
|
292
|
+
message.event = {
|
|
293
|
+
oneofKind: "healthcheck",
|
|
294
|
+
healthcheck: WebsocketHealthcheck.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).healthcheck)
|
|
295
|
+
};
|
|
296
|
+
break;
|
|
297
|
+
case /* stream.video.coordinator.event_v1.CallCreated call_created */ 30:
|
|
298
|
+
message.event = {
|
|
299
|
+
oneofKind: "callCreated",
|
|
300
|
+
callCreated: CallCreated.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).callCreated)
|
|
301
|
+
};
|
|
302
|
+
break;
|
|
303
|
+
case /* stream.video.coordinator.event_v1.CallUpdated call_updated */ 31:
|
|
304
|
+
message.event = {
|
|
305
|
+
oneofKind: "callUpdated",
|
|
306
|
+
callUpdated: CallUpdated.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).callUpdated)
|
|
307
|
+
};
|
|
308
|
+
break;
|
|
309
|
+
case /* stream.video.coordinator.event_v1.CallDeleted call_deleted */ 32:
|
|
310
|
+
message.event = {
|
|
311
|
+
oneofKind: "callDeleted",
|
|
312
|
+
callDeleted: CallDeleted.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).callDeleted)
|
|
313
|
+
};
|
|
314
|
+
break;
|
|
315
|
+
case /* stream.video.coordinator.event_v1.CallMembersCreated call_members_created */ 33:
|
|
316
|
+
message.event = {
|
|
317
|
+
oneofKind: "callMembersCreated",
|
|
318
|
+
callMembersCreated: CallMembersCreated.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).callMembersCreated)
|
|
319
|
+
};
|
|
320
|
+
break;
|
|
321
|
+
case /* stream.video.coordinator.event_v1.CallMembersUpdated call_members_updated */ 34:
|
|
322
|
+
message.event = {
|
|
323
|
+
oneofKind: "callMembersUpdated",
|
|
324
|
+
callMembersUpdated: CallMembersUpdated.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).callMembersUpdated)
|
|
325
|
+
};
|
|
326
|
+
break;
|
|
327
|
+
case /* stream.video.coordinator.event_v1.CallMembersDeleted call_members_deleted */ 35:
|
|
328
|
+
message.event = {
|
|
329
|
+
oneofKind: "callMembersDeleted",
|
|
330
|
+
callMembersDeleted: CallMembersDeleted.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).callMembersDeleted)
|
|
331
|
+
};
|
|
332
|
+
break;
|
|
333
|
+
case /* stream.video.coordinator.event_v1.CallEnded call_ended */ 36:
|
|
334
|
+
message.event = {
|
|
335
|
+
oneofKind: "callEnded",
|
|
336
|
+
callEnded: CallEnded.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).callEnded)
|
|
337
|
+
};
|
|
338
|
+
break;
|
|
339
|
+
case /* stream.video.coordinator.event_v1.CallAccepted call_accepted */ 40:
|
|
340
|
+
message.event = {
|
|
341
|
+
oneofKind: "callAccepted",
|
|
342
|
+
callAccepted: CallAccepted.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).callAccepted)
|
|
343
|
+
};
|
|
344
|
+
break;
|
|
345
|
+
case /* stream.video.coordinator.event_v1.CallRejected call_rejected */ 41:
|
|
346
|
+
message.event = {
|
|
347
|
+
oneofKind: "callRejected",
|
|
348
|
+
callRejected: CallRejected.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).callRejected)
|
|
349
|
+
};
|
|
350
|
+
break;
|
|
351
|
+
case /* stream.video.coordinator.event_v1.CallCancelled call_cancelled */ 42:
|
|
352
|
+
message.event = {
|
|
353
|
+
oneofKind: "callCancelled",
|
|
354
|
+
callCancelled: CallCancelled.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).callCancelled)
|
|
355
|
+
};
|
|
356
|
+
break;
|
|
357
|
+
case /* stream.video.coordinator.event_v1.UserUpdated user_updated */ 50:
|
|
358
|
+
message.event = {
|
|
359
|
+
oneofKind: "userUpdated",
|
|
360
|
+
userUpdated: UserUpdated.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).userUpdated)
|
|
361
|
+
};
|
|
362
|
+
break;
|
|
363
|
+
case /* stream.video.coordinator.event_v1.CallCustom call_custom */ 99:
|
|
364
|
+
message.event = {
|
|
365
|
+
oneofKind: "callCustom",
|
|
366
|
+
callCustom: CallCustom.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).callCustom)
|
|
367
|
+
};
|
|
368
|
+
break;
|
|
369
|
+
default:
|
|
370
|
+
let u = options.readUnknownField;
|
|
371
|
+
if (u === "throw")
|
|
372
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
373
|
+
let d = reader.skip(wireType);
|
|
374
|
+
if (u !== false)
|
|
375
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
return message;
|
|
379
|
+
}
|
|
380
|
+
private binaryReadMap1(map: WebsocketEvent["users"], reader: IBinaryReader, options: BinaryReadOptions): void {
|
|
381
|
+
let len = reader.uint32(), end = reader.pos + len, key: keyof WebsocketEvent["users"] | undefined, val: WebsocketEvent["users"][any] | undefined;
|
|
382
|
+
while (reader.pos < end) {
|
|
383
|
+
let [fieldNo, wireType] = reader.tag();
|
|
384
|
+
switch (fieldNo) {
|
|
385
|
+
case 1:
|
|
386
|
+
key = reader.string();
|
|
387
|
+
break;
|
|
388
|
+
case 2:
|
|
389
|
+
val = User.internalBinaryRead(reader, reader.uint32(), options);
|
|
390
|
+
break;
|
|
391
|
+
default: throw new globalThis.Error("unknown map entry field for field stream.video.coordinator.client_v1_rpc.WebsocketEvent.users");
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
map[key ?? ""] = val ?? User.create();
|
|
395
|
+
}
|
|
396
|
+
internalBinaryWrite(message: WebsocketEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
397
|
+
/* map<string, stream.video.coordinator.user_v1.User> users = 1; */
|
|
398
|
+
for (let k of Object.keys(message.users)) {
|
|
399
|
+
writer.tag(1, WireType.LengthDelimited).fork().tag(1, WireType.LengthDelimited).string(k);
|
|
400
|
+
writer.tag(2, WireType.LengthDelimited).fork();
|
|
401
|
+
User.internalBinaryWrite(message.users[k], writer, options);
|
|
402
|
+
writer.join().join();
|
|
403
|
+
}
|
|
404
|
+
/* stream.video.coordinator.client_v1_rpc.WebsocketError error = 19; */
|
|
405
|
+
if (message.event.oneofKind === "error")
|
|
406
|
+
WebsocketError.internalBinaryWrite(message.event.error, writer.tag(19, WireType.LengthDelimited).fork(), options).join();
|
|
407
|
+
/* stream.video.coordinator.client_v1_rpc.WebsocketHealthcheck healthcheck = 20; */
|
|
408
|
+
if (message.event.oneofKind === "healthcheck")
|
|
409
|
+
WebsocketHealthcheck.internalBinaryWrite(message.event.healthcheck, writer.tag(20, WireType.LengthDelimited).fork(), options).join();
|
|
410
|
+
/* stream.video.coordinator.event_v1.CallCreated call_created = 30; */
|
|
411
|
+
if (message.event.oneofKind === "callCreated")
|
|
412
|
+
CallCreated.internalBinaryWrite(message.event.callCreated, writer.tag(30, WireType.LengthDelimited).fork(), options).join();
|
|
413
|
+
/* stream.video.coordinator.event_v1.CallUpdated call_updated = 31; */
|
|
414
|
+
if (message.event.oneofKind === "callUpdated")
|
|
415
|
+
CallUpdated.internalBinaryWrite(message.event.callUpdated, writer.tag(31, WireType.LengthDelimited).fork(), options).join();
|
|
416
|
+
/* stream.video.coordinator.event_v1.CallDeleted call_deleted = 32; */
|
|
417
|
+
if (message.event.oneofKind === "callDeleted")
|
|
418
|
+
CallDeleted.internalBinaryWrite(message.event.callDeleted, writer.tag(32, WireType.LengthDelimited).fork(), options).join();
|
|
419
|
+
/* stream.video.coordinator.event_v1.CallMembersCreated call_members_created = 33; */
|
|
420
|
+
if (message.event.oneofKind === "callMembersCreated")
|
|
421
|
+
CallMembersCreated.internalBinaryWrite(message.event.callMembersCreated, writer.tag(33, WireType.LengthDelimited).fork(), options).join();
|
|
422
|
+
/* stream.video.coordinator.event_v1.CallMembersUpdated call_members_updated = 34; */
|
|
423
|
+
if (message.event.oneofKind === "callMembersUpdated")
|
|
424
|
+
CallMembersUpdated.internalBinaryWrite(message.event.callMembersUpdated, writer.tag(34, WireType.LengthDelimited).fork(), options).join();
|
|
425
|
+
/* stream.video.coordinator.event_v1.CallMembersDeleted call_members_deleted = 35; */
|
|
426
|
+
if (message.event.oneofKind === "callMembersDeleted")
|
|
427
|
+
CallMembersDeleted.internalBinaryWrite(message.event.callMembersDeleted, writer.tag(35, WireType.LengthDelimited).fork(), options).join();
|
|
428
|
+
/* stream.video.coordinator.event_v1.CallEnded call_ended = 36; */
|
|
429
|
+
if (message.event.oneofKind === "callEnded")
|
|
430
|
+
CallEnded.internalBinaryWrite(message.event.callEnded, writer.tag(36, WireType.LengthDelimited).fork(), options).join();
|
|
431
|
+
/* stream.video.coordinator.event_v1.CallAccepted call_accepted = 40; */
|
|
432
|
+
if (message.event.oneofKind === "callAccepted")
|
|
433
|
+
CallAccepted.internalBinaryWrite(message.event.callAccepted, writer.tag(40, WireType.LengthDelimited).fork(), options).join();
|
|
434
|
+
/* stream.video.coordinator.event_v1.CallRejected call_rejected = 41; */
|
|
435
|
+
if (message.event.oneofKind === "callRejected")
|
|
436
|
+
CallRejected.internalBinaryWrite(message.event.callRejected, writer.tag(41, WireType.LengthDelimited).fork(), options).join();
|
|
437
|
+
/* stream.video.coordinator.event_v1.CallCancelled call_cancelled = 42; */
|
|
438
|
+
if (message.event.oneofKind === "callCancelled")
|
|
439
|
+
CallCancelled.internalBinaryWrite(message.event.callCancelled, writer.tag(42, WireType.LengthDelimited).fork(), options).join();
|
|
440
|
+
/* stream.video.coordinator.event_v1.UserUpdated user_updated = 50; */
|
|
441
|
+
if (message.event.oneofKind === "userUpdated")
|
|
442
|
+
UserUpdated.internalBinaryWrite(message.event.userUpdated, writer.tag(50, WireType.LengthDelimited).fork(), options).join();
|
|
443
|
+
/* stream.video.coordinator.event_v1.CallCustom call_custom = 99; */
|
|
444
|
+
if (message.event.oneofKind === "callCustom")
|
|
445
|
+
CallCustom.internalBinaryWrite(message.event.callCustom, writer.tag(99, WireType.LengthDelimited).fork(), options).join();
|
|
446
|
+
let u = options.writeUnknownFields;
|
|
447
|
+
if (u !== false)
|
|
448
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
449
|
+
return writer;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* @generated MessageType for protobuf message stream.video.coordinator.client_v1_rpc.WebsocketEvent
|
|
454
|
+
*/
|
|
455
|
+
export const WebsocketEvent = new WebsocketEvent$Type();
|
|
456
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
457
|
+
class WebsocketClientEvent$Type extends MessageType<WebsocketClientEvent> {
|
|
458
|
+
constructor() {
|
|
459
|
+
super("stream.video.coordinator.client_v1_rpc.WebsocketClientEvent", [
|
|
460
|
+
{ no: 1, name: "healthcheck", kind: "message", oneof: "event", T: () => WebsocketHealthcheck },
|
|
461
|
+
{ no: 2, name: "auth_request", kind: "message", oneof: "event", T: () => WebsocketAuthRequest }
|
|
462
|
+
]);
|
|
463
|
+
}
|
|
464
|
+
create(value?: PartialMessage<WebsocketClientEvent>): WebsocketClientEvent {
|
|
465
|
+
const message = { event: { oneofKind: undefined } };
|
|
466
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
467
|
+
if (value !== undefined)
|
|
468
|
+
reflectionMergePartial<WebsocketClientEvent>(this, message, value);
|
|
469
|
+
return message;
|
|
470
|
+
}
|
|
471
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WebsocketClientEvent): WebsocketClientEvent {
|
|
472
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
473
|
+
while (reader.pos < end) {
|
|
474
|
+
let [fieldNo, wireType] = reader.tag();
|
|
475
|
+
switch (fieldNo) {
|
|
476
|
+
case /* stream.video.coordinator.client_v1_rpc.WebsocketHealthcheck healthcheck */ 1:
|
|
477
|
+
message.event = {
|
|
478
|
+
oneofKind: "healthcheck",
|
|
479
|
+
healthcheck: WebsocketHealthcheck.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).healthcheck)
|
|
480
|
+
};
|
|
481
|
+
break;
|
|
482
|
+
case /* stream.video.coordinator.client_v1_rpc.WebsocketAuthRequest auth_request */ 2:
|
|
483
|
+
message.event = {
|
|
484
|
+
oneofKind: "authRequest",
|
|
485
|
+
authRequest: WebsocketAuthRequest.internalBinaryRead(reader, reader.uint32(), options, (message.event as any).authRequest)
|
|
486
|
+
};
|
|
487
|
+
break;
|
|
488
|
+
default:
|
|
489
|
+
let u = options.readUnknownField;
|
|
490
|
+
if (u === "throw")
|
|
491
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
492
|
+
let d = reader.skip(wireType);
|
|
493
|
+
if (u !== false)
|
|
494
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
return message;
|
|
498
|
+
}
|
|
499
|
+
internalBinaryWrite(message: WebsocketClientEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
500
|
+
/* stream.video.coordinator.client_v1_rpc.WebsocketHealthcheck healthcheck = 1; */
|
|
501
|
+
if (message.event.oneofKind === "healthcheck")
|
|
502
|
+
WebsocketHealthcheck.internalBinaryWrite(message.event.healthcheck, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
503
|
+
/* stream.video.coordinator.client_v1_rpc.WebsocketAuthRequest auth_request = 2; */
|
|
504
|
+
if (message.event.oneofKind === "authRequest")
|
|
505
|
+
WebsocketAuthRequest.internalBinaryWrite(message.event.authRequest, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
506
|
+
let u = options.writeUnknownFields;
|
|
507
|
+
if (u !== false)
|
|
508
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
509
|
+
return writer;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* @generated MessageType for protobuf message stream.video.coordinator.client_v1_rpc.WebsocketClientEvent
|
|
514
|
+
*/
|
|
515
|
+
export const WebsocketClientEvent = new WebsocketClientEvent$Type();
|
|
516
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
517
|
+
class WebsocketAuthRequest$Type extends MessageType<WebsocketAuthRequest> {
|
|
518
|
+
constructor() {
|
|
519
|
+
super("stream.video.coordinator.client_v1_rpc.WebsocketAuthRequest", [
|
|
520
|
+
{ no: 1, name: "api_key", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
521
|
+
{ no: 2, name: "token", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
522
|
+
{ no: 3, name: "user", kind: "message", T: () => UserInput },
|
|
523
|
+
{ no: 4, name: "device", kind: "message", T: () => DeviceInput }
|
|
524
|
+
]);
|
|
525
|
+
}
|
|
526
|
+
create(value?: PartialMessage<WebsocketAuthRequest>): WebsocketAuthRequest {
|
|
527
|
+
const message = { apiKey: "", token: "" };
|
|
528
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
529
|
+
if (value !== undefined)
|
|
530
|
+
reflectionMergePartial<WebsocketAuthRequest>(this, message, value);
|
|
531
|
+
return message;
|
|
532
|
+
}
|
|
533
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WebsocketAuthRequest): WebsocketAuthRequest {
|
|
534
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
535
|
+
while (reader.pos < end) {
|
|
536
|
+
let [fieldNo, wireType] = reader.tag();
|
|
537
|
+
switch (fieldNo) {
|
|
538
|
+
case /* string api_key */ 1:
|
|
539
|
+
message.apiKey = reader.string();
|
|
540
|
+
break;
|
|
541
|
+
case /* string token */ 2:
|
|
542
|
+
message.token = reader.string();
|
|
543
|
+
break;
|
|
544
|
+
case /* stream.video.coordinator.user_v1.UserInput user */ 3:
|
|
545
|
+
message.user = UserInput.internalBinaryRead(reader, reader.uint32(), options, message.user);
|
|
546
|
+
break;
|
|
547
|
+
case /* stream.video.coordinator.push_v1.DeviceInput device */ 4:
|
|
548
|
+
message.device = DeviceInput.internalBinaryRead(reader, reader.uint32(), options, message.device);
|
|
549
|
+
break;
|
|
550
|
+
default:
|
|
551
|
+
let u = options.readUnknownField;
|
|
552
|
+
if (u === "throw")
|
|
553
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
554
|
+
let d = reader.skip(wireType);
|
|
555
|
+
if (u !== false)
|
|
556
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
return message;
|
|
560
|
+
}
|
|
561
|
+
internalBinaryWrite(message: WebsocketAuthRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
562
|
+
/* string api_key = 1; */
|
|
563
|
+
if (message.apiKey !== "")
|
|
564
|
+
writer.tag(1, WireType.LengthDelimited).string(message.apiKey);
|
|
565
|
+
/* string token = 2; */
|
|
566
|
+
if (message.token !== "")
|
|
567
|
+
writer.tag(2, WireType.LengthDelimited).string(message.token);
|
|
568
|
+
/* stream.video.coordinator.user_v1.UserInput user = 3; */
|
|
569
|
+
if (message.user)
|
|
570
|
+
UserInput.internalBinaryWrite(message.user, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
571
|
+
/* stream.video.coordinator.push_v1.DeviceInput device = 4; */
|
|
572
|
+
if (message.device)
|
|
573
|
+
DeviceInput.internalBinaryWrite(message.device, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
574
|
+
let u = options.writeUnknownFields;
|
|
575
|
+
if (u !== false)
|
|
576
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
577
|
+
return writer;
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* @generated MessageType for protobuf message stream.video.coordinator.client_v1_rpc.WebsocketAuthRequest
|
|
582
|
+
*/
|
|
583
|
+
export const WebsocketAuthRequest = new WebsocketAuthRequest$Type();
|
|
584
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
585
|
+
class WebsocketHealthcheck$Type extends MessageType<WebsocketHealthcheck> {
|
|
586
|
+
constructor() {
|
|
587
|
+
super("stream.video.coordinator.client_v1_rpc.WebsocketHealthcheck", [
|
|
588
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
589
|
+
{ no: 2, name: "client_id", kind: "scalar", T: 9 /*ScalarType.STRING*/, options: { "validate.rules": { string: { minLen: "1" } } } },
|
|
590
|
+
{ no: 3, name: "call_type", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
591
|
+
{ no: 4, name: "call_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
592
|
+
{ no: 5, name: "video", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
593
|
+
{ no: 6, name: "audio", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
594
|
+
]);
|
|
595
|
+
}
|
|
596
|
+
create(value?: PartialMessage<WebsocketHealthcheck>): WebsocketHealthcheck {
|
|
597
|
+
const message = { userId: "", clientId: "", callType: "", callId: "", video: false, audio: false };
|
|
598
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
599
|
+
if (value !== undefined)
|
|
600
|
+
reflectionMergePartial<WebsocketHealthcheck>(this, message, value);
|
|
601
|
+
return message;
|
|
602
|
+
}
|
|
603
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WebsocketHealthcheck): WebsocketHealthcheck {
|
|
604
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
605
|
+
while (reader.pos < end) {
|
|
606
|
+
let [fieldNo, wireType] = reader.tag();
|
|
607
|
+
switch (fieldNo) {
|
|
608
|
+
case /* string user_id */ 1:
|
|
609
|
+
message.userId = reader.string();
|
|
610
|
+
break;
|
|
611
|
+
case /* string client_id */ 2:
|
|
612
|
+
message.clientId = reader.string();
|
|
613
|
+
break;
|
|
614
|
+
case /* string call_type */ 3:
|
|
615
|
+
message.callType = reader.string();
|
|
616
|
+
break;
|
|
617
|
+
case /* string call_id */ 4:
|
|
618
|
+
message.callId = reader.string();
|
|
619
|
+
break;
|
|
620
|
+
case /* bool video */ 5:
|
|
621
|
+
message.video = reader.bool();
|
|
622
|
+
break;
|
|
623
|
+
case /* bool audio */ 6:
|
|
624
|
+
message.audio = reader.bool();
|
|
625
|
+
break;
|
|
626
|
+
default:
|
|
627
|
+
let u = options.readUnknownField;
|
|
628
|
+
if (u === "throw")
|
|
629
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
630
|
+
let d = reader.skip(wireType);
|
|
631
|
+
if (u !== false)
|
|
632
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
return message;
|
|
636
|
+
}
|
|
637
|
+
internalBinaryWrite(message: WebsocketHealthcheck, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
638
|
+
/* string user_id = 1; */
|
|
639
|
+
if (message.userId !== "")
|
|
640
|
+
writer.tag(1, WireType.LengthDelimited).string(message.userId);
|
|
641
|
+
/* string client_id = 2; */
|
|
642
|
+
if (message.clientId !== "")
|
|
643
|
+
writer.tag(2, WireType.LengthDelimited).string(message.clientId);
|
|
644
|
+
/* string call_type = 3; */
|
|
645
|
+
if (message.callType !== "")
|
|
646
|
+
writer.tag(3, WireType.LengthDelimited).string(message.callType);
|
|
647
|
+
/* string call_id = 4; */
|
|
648
|
+
if (message.callId !== "")
|
|
649
|
+
writer.tag(4, WireType.LengthDelimited).string(message.callId);
|
|
650
|
+
/* bool video = 5; */
|
|
651
|
+
if (message.video !== false)
|
|
652
|
+
writer.tag(5, WireType.Varint).bool(message.video);
|
|
653
|
+
/* bool audio = 6; */
|
|
654
|
+
if (message.audio !== false)
|
|
655
|
+
writer.tag(6, WireType.Varint).bool(message.audio);
|
|
656
|
+
let u = options.writeUnknownFields;
|
|
657
|
+
if (u !== false)
|
|
658
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
659
|
+
return writer;
|
|
660
|
+
}
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* @generated MessageType for protobuf message stream.video.coordinator.client_v1_rpc.WebsocketHealthcheck
|
|
664
|
+
*/
|
|
665
|
+
export const WebsocketHealthcheck = new WebsocketHealthcheck$Type();
|
|
666
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
667
|
+
class WebsocketError$Type extends MessageType<WebsocketError> {
|
|
668
|
+
constructor() {
|
|
669
|
+
super("stream.video.coordinator.client_v1_rpc.WebsocketError", [
|
|
670
|
+
{ no: 1, name: "code", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
671
|
+
{ no: 2, name: "message", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
672
|
+
]);
|
|
673
|
+
}
|
|
674
|
+
create(value?: PartialMessage<WebsocketError>): WebsocketError {
|
|
675
|
+
const message = { code: 0, message: "" };
|
|
676
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
677
|
+
if (value !== undefined)
|
|
678
|
+
reflectionMergePartial<WebsocketError>(this, message, value);
|
|
679
|
+
return message;
|
|
680
|
+
}
|
|
681
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: WebsocketError): WebsocketError {
|
|
682
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
683
|
+
while (reader.pos < end) {
|
|
684
|
+
let [fieldNo, wireType] = reader.tag();
|
|
685
|
+
switch (fieldNo) {
|
|
686
|
+
case /* int32 code */ 1:
|
|
687
|
+
message.code = reader.int32();
|
|
688
|
+
break;
|
|
689
|
+
case /* string message */ 2:
|
|
690
|
+
message.message = reader.string();
|
|
691
|
+
break;
|
|
692
|
+
default:
|
|
693
|
+
let u = options.readUnknownField;
|
|
694
|
+
if (u === "throw")
|
|
695
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
696
|
+
let d = reader.skip(wireType);
|
|
697
|
+
if (u !== false)
|
|
698
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
return message;
|
|
702
|
+
}
|
|
703
|
+
internalBinaryWrite(message: WebsocketError, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
704
|
+
/* int32 code = 1; */
|
|
705
|
+
if (message.code !== 0)
|
|
706
|
+
writer.tag(1, WireType.Varint).int32(message.code);
|
|
707
|
+
/* string message = 2; */
|
|
708
|
+
if (message.message !== "")
|
|
709
|
+
writer.tag(2, WireType.LengthDelimited).string(message.message);
|
|
710
|
+
let u = options.writeUnknownFields;
|
|
711
|
+
if (u !== false)
|
|
712
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
713
|
+
return writer;
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
/**
|
|
717
|
+
* @generated MessageType for protobuf message stream.video.coordinator.client_v1_rpc.WebsocketError
|
|
718
|
+
*/
|
|
719
|
+
export const WebsocketError = new WebsocketError$Type();
|