@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,906 @@
|
|
|
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/sfu/signal_rpc/signal.proto" (package "stream.video.sfu.signal", syntax proto3)
|
|
4
|
+
// tslint:disable
|
|
5
|
+
import { ICETrickle } from "../models/models";
|
|
6
|
+
import { ServiceType } from "@protobuf-ts/runtime-rpc";
|
|
7
|
+
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
|
|
8
|
+
import type { IBinaryWriter } from "@protobuf-ts/runtime";
|
|
9
|
+
import { WireType } from "@protobuf-ts/runtime";
|
|
10
|
+
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
11
|
+
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
12
|
+
import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
13
|
+
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
14
|
+
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
15
|
+
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
|
16
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
17
|
+
import { TrackInfo } from "../models/models";
|
|
18
|
+
import { PeerType } from "../models/models";
|
|
19
|
+
import { VideoDimension } from "../models/models";
|
|
20
|
+
import { TrackType } from "../models/models";
|
|
21
|
+
import { Error } from "../models/models";
|
|
22
|
+
/**
|
|
23
|
+
* @generated from protobuf message stream.video.sfu.signal.UpdateMuteStatesRequest
|
|
24
|
+
*/
|
|
25
|
+
export interface UpdateMuteStatesRequest {
|
|
26
|
+
/**
|
|
27
|
+
* @generated from protobuf field: string session_id = 1;
|
|
28
|
+
*/
|
|
29
|
+
sessionId: string;
|
|
30
|
+
/**
|
|
31
|
+
* @generated from protobuf field: repeated stream.video.sfu.signal.TrackMuteState mute_states = 3;
|
|
32
|
+
*/
|
|
33
|
+
muteStates: TrackMuteState[];
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @generated from protobuf message stream.video.sfu.signal.UpdateMuteStatesResponse
|
|
37
|
+
*/
|
|
38
|
+
export interface UpdateMuteStatesResponse {
|
|
39
|
+
/**
|
|
40
|
+
* @generated from protobuf field: stream.video.sfu.models.Error error = 4;
|
|
41
|
+
*/
|
|
42
|
+
error?: Error;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @generated from protobuf message stream.video.sfu.signal.TrackMuteState
|
|
46
|
+
*/
|
|
47
|
+
export interface TrackMuteState {
|
|
48
|
+
/**
|
|
49
|
+
* @generated from protobuf field: stream.video.sfu.models.TrackType track_type = 1;
|
|
50
|
+
*/
|
|
51
|
+
trackType: TrackType;
|
|
52
|
+
/**
|
|
53
|
+
* @generated from protobuf field: bool muted = 2;
|
|
54
|
+
*/
|
|
55
|
+
muted: boolean;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* @generated from protobuf message stream.video.sfu.signal.AudioMuteChanged
|
|
59
|
+
*/
|
|
60
|
+
export interface AudioMuteChanged {
|
|
61
|
+
/**
|
|
62
|
+
* @generated from protobuf field: bool muted = 1;
|
|
63
|
+
*/
|
|
64
|
+
muted: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* @generated from protobuf message stream.video.sfu.signal.VideoMuteChanged
|
|
68
|
+
*/
|
|
69
|
+
export interface VideoMuteChanged {
|
|
70
|
+
/**
|
|
71
|
+
* @generated from protobuf field: bool muted = 2;
|
|
72
|
+
*/
|
|
73
|
+
muted: boolean;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* @generated from protobuf message stream.video.sfu.signal.UpdateSubscriptionsRequest
|
|
77
|
+
*/
|
|
78
|
+
export interface UpdateSubscriptionsRequest {
|
|
79
|
+
/**
|
|
80
|
+
* @generated from protobuf field: string session_id = 2;
|
|
81
|
+
*/
|
|
82
|
+
sessionId: string;
|
|
83
|
+
/**
|
|
84
|
+
* @generated from protobuf field: repeated stream.video.sfu.signal.TrackSubscriptionDetails tracks = 3;
|
|
85
|
+
*/
|
|
86
|
+
tracks: TrackSubscriptionDetails[];
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* @generated from protobuf message stream.video.sfu.signal.UpdateSubscriptionsResponse
|
|
90
|
+
*/
|
|
91
|
+
export interface UpdateSubscriptionsResponse {
|
|
92
|
+
/**
|
|
93
|
+
* @generated from protobuf field: stream.video.sfu.models.Error error = 4;
|
|
94
|
+
*/
|
|
95
|
+
error?: Error;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* @generated from protobuf message stream.video.sfu.signal.TrackSubscriptionDetails
|
|
99
|
+
*/
|
|
100
|
+
export interface TrackSubscriptionDetails {
|
|
101
|
+
/**
|
|
102
|
+
* @generated from protobuf field: string user_id = 1;
|
|
103
|
+
*/
|
|
104
|
+
userId: string;
|
|
105
|
+
/**
|
|
106
|
+
* @generated from protobuf field: string session_id = 2;
|
|
107
|
+
*/
|
|
108
|
+
sessionId: string;
|
|
109
|
+
/**
|
|
110
|
+
* @generated from protobuf field: stream.video.sfu.models.TrackType track_type = 3;
|
|
111
|
+
*/
|
|
112
|
+
trackType: TrackType;
|
|
113
|
+
/**
|
|
114
|
+
* @generated from protobuf field: stream.video.sfu.models.VideoDimension dimension = 4;
|
|
115
|
+
*/
|
|
116
|
+
dimension?: VideoDimension;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* @generated from protobuf message stream.video.sfu.signal.SendAnswerRequest
|
|
120
|
+
*/
|
|
121
|
+
export interface SendAnswerRequest {
|
|
122
|
+
/**
|
|
123
|
+
* @generated from protobuf field: stream.video.sfu.models.PeerType peer_type = 1;
|
|
124
|
+
*/
|
|
125
|
+
peerType: PeerType;
|
|
126
|
+
/**
|
|
127
|
+
* @generated from protobuf field: string sdp = 2;
|
|
128
|
+
*/
|
|
129
|
+
sdp: string;
|
|
130
|
+
/**
|
|
131
|
+
* @generated from protobuf field: string session_id = 3;
|
|
132
|
+
*/
|
|
133
|
+
sessionId: string;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* @generated from protobuf message stream.video.sfu.signal.SendAnswerResponse
|
|
137
|
+
*/
|
|
138
|
+
export interface SendAnswerResponse {
|
|
139
|
+
/**
|
|
140
|
+
* @generated from protobuf field: stream.video.sfu.models.Error error = 4;
|
|
141
|
+
*/
|
|
142
|
+
error?: Error;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* @generated from protobuf message stream.video.sfu.signal.ICETrickleResponse
|
|
146
|
+
*/
|
|
147
|
+
export interface ICETrickleResponse {
|
|
148
|
+
/**
|
|
149
|
+
* @generated from protobuf field: stream.video.sfu.models.Error error = 4;
|
|
150
|
+
*/
|
|
151
|
+
error?: Error;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* @generated from protobuf message stream.video.sfu.signal.SetPublisherRequest
|
|
155
|
+
*/
|
|
156
|
+
export interface SetPublisherRequest {
|
|
157
|
+
/**
|
|
158
|
+
* sdp offer
|
|
159
|
+
*
|
|
160
|
+
* @generated from protobuf field: string sdp = 1;
|
|
161
|
+
*/
|
|
162
|
+
sdp: string;
|
|
163
|
+
/**
|
|
164
|
+
* @generated from protobuf field: string session_id = 2;
|
|
165
|
+
*/
|
|
166
|
+
sessionId: string;
|
|
167
|
+
/**
|
|
168
|
+
* @generated from protobuf field: repeated stream.video.sfu.models.TrackInfo tracks = 3;
|
|
169
|
+
*/
|
|
170
|
+
tracks: TrackInfo[];
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* @generated from protobuf message stream.video.sfu.signal.SetPublisherResponse
|
|
174
|
+
*/
|
|
175
|
+
export interface SetPublisherResponse {
|
|
176
|
+
/**
|
|
177
|
+
* sdp answer
|
|
178
|
+
*
|
|
179
|
+
* @generated from protobuf field: string sdp = 1;
|
|
180
|
+
*/
|
|
181
|
+
sdp: string;
|
|
182
|
+
/**
|
|
183
|
+
* @generated from protobuf field: string session_id = 2;
|
|
184
|
+
*/
|
|
185
|
+
sessionId: string;
|
|
186
|
+
/**
|
|
187
|
+
* @generated from protobuf field: bool ice_restart = 3;
|
|
188
|
+
*/
|
|
189
|
+
iceRestart: boolean;
|
|
190
|
+
/**
|
|
191
|
+
* @generated from protobuf field: stream.video.sfu.models.Error error = 4;
|
|
192
|
+
*/
|
|
193
|
+
error?: Error;
|
|
194
|
+
}
|
|
195
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
196
|
+
class UpdateMuteStatesRequest$Type extends MessageType<UpdateMuteStatesRequest> {
|
|
197
|
+
constructor() {
|
|
198
|
+
super("stream.video.sfu.signal.UpdateMuteStatesRequest", [
|
|
199
|
+
{ no: 1, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
200
|
+
{ no: 3, name: "mute_states", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TrackMuteState }
|
|
201
|
+
]);
|
|
202
|
+
}
|
|
203
|
+
create(value?: PartialMessage<UpdateMuteStatesRequest>): UpdateMuteStatesRequest {
|
|
204
|
+
const message = { sessionId: "", muteStates: [] };
|
|
205
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
206
|
+
if (value !== undefined)
|
|
207
|
+
reflectionMergePartial<UpdateMuteStatesRequest>(this, message, value);
|
|
208
|
+
return message;
|
|
209
|
+
}
|
|
210
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateMuteStatesRequest): UpdateMuteStatesRequest {
|
|
211
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
212
|
+
while (reader.pos < end) {
|
|
213
|
+
let [fieldNo, wireType] = reader.tag();
|
|
214
|
+
switch (fieldNo) {
|
|
215
|
+
case /* string session_id */ 1:
|
|
216
|
+
message.sessionId = reader.string();
|
|
217
|
+
break;
|
|
218
|
+
case /* repeated stream.video.sfu.signal.TrackMuteState mute_states */ 3:
|
|
219
|
+
message.muteStates.push(TrackMuteState.internalBinaryRead(reader, reader.uint32(), options));
|
|
220
|
+
break;
|
|
221
|
+
default:
|
|
222
|
+
let u = options.readUnknownField;
|
|
223
|
+
if (u === "throw")
|
|
224
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
225
|
+
let d = reader.skip(wireType);
|
|
226
|
+
if (u !== false)
|
|
227
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return message;
|
|
231
|
+
}
|
|
232
|
+
internalBinaryWrite(message: UpdateMuteStatesRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
233
|
+
/* string session_id = 1; */
|
|
234
|
+
if (message.sessionId !== "")
|
|
235
|
+
writer.tag(1, WireType.LengthDelimited).string(message.sessionId);
|
|
236
|
+
/* repeated stream.video.sfu.signal.TrackMuteState mute_states = 3; */
|
|
237
|
+
for (let i = 0; i < message.muteStates.length; i++)
|
|
238
|
+
TrackMuteState.internalBinaryWrite(message.muteStates[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
239
|
+
let u = options.writeUnknownFields;
|
|
240
|
+
if (u !== false)
|
|
241
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
242
|
+
return writer;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* @generated MessageType for protobuf message stream.video.sfu.signal.UpdateMuteStatesRequest
|
|
247
|
+
*/
|
|
248
|
+
export const UpdateMuteStatesRequest = new UpdateMuteStatesRequest$Type();
|
|
249
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
250
|
+
class UpdateMuteStatesResponse$Type extends MessageType<UpdateMuteStatesResponse> {
|
|
251
|
+
constructor() {
|
|
252
|
+
super("stream.video.sfu.signal.UpdateMuteStatesResponse", [
|
|
253
|
+
{ no: 4, name: "error", kind: "message", T: () => Error }
|
|
254
|
+
]);
|
|
255
|
+
}
|
|
256
|
+
create(value?: PartialMessage<UpdateMuteStatesResponse>): UpdateMuteStatesResponse {
|
|
257
|
+
const message = {};
|
|
258
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
259
|
+
if (value !== undefined)
|
|
260
|
+
reflectionMergePartial<UpdateMuteStatesResponse>(this, message, value);
|
|
261
|
+
return message;
|
|
262
|
+
}
|
|
263
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateMuteStatesResponse): UpdateMuteStatesResponse {
|
|
264
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
265
|
+
while (reader.pos < end) {
|
|
266
|
+
let [fieldNo, wireType] = reader.tag();
|
|
267
|
+
switch (fieldNo) {
|
|
268
|
+
case /* stream.video.sfu.models.Error error */ 4:
|
|
269
|
+
message.error = Error.internalBinaryRead(reader, reader.uint32(), options, message.error);
|
|
270
|
+
break;
|
|
271
|
+
default:
|
|
272
|
+
let u = options.readUnknownField;
|
|
273
|
+
if (u === "throw")
|
|
274
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
275
|
+
let d = reader.skip(wireType);
|
|
276
|
+
if (u !== false)
|
|
277
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return message;
|
|
281
|
+
}
|
|
282
|
+
internalBinaryWrite(message: UpdateMuteStatesResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
283
|
+
/* stream.video.sfu.models.Error error = 4; */
|
|
284
|
+
if (message.error)
|
|
285
|
+
Error.internalBinaryWrite(message.error, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
286
|
+
let u = options.writeUnknownFields;
|
|
287
|
+
if (u !== false)
|
|
288
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
289
|
+
return writer;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* @generated MessageType for protobuf message stream.video.sfu.signal.UpdateMuteStatesResponse
|
|
294
|
+
*/
|
|
295
|
+
export const UpdateMuteStatesResponse = new UpdateMuteStatesResponse$Type();
|
|
296
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
297
|
+
class TrackMuteState$Type extends MessageType<TrackMuteState> {
|
|
298
|
+
constructor() {
|
|
299
|
+
super("stream.video.sfu.signal.TrackMuteState", [
|
|
300
|
+
{ no: 1, name: "track_type", kind: "enum", T: () => ["stream.video.sfu.models.TrackType", TrackType, "TRACK_TYPE_"] },
|
|
301
|
+
{ no: 2, name: "muted", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
302
|
+
]);
|
|
303
|
+
}
|
|
304
|
+
create(value?: PartialMessage<TrackMuteState>): TrackMuteState {
|
|
305
|
+
const message = { trackType: 0, muted: false };
|
|
306
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
307
|
+
if (value !== undefined)
|
|
308
|
+
reflectionMergePartial<TrackMuteState>(this, message, value);
|
|
309
|
+
return message;
|
|
310
|
+
}
|
|
311
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackMuteState): TrackMuteState {
|
|
312
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
313
|
+
while (reader.pos < end) {
|
|
314
|
+
let [fieldNo, wireType] = reader.tag();
|
|
315
|
+
switch (fieldNo) {
|
|
316
|
+
case /* stream.video.sfu.models.TrackType track_type */ 1:
|
|
317
|
+
message.trackType = reader.int32();
|
|
318
|
+
break;
|
|
319
|
+
case /* bool muted */ 2:
|
|
320
|
+
message.muted = reader.bool();
|
|
321
|
+
break;
|
|
322
|
+
default:
|
|
323
|
+
let u = options.readUnknownField;
|
|
324
|
+
if (u === "throw")
|
|
325
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
326
|
+
let d = reader.skip(wireType);
|
|
327
|
+
if (u !== false)
|
|
328
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
return message;
|
|
332
|
+
}
|
|
333
|
+
internalBinaryWrite(message: TrackMuteState, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
334
|
+
/* stream.video.sfu.models.TrackType track_type = 1; */
|
|
335
|
+
if (message.trackType !== 0)
|
|
336
|
+
writer.tag(1, WireType.Varint).int32(message.trackType);
|
|
337
|
+
/* bool muted = 2; */
|
|
338
|
+
if (message.muted !== false)
|
|
339
|
+
writer.tag(2, WireType.Varint).bool(message.muted);
|
|
340
|
+
let u = options.writeUnknownFields;
|
|
341
|
+
if (u !== false)
|
|
342
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
343
|
+
return writer;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* @generated MessageType for protobuf message stream.video.sfu.signal.TrackMuteState
|
|
348
|
+
*/
|
|
349
|
+
export const TrackMuteState = new TrackMuteState$Type();
|
|
350
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
351
|
+
class AudioMuteChanged$Type extends MessageType<AudioMuteChanged> {
|
|
352
|
+
constructor() {
|
|
353
|
+
super("stream.video.sfu.signal.AudioMuteChanged", [
|
|
354
|
+
{ no: 1, name: "muted", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
355
|
+
]);
|
|
356
|
+
}
|
|
357
|
+
create(value?: PartialMessage<AudioMuteChanged>): AudioMuteChanged {
|
|
358
|
+
const message = { muted: false };
|
|
359
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
360
|
+
if (value !== undefined)
|
|
361
|
+
reflectionMergePartial<AudioMuteChanged>(this, message, value);
|
|
362
|
+
return message;
|
|
363
|
+
}
|
|
364
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AudioMuteChanged): AudioMuteChanged {
|
|
365
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
366
|
+
while (reader.pos < end) {
|
|
367
|
+
let [fieldNo, wireType] = reader.tag();
|
|
368
|
+
switch (fieldNo) {
|
|
369
|
+
case /* bool muted */ 1:
|
|
370
|
+
message.muted = reader.bool();
|
|
371
|
+
break;
|
|
372
|
+
default:
|
|
373
|
+
let u = options.readUnknownField;
|
|
374
|
+
if (u === "throw")
|
|
375
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
376
|
+
let d = reader.skip(wireType);
|
|
377
|
+
if (u !== false)
|
|
378
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
return message;
|
|
382
|
+
}
|
|
383
|
+
internalBinaryWrite(message: AudioMuteChanged, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
384
|
+
/* bool muted = 1; */
|
|
385
|
+
if (message.muted !== false)
|
|
386
|
+
writer.tag(1, WireType.Varint).bool(message.muted);
|
|
387
|
+
let u = options.writeUnknownFields;
|
|
388
|
+
if (u !== false)
|
|
389
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
390
|
+
return writer;
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* @generated MessageType for protobuf message stream.video.sfu.signal.AudioMuteChanged
|
|
395
|
+
*/
|
|
396
|
+
export const AudioMuteChanged = new AudioMuteChanged$Type();
|
|
397
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
398
|
+
class VideoMuteChanged$Type extends MessageType<VideoMuteChanged> {
|
|
399
|
+
constructor() {
|
|
400
|
+
super("stream.video.sfu.signal.VideoMuteChanged", [
|
|
401
|
+
{ no: 2, name: "muted", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
402
|
+
]);
|
|
403
|
+
}
|
|
404
|
+
create(value?: PartialMessage<VideoMuteChanged>): VideoMuteChanged {
|
|
405
|
+
const message = { muted: false };
|
|
406
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
407
|
+
if (value !== undefined)
|
|
408
|
+
reflectionMergePartial<VideoMuteChanged>(this, message, value);
|
|
409
|
+
return message;
|
|
410
|
+
}
|
|
411
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: VideoMuteChanged): VideoMuteChanged {
|
|
412
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
413
|
+
while (reader.pos < end) {
|
|
414
|
+
let [fieldNo, wireType] = reader.tag();
|
|
415
|
+
switch (fieldNo) {
|
|
416
|
+
case /* bool muted */ 2:
|
|
417
|
+
message.muted = reader.bool();
|
|
418
|
+
break;
|
|
419
|
+
default:
|
|
420
|
+
let u = options.readUnknownField;
|
|
421
|
+
if (u === "throw")
|
|
422
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
423
|
+
let d = reader.skip(wireType);
|
|
424
|
+
if (u !== false)
|
|
425
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
return message;
|
|
429
|
+
}
|
|
430
|
+
internalBinaryWrite(message: VideoMuteChanged, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
431
|
+
/* bool muted = 2; */
|
|
432
|
+
if (message.muted !== false)
|
|
433
|
+
writer.tag(2, WireType.Varint).bool(message.muted);
|
|
434
|
+
let u = options.writeUnknownFields;
|
|
435
|
+
if (u !== false)
|
|
436
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
437
|
+
return writer;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* @generated MessageType for protobuf message stream.video.sfu.signal.VideoMuteChanged
|
|
442
|
+
*/
|
|
443
|
+
export const VideoMuteChanged = new VideoMuteChanged$Type();
|
|
444
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
445
|
+
class UpdateSubscriptionsRequest$Type extends MessageType<UpdateSubscriptionsRequest> {
|
|
446
|
+
constructor() {
|
|
447
|
+
super("stream.video.sfu.signal.UpdateSubscriptionsRequest", [
|
|
448
|
+
{ no: 2, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
449
|
+
{ no: 3, name: "tracks", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TrackSubscriptionDetails }
|
|
450
|
+
]);
|
|
451
|
+
}
|
|
452
|
+
create(value?: PartialMessage<UpdateSubscriptionsRequest>): UpdateSubscriptionsRequest {
|
|
453
|
+
const message = { sessionId: "", tracks: [] };
|
|
454
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
455
|
+
if (value !== undefined)
|
|
456
|
+
reflectionMergePartial<UpdateSubscriptionsRequest>(this, message, value);
|
|
457
|
+
return message;
|
|
458
|
+
}
|
|
459
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateSubscriptionsRequest): UpdateSubscriptionsRequest {
|
|
460
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
461
|
+
while (reader.pos < end) {
|
|
462
|
+
let [fieldNo, wireType] = reader.tag();
|
|
463
|
+
switch (fieldNo) {
|
|
464
|
+
case /* string session_id */ 2:
|
|
465
|
+
message.sessionId = reader.string();
|
|
466
|
+
break;
|
|
467
|
+
case /* repeated stream.video.sfu.signal.TrackSubscriptionDetails tracks */ 3:
|
|
468
|
+
message.tracks.push(TrackSubscriptionDetails.internalBinaryRead(reader, reader.uint32(), options));
|
|
469
|
+
break;
|
|
470
|
+
default:
|
|
471
|
+
let u = options.readUnknownField;
|
|
472
|
+
if (u === "throw")
|
|
473
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
474
|
+
let d = reader.skip(wireType);
|
|
475
|
+
if (u !== false)
|
|
476
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
return message;
|
|
480
|
+
}
|
|
481
|
+
internalBinaryWrite(message: UpdateSubscriptionsRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
482
|
+
/* string session_id = 2; */
|
|
483
|
+
if (message.sessionId !== "")
|
|
484
|
+
writer.tag(2, WireType.LengthDelimited).string(message.sessionId);
|
|
485
|
+
/* repeated stream.video.sfu.signal.TrackSubscriptionDetails tracks = 3; */
|
|
486
|
+
for (let i = 0; i < message.tracks.length; i++)
|
|
487
|
+
TrackSubscriptionDetails.internalBinaryWrite(message.tracks[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
488
|
+
let u = options.writeUnknownFields;
|
|
489
|
+
if (u !== false)
|
|
490
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
491
|
+
return writer;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* @generated MessageType for protobuf message stream.video.sfu.signal.UpdateSubscriptionsRequest
|
|
496
|
+
*/
|
|
497
|
+
export const UpdateSubscriptionsRequest = new UpdateSubscriptionsRequest$Type();
|
|
498
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
499
|
+
class UpdateSubscriptionsResponse$Type extends MessageType<UpdateSubscriptionsResponse> {
|
|
500
|
+
constructor() {
|
|
501
|
+
super("stream.video.sfu.signal.UpdateSubscriptionsResponse", [
|
|
502
|
+
{ no: 4, name: "error", kind: "message", T: () => Error }
|
|
503
|
+
]);
|
|
504
|
+
}
|
|
505
|
+
create(value?: PartialMessage<UpdateSubscriptionsResponse>): UpdateSubscriptionsResponse {
|
|
506
|
+
const message = {};
|
|
507
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
508
|
+
if (value !== undefined)
|
|
509
|
+
reflectionMergePartial<UpdateSubscriptionsResponse>(this, message, value);
|
|
510
|
+
return message;
|
|
511
|
+
}
|
|
512
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: UpdateSubscriptionsResponse): UpdateSubscriptionsResponse {
|
|
513
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
514
|
+
while (reader.pos < end) {
|
|
515
|
+
let [fieldNo, wireType] = reader.tag();
|
|
516
|
+
switch (fieldNo) {
|
|
517
|
+
case /* stream.video.sfu.models.Error error */ 4:
|
|
518
|
+
message.error = Error.internalBinaryRead(reader, reader.uint32(), options, message.error);
|
|
519
|
+
break;
|
|
520
|
+
default:
|
|
521
|
+
let u = options.readUnknownField;
|
|
522
|
+
if (u === "throw")
|
|
523
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
524
|
+
let d = reader.skip(wireType);
|
|
525
|
+
if (u !== false)
|
|
526
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
return message;
|
|
530
|
+
}
|
|
531
|
+
internalBinaryWrite(message: UpdateSubscriptionsResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
532
|
+
/* stream.video.sfu.models.Error error = 4; */
|
|
533
|
+
if (message.error)
|
|
534
|
+
Error.internalBinaryWrite(message.error, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
535
|
+
let u = options.writeUnknownFields;
|
|
536
|
+
if (u !== false)
|
|
537
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
538
|
+
return writer;
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* @generated MessageType for protobuf message stream.video.sfu.signal.UpdateSubscriptionsResponse
|
|
543
|
+
*/
|
|
544
|
+
export const UpdateSubscriptionsResponse = new UpdateSubscriptionsResponse$Type();
|
|
545
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
546
|
+
class TrackSubscriptionDetails$Type extends MessageType<TrackSubscriptionDetails> {
|
|
547
|
+
constructor() {
|
|
548
|
+
super("stream.video.sfu.signal.TrackSubscriptionDetails", [
|
|
549
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
550
|
+
{ no: 2, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
551
|
+
{ no: 3, name: "track_type", kind: "enum", T: () => ["stream.video.sfu.models.TrackType", TrackType, "TRACK_TYPE_"] },
|
|
552
|
+
{ no: 4, name: "dimension", kind: "message", T: () => VideoDimension }
|
|
553
|
+
]);
|
|
554
|
+
}
|
|
555
|
+
create(value?: PartialMessage<TrackSubscriptionDetails>): TrackSubscriptionDetails {
|
|
556
|
+
const message = { userId: "", sessionId: "", trackType: 0 };
|
|
557
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
558
|
+
if (value !== undefined)
|
|
559
|
+
reflectionMergePartial<TrackSubscriptionDetails>(this, message, value);
|
|
560
|
+
return message;
|
|
561
|
+
}
|
|
562
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackSubscriptionDetails): TrackSubscriptionDetails {
|
|
563
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
564
|
+
while (reader.pos < end) {
|
|
565
|
+
let [fieldNo, wireType] = reader.tag();
|
|
566
|
+
switch (fieldNo) {
|
|
567
|
+
case /* string user_id */ 1:
|
|
568
|
+
message.userId = reader.string();
|
|
569
|
+
break;
|
|
570
|
+
case /* string session_id */ 2:
|
|
571
|
+
message.sessionId = reader.string();
|
|
572
|
+
break;
|
|
573
|
+
case /* stream.video.sfu.models.TrackType track_type */ 3:
|
|
574
|
+
message.trackType = reader.int32();
|
|
575
|
+
break;
|
|
576
|
+
case /* stream.video.sfu.models.VideoDimension dimension */ 4:
|
|
577
|
+
message.dimension = VideoDimension.internalBinaryRead(reader, reader.uint32(), options, message.dimension);
|
|
578
|
+
break;
|
|
579
|
+
default:
|
|
580
|
+
let u = options.readUnknownField;
|
|
581
|
+
if (u === "throw")
|
|
582
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
583
|
+
let d = reader.skip(wireType);
|
|
584
|
+
if (u !== false)
|
|
585
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
586
|
+
}
|
|
587
|
+
}
|
|
588
|
+
return message;
|
|
589
|
+
}
|
|
590
|
+
internalBinaryWrite(message: TrackSubscriptionDetails, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
591
|
+
/* string user_id = 1; */
|
|
592
|
+
if (message.userId !== "")
|
|
593
|
+
writer.tag(1, WireType.LengthDelimited).string(message.userId);
|
|
594
|
+
/* string session_id = 2; */
|
|
595
|
+
if (message.sessionId !== "")
|
|
596
|
+
writer.tag(2, WireType.LengthDelimited).string(message.sessionId);
|
|
597
|
+
/* stream.video.sfu.models.TrackType track_type = 3; */
|
|
598
|
+
if (message.trackType !== 0)
|
|
599
|
+
writer.tag(3, WireType.Varint).int32(message.trackType);
|
|
600
|
+
/* stream.video.sfu.models.VideoDimension dimension = 4; */
|
|
601
|
+
if (message.dimension)
|
|
602
|
+
VideoDimension.internalBinaryWrite(message.dimension, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
603
|
+
let u = options.writeUnknownFields;
|
|
604
|
+
if (u !== false)
|
|
605
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
606
|
+
return writer;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
/**
|
|
610
|
+
* @generated MessageType for protobuf message stream.video.sfu.signal.TrackSubscriptionDetails
|
|
611
|
+
*/
|
|
612
|
+
export const TrackSubscriptionDetails = new TrackSubscriptionDetails$Type();
|
|
613
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
614
|
+
class SendAnswerRequest$Type extends MessageType<SendAnswerRequest> {
|
|
615
|
+
constructor() {
|
|
616
|
+
super("stream.video.sfu.signal.SendAnswerRequest", [
|
|
617
|
+
{ no: 1, name: "peer_type", kind: "enum", T: () => ["stream.video.sfu.models.PeerType", PeerType, "PEER_TYPE_"] },
|
|
618
|
+
{ no: 2, name: "sdp", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
619
|
+
{ no: 3, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
620
|
+
]);
|
|
621
|
+
}
|
|
622
|
+
create(value?: PartialMessage<SendAnswerRequest>): SendAnswerRequest {
|
|
623
|
+
const message = { peerType: 0, sdp: "", sessionId: "" };
|
|
624
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
625
|
+
if (value !== undefined)
|
|
626
|
+
reflectionMergePartial<SendAnswerRequest>(this, message, value);
|
|
627
|
+
return message;
|
|
628
|
+
}
|
|
629
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendAnswerRequest): SendAnswerRequest {
|
|
630
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
631
|
+
while (reader.pos < end) {
|
|
632
|
+
let [fieldNo, wireType] = reader.tag();
|
|
633
|
+
switch (fieldNo) {
|
|
634
|
+
case /* stream.video.sfu.models.PeerType peer_type */ 1:
|
|
635
|
+
message.peerType = reader.int32();
|
|
636
|
+
break;
|
|
637
|
+
case /* string sdp */ 2:
|
|
638
|
+
message.sdp = reader.string();
|
|
639
|
+
break;
|
|
640
|
+
case /* string session_id */ 3:
|
|
641
|
+
message.sessionId = reader.string();
|
|
642
|
+
break;
|
|
643
|
+
default:
|
|
644
|
+
let u = options.readUnknownField;
|
|
645
|
+
if (u === "throw")
|
|
646
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
647
|
+
let d = reader.skip(wireType);
|
|
648
|
+
if (u !== false)
|
|
649
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
return message;
|
|
653
|
+
}
|
|
654
|
+
internalBinaryWrite(message: SendAnswerRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
655
|
+
/* stream.video.sfu.models.PeerType peer_type = 1; */
|
|
656
|
+
if (message.peerType !== 0)
|
|
657
|
+
writer.tag(1, WireType.Varint).int32(message.peerType);
|
|
658
|
+
/* string sdp = 2; */
|
|
659
|
+
if (message.sdp !== "")
|
|
660
|
+
writer.tag(2, WireType.LengthDelimited).string(message.sdp);
|
|
661
|
+
/* string session_id = 3; */
|
|
662
|
+
if (message.sessionId !== "")
|
|
663
|
+
writer.tag(3, WireType.LengthDelimited).string(message.sessionId);
|
|
664
|
+
let u = options.writeUnknownFields;
|
|
665
|
+
if (u !== false)
|
|
666
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
667
|
+
return writer;
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
/**
|
|
671
|
+
* @generated MessageType for protobuf message stream.video.sfu.signal.SendAnswerRequest
|
|
672
|
+
*/
|
|
673
|
+
export const SendAnswerRequest = new SendAnswerRequest$Type();
|
|
674
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
675
|
+
class SendAnswerResponse$Type extends MessageType<SendAnswerResponse> {
|
|
676
|
+
constructor() {
|
|
677
|
+
super("stream.video.sfu.signal.SendAnswerResponse", [
|
|
678
|
+
{ no: 4, name: "error", kind: "message", T: () => Error }
|
|
679
|
+
]);
|
|
680
|
+
}
|
|
681
|
+
create(value?: PartialMessage<SendAnswerResponse>): SendAnswerResponse {
|
|
682
|
+
const message = {};
|
|
683
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
684
|
+
if (value !== undefined)
|
|
685
|
+
reflectionMergePartial<SendAnswerResponse>(this, message, value);
|
|
686
|
+
return message;
|
|
687
|
+
}
|
|
688
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SendAnswerResponse): SendAnswerResponse {
|
|
689
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
690
|
+
while (reader.pos < end) {
|
|
691
|
+
let [fieldNo, wireType] = reader.tag();
|
|
692
|
+
switch (fieldNo) {
|
|
693
|
+
case /* stream.video.sfu.models.Error error */ 4:
|
|
694
|
+
message.error = Error.internalBinaryRead(reader, reader.uint32(), options, message.error);
|
|
695
|
+
break;
|
|
696
|
+
default:
|
|
697
|
+
let u = options.readUnknownField;
|
|
698
|
+
if (u === "throw")
|
|
699
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
700
|
+
let d = reader.skip(wireType);
|
|
701
|
+
if (u !== false)
|
|
702
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
return message;
|
|
706
|
+
}
|
|
707
|
+
internalBinaryWrite(message: SendAnswerResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
708
|
+
/* stream.video.sfu.models.Error error = 4; */
|
|
709
|
+
if (message.error)
|
|
710
|
+
Error.internalBinaryWrite(message.error, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
711
|
+
let u = options.writeUnknownFields;
|
|
712
|
+
if (u !== false)
|
|
713
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
714
|
+
return writer;
|
|
715
|
+
}
|
|
716
|
+
}
|
|
717
|
+
/**
|
|
718
|
+
* @generated MessageType for protobuf message stream.video.sfu.signal.SendAnswerResponse
|
|
719
|
+
*/
|
|
720
|
+
export const SendAnswerResponse = new SendAnswerResponse$Type();
|
|
721
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
722
|
+
class ICETrickleResponse$Type extends MessageType<ICETrickleResponse> {
|
|
723
|
+
constructor() {
|
|
724
|
+
super("stream.video.sfu.signal.ICETrickleResponse", [
|
|
725
|
+
{ no: 4, name: "error", kind: "message", T: () => Error }
|
|
726
|
+
]);
|
|
727
|
+
}
|
|
728
|
+
create(value?: PartialMessage<ICETrickleResponse>): ICETrickleResponse {
|
|
729
|
+
const message = {};
|
|
730
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
731
|
+
if (value !== undefined)
|
|
732
|
+
reflectionMergePartial<ICETrickleResponse>(this, message, value);
|
|
733
|
+
return message;
|
|
734
|
+
}
|
|
735
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ICETrickleResponse): ICETrickleResponse {
|
|
736
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
737
|
+
while (reader.pos < end) {
|
|
738
|
+
let [fieldNo, wireType] = reader.tag();
|
|
739
|
+
switch (fieldNo) {
|
|
740
|
+
case /* stream.video.sfu.models.Error error */ 4:
|
|
741
|
+
message.error = Error.internalBinaryRead(reader, reader.uint32(), options, message.error);
|
|
742
|
+
break;
|
|
743
|
+
default:
|
|
744
|
+
let u = options.readUnknownField;
|
|
745
|
+
if (u === "throw")
|
|
746
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
747
|
+
let d = reader.skip(wireType);
|
|
748
|
+
if (u !== false)
|
|
749
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
750
|
+
}
|
|
751
|
+
}
|
|
752
|
+
return message;
|
|
753
|
+
}
|
|
754
|
+
internalBinaryWrite(message: ICETrickleResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
755
|
+
/* stream.video.sfu.models.Error error = 4; */
|
|
756
|
+
if (message.error)
|
|
757
|
+
Error.internalBinaryWrite(message.error, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
758
|
+
let u = options.writeUnknownFields;
|
|
759
|
+
if (u !== false)
|
|
760
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
761
|
+
return writer;
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
/**
|
|
765
|
+
* @generated MessageType for protobuf message stream.video.sfu.signal.ICETrickleResponse
|
|
766
|
+
*/
|
|
767
|
+
export const ICETrickleResponse = new ICETrickleResponse$Type();
|
|
768
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
769
|
+
class SetPublisherRequest$Type extends MessageType<SetPublisherRequest> {
|
|
770
|
+
constructor() {
|
|
771
|
+
super("stream.video.sfu.signal.SetPublisherRequest", [
|
|
772
|
+
{ no: 1, name: "sdp", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
773
|
+
{ no: 2, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
774
|
+
{ no: 3, name: "tracks", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => TrackInfo }
|
|
775
|
+
]);
|
|
776
|
+
}
|
|
777
|
+
create(value?: PartialMessage<SetPublisherRequest>): SetPublisherRequest {
|
|
778
|
+
const message = { sdp: "", sessionId: "", tracks: [] };
|
|
779
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
780
|
+
if (value !== undefined)
|
|
781
|
+
reflectionMergePartial<SetPublisherRequest>(this, message, value);
|
|
782
|
+
return message;
|
|
783
|
+
}
|
|
784
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetPublisherRequest): SetPublisherRequest {
|
|
785
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
786
|
+
while (reader.pos < end) {
|
|
787
|
+
let [fieldNo, wireType] = reader.tag();
|
|
788
|
+
switch (fieldNo) {
|
|
789
|
+
case /* string sdp */ 1:
|
|
790
|
+
message.sdp = reader.string();
|
|
791
|
+
break;
|
|
792
|
+
case /* string session_id */ 2:
|
|
793
|
+
message.sessionId = reader.string();
|
|
794
|
+
break;
|
|
795
|
+
case /* repeated stream.video.sfu.models.TrackInfo tracks */ 3:
|
|
796
|
+
message.tracks.push(TrackInfo.internalBinaryRead(reader, reader.uint32(), options));
|
|
797
|
+
break;
|
|
798
|
+
default:
|
|
799
|
+
let u = options.readUnknownField;
|
|
800
|
+
if (u === "throw")
|
|
801
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
802
|
+
let d = reader.skip(wireType);
|
|
803
|
+
if (u !== false)
|
|
804
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
return message;
|
|
808
|
+
}
|
|
809
|
+
internalBinaryWrite(message: SetPublisherRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
810
|
+
/* string sdp = 1; */
|
|
811
|
+
if (message.sdp !== "")
|
|
812
|
+
writer.tag(1, WireType.LengthDelimited).string(message.sdp);
|
|
813
|
+
/* string session_id = 2; */
|
|
814
|
+
if (message.sessionId !== "")
|
|
815
|
+
writer.tag(2, WireType.LengthDelimited).string(message.sessionId);
|
|
816
|
+
/* repeated stream.video.sfu.models.TrackInfo tracks = 3; */
|
|
817
|
+
for (let i = 0; i < message.tracks.length; i++)
|
|
818
|
+
TrackInfo.internalBinaryWrite(message.tracks[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
819
|
+
let u = options.writeUnknownFields;
|
|
820
|
+
if (u !== false)
|
|
821
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
822
|
+
return writer;
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* @generated MessageType for protobuf message stream.video.sfu.signal.SetPublisherRequest
|
|
827
|
+
*/
|
|
828
|
+
export const SetPublisherRequest = new SetPublisherRequest$Type();
|
|
829
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
830
|
+
class SetPublisherResponse$Type extends MessageType<SetPublisherResponse> {
|
|
831
|
+
constructor() {
|
|
832
|
+
super("stream.video.sfu.signal.SetPublisherResponse", [
|
|
833
|
+
{ no: 1, name: "sdp", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
834
|
+
{ no: 2, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
835
|
+
{ no: 3, name: "ice_restart", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
836
|
+
{ no: 4, name: "error", kind: "message", T: () => Error }
|
|
837
|
+
]);
|
|
838
|
+
}
|
|
839
|
+
create(value?: PartialMessage<SetPublisherResponse>): SetPublisherResponse {
|
|
840
|
+
const message = { sdp: "", sessionId: "", iceRestart: false };
|
|
841
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
842
|
+
if (value !== undefined)
|
|
843
|
+
reflectionMergePartial<SetPublisherResponse>(this, message, value);
|
|
844
|
+
return message;
|
|
845
|
+
}
|
|
846
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SetPublisherResponse): SetPublisherResponse {
|
|
847
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
848
|
+
while (reader.pos < end) {
|
|
849
|
+
let [fieldNo, wireType] = reader.tag();
|
|
850
|
+
switch (fieldNo) {
|
|
851
|
+
case /* string sdp */ 1:
|
|
852
|
+
message.sdp = reader.string();
|
|
853
|
+
break;
|
|
854
|
+
case /* string session_id */ 2:
|
|
855
|
+
message.sessionId = reader.string();
|
|
856
|
+
break;
|
|
857
|
+
case /* bool ice_restart */ 3:
|
|
858
|
+
message.iceRestart = reader.bool();
|
|
859
|
+
break;
|
|
860
|
+
case /* stream.video.sfu.models.Error error */ 4:
|
|
861
|
+
message.error = Error.internalBinaryRead(reader, reader.uint32(), options, message.error);
|
|
862
|
+
break;
|
|
863
|
+
default:
|
|
864
|
+
let u = options.readUnknownField;
|
|
865
|
+
if (u === "throw")
|
|
866
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
867
|
+
let d = reader.skip(wireType);
|
|
868
|
+
if (u !== false)
|
|
869
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
return message;
|
|
873
|
+
}
|
|
874
|
+
internalBinaryWrite(message: SetPublisherResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
875
|
+
/* string sdp = 1; */
|
|
876
|
+
if (message.sdp !== "")
|
|
877
|
+
writer.tag(1, WireType.LengthDelimited).string(message.sdp);
|
|
878
|
+
/* string session_id = 2; */
|
|
879
|
+
if (message.sessionId !== "")
|
|
880
|
+
writer.tag(2, WireType.LengthDelimited).string(message.sessionId);
|
|
881
|
+
/* bool ice_restart = 3; */
|
|
882
|
+
if (message.iceRestart !== false)
|
|
883
|
+
writer.tag(3, WireType.Varint).bool(message.iceRestart);
|
|
884
|
+
/* stream.video.sfu.models.Error error = 4; */
|
|
885
|
+
if (message.error)
|
|
886
|
+
Error.internalBinaryWrite(message.error, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
887
|
+
let u = options.writeUnknownFields;
|
|
888
|
+
if (u !== false)
|
|
889
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
890
|
+
return writer;
|
|
891
|
+
}
|
|
892
|
+
}
|
|
893
|
+
/**
|
|
894
|
+
* @generated MessageType for protobuf message stream.video.sfu.signal.SetPublisherResponse
|
|
895
|
+
*/
|
|
896
|
+
export const SetPublisherResponse = new SetPublisherResponse$Type();
|
|
897
|
+
/**
|
|
898
|
+
* @generated ServiceType for protobuf service stream.video.sfu.signal.SignalServer
|
|
899
|
+
*/
|
|
900
|
+
export const SignalServer = new ServiceType("stream.video.sfu.signal.SignalServer", [
|
|
901
|
+
{ name: "SetPublisher", options: {}, I: SetPublisherRequest, O: SetPublisherResponse },
|
|
902
|
+
{ name: "SendAnswer", options: {}, I: SendAnswerRequest, O: SendAnswerResponse },
|
|
903
|
+
{ name: "IceTrickle", options: {}, I: ICETrickle, O: ICETrickleResponse },
|
|
904
|
+
{ name: "UpdateSubscriptions", options: {}, I: UpdateSubscriptionsRequest, O: UpdateSubscriptionsResponse },
|
|
905
|
+
{ name: "UpdateMuteStates", options: {}, I: UpdateMuteStatesRequest, O: UpdateMuteStatesResponse }
|
|
906
|
+
]);
|