@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,1962 @@
|
|
|
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/event/events.proto" (package "stream.video.sfu.event", 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 { Codec } from "../models/models";
|
|
16
|
+
import { ConnectionQuality } from "../models/models";
|
|
17
|
+
import { Participant } from "../models/models";
|
|
18
|
+
import { CallState } from "../models/models";
|
|
19
|
+
import { TrackType } from "../models/models";
|
|
20
|
+
import { PeerType } from "../models/models";
|
|
21
|
+
import { Error as Error$ } from "../models/models";
|
|
22
|
+
import { ICETrickle as ICETrickle$ } from "../models/models";
|
|
23
|
+
/**
|
|
24
|
+
* SFUEvent is a message that is sent from the SFU to the client.
|
|
25
|
+
*
|
|
26
|
+
* @generated from protobuf message stream.video.sfu.event.SfuEvent
|
|
27
|
+
*/
|
|
28
|
+
export interface SfuEvent {
|
|
29
|
+
/**
|
|
30
|
+
* @generated from protobuf oneof: event_payload
|
|
31
|
+
*/
|
|
32
|
+
eventPayload: {
|
|
33
|
+
oneofKind: "subscriberOffer";
|
|
34
|
+
/**
|
|
35
|
+
* @generated from protobuf field: stream.video.sfu.event.SubscriberOffer subscriber_offer = 1;
|
|
36
|
+
*/
|
|
37
|
+
subscriberOffer: SubscriberOffer;
|
|
38
|
+
} | {
|
|
39
|
+
oneofKind: "publisherAnswer";
|
|
40
|
+
/**
|
|
41
|
+
* @generated from protobuf field: stream.video.sfu.event.PublisherAnswer publisher_answer = 2;
|
|
42
|
+
*/
|
|
43
|
+
publisherAnswer: PublisherAnswer;
|
|
44
|
+
} | {
|
|
45
|
+
oneofKind: "connectionQualityChanged";
|
|
46
|
+
/**
|
|
47
|
+
* @generated from protobuf field: stream.video.sfu.event.ConnectionQualityChanged connection_quality_changed = 3;
|
|
48
|
+
*/
|
|
49
|
+
connectionQualityChanged: ConnectionQualityChanged;
|
|
50
|
+
} | {
|
|
51
|
+
oneofKind: "audioLevelChanged";
|
|
52
|
+
/**
|
|
53
|
+
* @generated from protobuf field: stream.video.sfu.event.AudioLevelChanged audio_level_changed = 4;
|
|
54
|
+
*/
|
|
55
|
+
audioLevelChanged: AudioLevelChanged;
|
|
56
|
+
} | {
|
|
57
|
+
oneofKind: "iceTrickle";
|
|
58
|
+
/**
|
|
59
|
+
* @generated from protobuf field: stream.video.sfu.models.ICETrickle ice_trickle = 5;
|
|
60
|
+
*/
|
|
61
|
+
iceTrickle: ICETrickle$;
|
|
62
|
+
} | {
|
|
63
|
+
oneofKind: "changePublishQuality";
|
|
64
|
+
/**
|
|
65
|
+
* @generated from protobuf field: stream.video.sfu.event.ChangePublishQuality change_publish_quality = 6;
|
|
66
|
+
*/
|
|
67
|
+
changePublishQuality: ChangePublishQuality;
|
|
68
|
+
} | {
|
|
69
|
+
oneofKind: "participantJoined";
|
|
70
|
+
/**
|
|
71
|
+
* @generated from protobuf field: stream.video.sfu.event.ParticipantJoined participant_joined = 10;
|
|
72
|
+
*/
|
|
73
|
+
participantJoined: ParticipantJoined;
|
|
74
|
+
} | {
|
|
75
|
+
oneofKind: "participantLeft";
|
|
76
|
+
/**
|
|
77
|
+
* @generated from protobuf field: stream.video.sfu.event.ParticipantLeft participant_left = 11;
|
|
78
|
+
*/
|
|
79
|
+
participantLeft: ParticipantLeft;
|
|
80
|
+
} | {
|
|
81
|
+
oneofKind: "dominantSpeakerChanged";
|
|
82
|
+
/**
|
|
83
|
+
* @generated from protobuf field: stream.video.sfu.event.DominantSpeakerChanged dominant_speaker_changed = 12;
|
|
84
|
+
*/
|
|
85
|
+
dominantSpeakerChanged: DominantSpeakerChanged;
|
|
86
|
+
} | {
|
|
87
|
+
oneofKind: "joinResponse";
|
|
88
|
+
/**
|
|
89
|
+
* @generated from protobuf field: stream.video.sfu.event.JoinResponse join_response = 13;
|
|
90
|
+
*/
|
|
91
|
+
joinResponse: JoinResponse;
|
|
92
|
+
} | {
|
|
93
|
+
oneofKind: "healthCheckResponse";
|
|
94
|
+
/**
|
|
95
|
+
* @generated from protobuf field: stream.video.sfu.event.HealthCheckResponse health_check_response = 14;
|
|
96
|
+
*/
|
|
97
|
+
healthCheckResponse: HealthCheckResponse;
|
|
98
|
+
} | {
|
|
99
|
+
oneofKind: "trackPublished";
|
|
100
|
+
/**
|
|
101
|
+
* @generated from protobuf field: stream.video.sfu.event.TrackPublished track_published = 16;
|
|
102
|
+
*/
|
|
103
|
+
trackPublished: TrackPublished;
|
|
104
|
+
} | {
|
|
105
|
+
oneofKind: "trackUnpublished";
|
|
106
|
+
/**
|
|
107
|
+
* @generated from protobuf field: stream.video.sfu.event.TrackUnpublished track_unpublished = 17;
|
|
108
|
+
*/
|
|
109
|
+
trackUnpublished: TrackUnpublished;
|
|
110
|
+
} | {
|
|
111
|
+
oneofKind: "error";
|
|
112
|
+
/**
|
|
113
|
+
* @generated from protobuf field: stream.video.sfu.event.Error error = 18;
|
|
114
|
+
*/
|
|
115
|
+
error: Error;
|
|
116
|
+
} | {
|
|
117
|
+
oneofKind: undefined;
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* @generated from protobuf message stream.video.sfu.event.Error
|
|
122
|
+
*/
|
|
123
|
+
export interface Error {
|
|
124
|
+
/**
|
|
125
|
+
* @generated from protobuf field: stream.video.sfu.models.Error error = 4;
|
|
126
|
+
*/
|
|
127
|
+
error?: Error$;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* @generated from protobuf message stream.video.sfu.event.ICETrickle
|
|
131
|
+
*/
|
|
132
|
+
export interface ICETrickle {
|
|
133
|
+
/**
|
|
134
|
+
* @generated from protobuf field: stream.video.sfu.models.PeerType peer_type = 1;
|
|
135
|
+
*/
|
|
136
|
+
peerType: PeerType;
|
|
137
|
+
/**
|
|
138
|
+
* @generated from protobuf field: string ice_candidate = 2;
|
|
139
|
+
*/
|
|
140
|
+
iceCandidate: string;
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* SfuRequest is a message that is sent from the client to the SFU.
|
|
144
|
+
*
|
|
145
|
+
* @generated from protobuf message stream.video.sfu.event.SfuRequest
|
|
146
|
+
*/
|
|
147
|
+
export interface SfuRequest {
|
|
148
|
+
/**
|
|
149
|
+
* @generated from protobuf oneof: request_payload
|
|
150
|
+
*/
|
|
151
|
+
requestPayload: {
|
|
152
|
+
oneofKind: "joinRequest";
|
|
153
|
+
/**
|
|
154
|
+
* @generated from protobuf field: stream.video.sfu.event.JoinRequest join_request = 1;
|
|
155
|
+
*/
|
|
156
|
+
joinRequest: JoinRequest;
|
|
157
|
+
} | {
|
|
158
|
+
oneofKind: "healthCheckRequest";
|
|
159
|
+
/**
|
|
160
|
+
* @generated from protobuf field: stream.video.sfu.event.HealthCheckRequest health_check_request = 2;
|
|
161
|
+
*/
|
|
162
|
+
healthCheckRequest: HealthCheckRequest;
|
|
163
|
+
} | {
|
|
164
|
+
oneofKind: undefined;
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* @generated from protobuf message stream.video.sfu.event.HealthCheckRequest
|
|
169
|
+
*/
|
|
170
|
+
export interface HealthCheckRequest {
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* @generated from protobuf message stream.video.sfu.event.HealthCheckResponse
|
|
174
|
+
*/
|
|
175
|
+
export interface HealthCheckResponse {
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* @generated from protobuf message stream.video.sfu.event.TrackPublished
|
|
179
|
+
*/
|
|
180
|
+
export interface TrackPublished {
|
|
181
|
+
/**
|
|
182
|
+
* @generated from protobuf field: string user_id = 1;
|
|
183
|
+
*/
|
|
184
|
+
userId: string;
|
|
185
|
+
/**
|
|
186
|
+
* @generated from protobuf field: string session_id = 2;
|
|
187
|
+
*/
|
|
188
|
+
sessionId: string;
|
|
189
|
+
/**
|
|
190
|
+
* @generated from protobuf field: stream.video.sfu.models.TrackType type = 3;
|
|
191
|
+
*/
|
|
192
|
+
type: TrackType;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* @generated from protobuf message stream.video.sfu.event.TrackUnpublished
|
|
196
|
+
*/
|
|
197
|
+
export interface TrackUnpublished {
|
|
198
|
+
/**
|
|
199
|
+
* @generated from protobuf field: string user_id = 1;
|
|
200
|
+
*/
|
|
201
|
+
userId: string;
|
|
202
|
+
/**
|
|
203
|
+
* @generated from protobuf field: string session_id = 2;
|
|
204
|
+
*/
|
|
205
|
+
sessionId: string;
|
|
206
|
+
/**
|
|
207
|
+
* @generated from protobuf field: stream.video.sfu.models.TrackType type = 3;
|
|
208
|
+
*/
|
|
209
|
+
type: TrackType;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* @generated from protobuf message stream.video.sfu.event.JoinRequest
|
|
213
|
+
*/
|
|
214
|
+
export interface JoinRequest {
|
|
215
|
+
/**
|
|
216
|
+
* @generated from protobuf field: string token = 1;
|
|
217
|
+
*/
|
|
218
|
+
token: string;
|
|
219
|
+
/**
|
|
220
|
+
* @generated from protobuf field: string session_id = 2;
|
|
221
|
+
*/
|
|
222
|
+
sessionId: string;
|
|
223
|
+
/**
|
|
224
|
+
* dumb SDP that allow us to extract subscriber's decode codecs
|
|
225
|
+
*
|
|
226
|
+
* @generated from protobuf field: string subscriber_sdp = 3;
|
|
227
|
+
*/
|
|
228
|
+
subscriberSdp: string; // TODO: we should know if this is going to be
|
|
229
|
+
// - publishing and subscribing, or just subscribing for future routing
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* @generated from protobuf message stream.video.sfu.event.JoinResponse
|
|
233
|
+
*/
|
|
234
|
+
export interface JoinResponse {
|
|
235
|
+
/**
|
|
236
|
+
* TODO: include full list of participants with track and audio info
|
|
237
|
+
*
|
|
238
|
+
* @generated from protobuf field: stream.video.sfu.models.CallState call_state = 1;
|
|
239
|
+
*/
|
|
240
|
+
callState?: CallState;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* ParticipantJoined is fired when a user joins a call
|
|
244
|
+
*
|
|
245
|
+
* @generated from protobuf message stream.video.sfu.event.ParticipantJoined
|
|
246
|
+
*/
|
|
247
|
+
export interface ParticipantJoined {
|
|
248
|
+
/**
|
|
249
|
+
* @generated from protobuf field: string call_cid = 1;
|
|
250
|
+
*/
|
|
251
|
+
callCid: string;
|
|
252
|
+
/**
|
|
253
|
+
* @generated from protobuf field: stream.video.sfu.models.Participant participant = 2;
|
|
254
|
+
*/
|
|
255
|
+
participant?: Participant;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* ParticipantJoined is fired when a user leaves a call
|
|
259
|
+
*
|
|
260
|
+
* @generated from protobuf message stream.video.sfu.event.ParticipantLeft
|
|
261
|
+
*/
|
|
262
|
+
export interface ParticipantLeft {
|
|
263
|
+
/**
|
|
264
|
+
* @generated from protobuf field: string call_cid = 1;
|
|
265
|
+
*/
|
|
266
|
+
callCid: string;
|
|
267
|
+
/**
|
|
268
|
+
* @generated from protobuf field: stream.video.sfu.models.Participant participant = 2;
|
|
269
|
+
*/
|
|
270
|
+
participant?: Participant;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* SubscriberOffer is sent when the SFU adds tracks to a subscription
|
|
274
|
+
*
|
|
275
|
+
* @generated from protobuf message stream.video.sfu.event.SubscriberOffer
|
|
276
|
+
*/
|
|
277
|
+
export interface SubscriberOffer {
|
|
278
|
+
/**
|
|
279
|
+
* @generated from protobuf field: bool ice_restart = 1;
|
|
280
|
+
*/
|
|
281
|
+
iceRestart: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* @generated from protobuf field: string sdp = 2;
|
|
284
|
+
*/
|
|
285
|
+
sdp: string;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* @generated from protobuf message stream.video.sfu.event.PublisherAnswer
|
|
289
|
+
*/
|
|
290
|
+
export interface PublisherAnswer {
|
|
291
|
+
/**
|
|
292
|
+
* @generated from protobuf field: string sdp = 1;
|
|
293
|
+
*/
|
|
294
|
+
sdp: string;
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
* ConnectionQuality is sent to inform about connection quality changes
|
|
298
|
+
* eg. thierry's connection is not good -> render a red icon Zoom style
|
|
299
|
+
*
|
|
300
|
+
* @generated from protobuf message stream.video.sfu.event.ConnectionQualityChanged
|
|
301
|
+
*/
|
|
302
|
+
export interface ConnectionQualityChanged {
|
|
303
|
+
/**
|
|
304
|
+
* @generated from protobuf field: repeated stream.video.sfu.event.ConnectionQualityInfo connection_quality_updates = 1;
|
|
305
|
+
*/
|
|
306
|
+
connectionQualityUpdates: ConnectionQualityInfo[];
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* @generated from protobuf message stream.video.sfu.event.ConnectionQualityInfo
|
|
310
|
+
*/
|
|
311
|
+
export interface ConnectionQualityInfo {
|
|
312
|
+
/**
|
|
313
|
+
* @generated from protobuf field: string user_id = 1;
|
|
314
|
+
*/
|
|
315
|
+
userId: string;
|
|
316
|
+
/**
|
|
317
|
+
* @generated from protobuf field: string session_id = 2;
|
|
318
|
+
*/
|
|
319
|
+
sessionId: string;
|
|
320
|
+
/**
|
|
321
|
+
* @generated from protobuf field: stream.video.sfu.models.ConnectionQuality connection_quality = 3;
|
|
322
|
+
*/
|
|
323
|
+
connectionQuality: ConnectionQuality;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* DominantSpeakerChanged is sent by the SFU to notify when there is a new dominant speaker in the call
|
|
327
|
+
*
|
|
328
|
+
* @generated from protobuf message stream.video.sfu.event.DominantSpeakerChanged
|
|
329
|
+
*/
|
|
330
|
+
export interface DominantSpeakerChanged {
|
|
331
|
+
/**
|
|
332
|
+
* @generated from protobuf field: string user_id = 1;
|
|
333
|
+
*/
|
|
334
|
+
userId: string;
|
|
335
|
+
/**
|
|
336
|
+
* @generated from protobuf field: string session_id = 2;
|
|
337
|
+
*/
|
|
338
|
+
sessionId: string;
|
|
339
|
+
}
|
|
340
|
+
/**
|
|
341
|
+
* @generated from protobuf message stream.video.sfu.event.AudioLevel
|
|
342
|
+
*/
|
|
343
|
+
export interface AudioLevel {
|
|
344
|
+
/**
|
|
345
|
+
* @generated from protobuf field: string user_id = 1;
|
|
346
|
+
*/
|
|
347
|
+
userId: string;
|
|
348
|
+
/**
|
|
349
|
+
* @generated from protobuf field: string session_id = 2;
|
|
350
|
+
*/
|
|
351
|
+
sessionId: string;
|
|
352
|
+
/**
|
|
353
|
+
* 0.0 means complete silence, 1.0 loudest
|
|
354
|
+
*
|
|
355
|
+
* @generated from protobuf field: float level = 3;
|
|
356
|
+
*/
|
|
357
|
+
level: number;
|
|
358
|
+
/**
|
|
359
|
+
* @generated from protobuf field: bool is_speaking = 4;
|
|
360
|
+
*/
|
|
361
|
+
isSpeaking: boolean;
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* AudioLevelChanged is sent by the SFU to notify about audio levels by user
|
|
365
|
+
*
|
|
366
|
+
* @generated from protobuf message stream.video.sfu.event.AudioLevelChanged
|
|
367
|
+
*/
|
|
368
|
+
export interface AudioLevelChanged {
|
|
369
|
+
/**
|
|
370
|
+
* @generated from protobuf field: repeated stream.video.sfu.event.AudioLevel audio_levels = 1;
|
|
371
|
+
*/
|
|
372
|
+
audioLevels: AudioLevel[];
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* @generated from protobuf message stream.video.sfu.event.AudioMediaRequest
|
|
376
|
+
*/
|
|
377
|
+
export interface AudioMediaRequest {
|
|
378
|
+
/**
|
|
379
|
+
* @generated from protobuf field: int32 channel_count = 1;
|
|
380
|
+
*/
|
|
381
|
+
channelCount: number;
|
|
382
|
+
}
|
|
383
|
+
/**
|
|
384
|
+
* @generated from protobuf message stream.video.sfu.event.AudioSender
|
|
385
|
+
*/
|
|
386
|
+
export interface AudioSender {
|
|
387
|
+
/**
|
|
388
|
+
* @generated from protobuf field: stream.video.sfu.event.AudioMediaRequest media_request = 1;
|
|
389
|
+
*/
|
|
390
|
+
mediaRequest?: AudioMediaRequest;
|
|
391
|
+
/**
|
|
392
|
+
* @generated from protobuf field: stream.video.sfu.models.Codec codec = 2;
|
|
393
|
+
*/
|
|
394
|
+
codec?: Codec;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* @generated from protobuf message stream.video.sfu.event.VideoMediaRequest
|
|
398
|
+
*/
|
|
399
|
+
export interface VideoMediaRequest {
|
|
400
|
+
/**
|
|
401
|
+
* @generated from protobuf field: int32 ideal_height = 1;
|
|
402
|
+
*/
|
|
403
|
+
idealHeight: number;
|
|
404
|
+
/**
|
|
405
|
+
* @generated from protobuf field: int32 ideal_width = 2;
|
|
406
|
+
*/
|
|
407
|
+
idealWidth: number;
|
|
408
|
+
/**
|
|
409
|
+
* @generated from protobuf field: int32 ideal_frame_rate = 3;
|
|
410
|
+
*/
|
|
411
|
+
idealFrameRate: number;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* @generated from protobuf message stream.video.sfu.event.VideoLayerSetting
|
|
415
|
+
*/
|
|
416
|
+
export interface VideoLayerSetting {
|
|
417
|
+
/**
|
|
418
|
+
* @generated from protobuf field: string name = 1;
|
|
419
|
+
*/
|
|
420
|
+
name: string;
|
|
421
|
+
/**
|
|
422
|
+
* @generated from protobuf field: bool active = 2;
|
|
423
|
+
*/
|
|
424
|
+
active: boolean;
|
|
425
|
+
/**
|
|
426
|
+
* @generated from protobuf field: int32 max_bitrate = 3;
|
|
427
|
+
*/
|
|
428
|
+
maxBitrate: number;
|
|
429
|
+
/**
|
|
430
|
+
* @generated from protobuf field: float scale_resolution_down_by = 4;
|
|
431
|
+
*/
|
|
432
|
+
scaleResolutionDownBy: number;
|
|
433
|
+
/**
|
|
434
|
+
* @generated from protobuf field: stream.video.sfu.event.VideoLayerSetting.Priority priority = 5;
|
|
435
|
+
*/
|
|
436
|
+
priority: VideoLayerSetting_Priority;
|
|
437
|
+
/**
|
|
438
|
+
* @generated from protobuf field: stream.video.sfu.models.Codec codec = 6;
|
|
439
|
+
*/
|
|
440
|
+
codec?: Codec;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* @generated from protobuf enum stream.video.sfu.event.VideoLayerSetting.Priority
|
|
444
|
+
*/
|
|
445
|
+
export enum VideoLayerSetting_Priority {
|
|
446
|
+
/**
|
|
447
|
+
* @generated from protobuf enum value: PRIORITY_HIGH_UNSPECIFIED = 0;
|
|
448
|
+
*/
|
|
449
|
+
HIGH_UNSPECIFIED = 0,
|
|
450
|
+
/**
|
|
451
|
+
* @generated from protobuf enum value: PRIORITY_LOW = 1;
|
|
452
|
+
*/
|
|
453
|
+
LOW = 1,
|
|
454
|
+
/**
|
|
455
|
+
* @generated from protobuf enum value: PRIORITY_MEDIUM = 2;
|
|
456
|
+
*/
|
|
457
|
+
MEDIUM = 2,
|
|
458
|
+
/**
|
|
459
|
+
* @generated from protobuf enum value: PRIORITY_VERY_LOW = 3;
|
|
460
|
+
*/
|
|
461
|
+
VERY_LOW = 3
|
|
462
|
+
}
|
|
463
|
+
/**
|
|
464
|
+
* @generated from protobuf message stream.video.sfu.event.VideoSender
|
|
465
|
+
*/
|
|
466
|
+
export interface VideoSender {
|
|
467
|
+
/**
|
|
468
|
+
* @generated from protobuf field: stream.video.sfu.event.VideoMediaRequest media_request = 1;
|
|
469
|
+
*/
|
|
470
|
+
mediaRequest?: VideoMediaRequest;
|
|
471
|
+
/**
|
|
472
|
+
* @generated from protobuf field: stream.video.sfu.models.Codec codec = 2;
|
|
473
|
+
*/
|
|
474
|
+
codec?: Codec;
|
|
475
|
+
/**
|
|
476
|
+
* @generated from protobuf field: repeated stream.video.sfu.event.VideoLayerSetting layers = 3;
|
|
477
|
+
*/
|
|
478
|
+
layers: VideoLayerSetting[];
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* sent to users when they need to change the quality of their video
|
|
482
|
+
*
|
|
483
|
+
* @generated from protobuf message stream.video.sfu.event.ChangePublishQuality
|
|
484
|
+
*/
|
|
485
|
+
export interface ChangePublishQuality {
|
|
486
|
+
/**
|
|
487
|
+
* @generated from protobuf field: repeated stream.video.sfu.event.AudioSender audio_senders = 1;
|
|
488
|
+
*/
|
|
489
|
+
audioSenders: AudioSender[];
|
|
490
|
+
/**
|
|
491
|
+
* @generated from protobuf field: repeated stream.video.sfu.event.VideoSender video_senders = 2;
|
|
492
|
+
*/
|
|
493
|
+
videoSenders: VideoSender[];
|
|
494
|
+
}
|
|
495
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
496
|
+
class SfuEvent$Type extends MessageType<SfuEvent> {
|
|
497
|
+
constructor() {
|
|
498
|
+
super("stream.video.sfu.event.SfuEvent", [
|
|
499
|
+
{ no: 1, name: "subscriber_offer", kind: "message", oneof: "eventPayload", T: () => SubscriberOffer },
|
|
500
|
+
{ no: 2, name: "publisher_answer", kind: "message", oneof: "eventPayload", T: () => PublisherAnswer },
|
|
501
|
+
{ no: 3, name: "connection_quality_changed", kind: "message", oneof: "eventPayload", T: () => ConnectionQualityChanged },
|
|
502
|
+
{ no: 4, name: "audio_level_changed", kind: "message", oneof: "eventPayload", T: () => AudioLevelChanged },
|
|
503
|
+
{ no: 5, name: "ice_trickle", kind: "message", oneof: "eventPayload", T: () => ICETrickle$ },
|
|
504
|
+
{ no: 6, name: "change_publish_quality", kind: "message", oneof: "eventPayload", T: () => ChangePublishQuality },
|
|
505
|
+
{ no: 10, name: "participant_joined", kind: "message", oneof: "eventPayload", T: () => ParticipantJoined },
|
|
506
|
+
{ no: 11, name: "participant_left", kind: "message", oneof: "eventPayload", T: () => ParticipantLeft },
|
|
507
|
+
{ no: 12, name: "dominant_speaker_changed", kind: "message", oneof: "eventPayload", T: () => DominantSpeakerChanged },
|
|
508
|
+
{ no: 13, name: "join_response", kind: "message", oneof: "eventPayload", T: () => JoinResponse },
|
|
509
|
+
{ no: 14, name: "health_check_response", kind: "message", oneof: "eventPayload", T: () => HealthCheckResponse },
|
|
510
|
+
{ no: 16, name: "track_published", kind: "message", oneof: "eventPayload", T: () => TrackPublished },
|
|
511
|
+
{ no: 17, name: "track_unpublished", kind: "message", oneof: "eventPayload", T: () => TrackUnpublished },
|
|
512
|
+
{ no: 18, name: "error", kind: "message", oneof: "eventPayload", T: () => Error }
|
|
513
|
+
]);
|
|
514
|
+
}
|
|
515
|
+
create(value?: PartialMessage<SfuEvent>): SfuEvent {
|
|
516
|
+
const message = { eventPayload: { oneofKind: undefined } };
|
|
517
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
518
|
+
if (value !== undefined)
|
|
519
|
+
reflectionMergePartial<SfuEvent>(this, message, value);
|
|
520
|
+
return message;
|
|
521
|
+
}
|
|
522
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SfuEvent): SfuEvent {
|
|
523
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
524
|
+
while (reader.pos < end) {
|
|
525
|
+
let [fieldNo, wireType] = reader.tag();
|
|
526
|
+
switch (fieldNo) {
|
|
527
|
+
case /* stream.video.sfu.event.SubscriberOffer subscriber_offer */ 1:
|
|
528
|
+
message.eventPayload = {
|
|
529
|
+
oneofKind: "subscriberOffer",
|
|
530
|
+
subscriberOffer: SubscriberOffer.internalBinaryRead(reader, reader.uint32(), options, (message.eventPayload as any).subscriberOffer)
|
|
531
|
+
};
|
|
532
|
+
break;
|
|
533
|
+
case /* stream.video.sfu.event.PublisherAnswer publisher_answer */ 2:
|
|
534
|
+
message.eventPayload = {
|
|
535
|
+
oneofKind: "publisherAnswer",
|
|
536
|
+
publisherAnswer: PublisherAnswer.internalBinaryRead(reader, reader.uint32(), options, (message.eventPayload as any).publisherAnswer)
|
|
537
|
+
};
|
|
538
|
+
break;
|
|
539
|
+
case /* stream.video.sfu.event.ConnectionQualityChanged connection_quality_changed */ 3:
|
|
540
|
+
message.eventPayload = {
|
|
541
|
+
oneofKind: "connectionQualityChanged",
|
|
542
|
+
connectionQualityChanged: ConnectionQualityChanged.internalBinaryRead(reader, reader.uint32(), options, (message.eventPayload as any).connectionQualityChanged)
|
|
543
|
+
};
|
|
544
|
+
break;
|
|
545
|
+
case /* stream.video.sfu.event.AudioLevelChanged audio_level_changed */ 4:
|
|
546
|
+
message.eventPayload = {
|
|
547
|
+
oneofKind: "audioLevelChanged",
|
|
548
|
+
audioLevelChanged: AudioLevelChanged.internalBinaryRead(reader, reader.uint32(), options, (message.eventPayload as any).audioLevelChanged)
|
|
549
|
+
};
|
|
550
|
+
break;
|
|
551
|
+
case /* stream.video.sfu.models.ICETrickle ice_trickle */ 5:
|
|
552
|
+
message.eventPayload = {
|
|
553
|
+
oneofKind: "iceTrickle",
|
|
554
|
+
iceTrickle: ICETrickle$.internalBinaryRead(reader, reader.uint32(), options, (message.eventPayload as any).iceTrickle)
|
|
555
|
+
};
|
|
556
|
+
break;
|
|
557
|
+
case /* stream.video.sfu.event.ChangePublishQuality change_publish_quality */ 6:
|
|
558
|
+
message.eventPayload = {
|
|
559
|
+
oneofKind: "changePublishQuality",
|
|
560
|
+
changePublishQuality: ChangePublishQuality.internalBinaryRead(reader, reader.uint32(), options, (message.eventPayload as any).changePublishQuality)
|
|
561
|
+
};
|
|
562
|
+
break;
|
|
563
|
+
case /* stream.video.sfu.event.ParticipantJoined participant_joined */ 10:
|
|
564
|
+
message.eventPayload = {
|
|
565
|
+
oneofKind: "participantJoined",
|
|
566
|
+
participantJoined: ParticipantJoined.internalBinaryRead(reader, reader.uint32(), options, (message.eventPayload as any).participantJoined)
|
|
567
|
+
};
|
|
568
|
+
break;
|
|
569
|
+
case /* stream.video.sfu.event.ParticipantLeft participant_left */ 11:
|
|
570
|
+
message.eventPayload = {
|
|
571
|
+
oneofKind: "participantLeft",
|
|
572
|
+
participantLeft: ParticipantLeft.internalBinaryRead(reader, reader.uint32(), options, (message.eventPayload as any).participantLeft)
|
|
573
|
+
};
|
|
574
|
+
break;
|
|
575
|
+
case /* stream.video.sfu.event.DominantSpeakerChanged dominant_speaker_changed */ 12:
|
|
576
|
+
message.eventPayload = {
|
|
577
|
+
oneofKind: "dominantSpeakerChanged",
|
|
578
|
+
dominantSpeakerChanged: DominantSpeakerChanged.internalBinaryRead(reader, reader.uint32(), options, (message.eventPayload as any).dominantSpeakerChanged)
|
|
579
|
+
};
|
|
580
|
+
break;
|
|
581
|
+
case /* stream.video.sfu.event.JoinResponse join_response */ 13:
|
|
582
|
+
message.eventPayload = {
|
|
583
|
+
oneofKind: "joinResponse",
|
|
584
|
+
joinResponse: JoinResponse.internalBinaryRead(reader, reader.uint32(), options, (message.eventPayload as any).joinResponse)
|
|
585
|
+
};
|
|
586
|
+
break;
|
|
587
|
+
case /* stream.video.sfu.event.HealthCheckResponse health_check_response */ 14:
|
|
588
|
+
message.eventPayload = {
|
|
589
|
+
oneofKind: "healthCheckResponse",
|
|
590
|
+
healthCheckResponse: HealthCheckResponse.internalBinaryRead(reader, reader.uint32(), options, (message.eventPayload as any).healthCheckResponse)
|
|
591
|
+
};
|
|
592
|
+
break;
|
|
593
|
+
case /* stream.video.sfu.event.TrackPublished track_published */ 16:
|
|
594
|
+
message.eventPayload = {
|
|
595
|
+
oneofKind: "trackPublished",
|
|
596
|
+
trackPublished: TrackPublished.internalBinaryRead(reader, reader.uint32(), options, (message.eventPayload as any).trackPublished)
|
|
597
|
+
};
|
|
598
|
+
break;
|
|
599
|
+
case /* stream.video.sfu.event.TrackUnpublished track_unpublished */ 17:
|
|
600
|
+
message.eventPayload = {
|
|
601
|
+
oneofKind: "trackUnpublished",
|
|
602
|
+
trackUnpublished: TrackUnpublished.internalBinaryRead(reader, reader.uint32(), options, (message.eventPayload as any).trackUnpublished)
|
|
603
|
+
};
|
|
604
|
+
break;
|
|
605
|
+
case /* stream.video.sfu.event.Error error */ 18:
|
|
606
|
+
message.eventPayload = {
|
|
607
|
+
oneofKind: "error",
|
|
608
|
+
error: Error.internalBinaryRead(reader, reader.uint32(), options, (message.eventPayload as any).error)
|
|
609
|
+
};
|
|
610
|
+
break;
|
|
611
|
+
default:
|
|
612
|
+
let u = options.readUnknownField;
|
|
613
|
+
if (u === "throw")
|
|
614
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
615
|
+
let d = reader.skip(wireType);
|
|
616
|
+
if (u !== false)
|
|
617
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
return message;
|
|
621
|
+
}
|
|
622
|
+
internalBinaryWrite(message: SfuEvent, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
623
|
+
/* stream.video.sfu.event.SubscriberOffer subscriber_offer = 1; */
|
|
624
|
+
if (message.eventPayload.oneofKind === "subscriberOffer")
|
|
625
|
+
SubscriberOffer.internalBinaryWrite(message.eventPayload.subscriberOffer, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
626
|
+
/* stream.video.sfu.event.PublisherAnswer publisher_answer = 2; */
|
|
627
|
+
if (message.eventPayload.oneofKind === "publisherAnswer")
|
|
628
|
+
PublisherAnswer.internalBinaryWrite(message.eventPayload.publisherAnswer, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
629
|
+
/* stream.video.sfu.event.ConnectionQualityChanged connection_quality_changed = 3; */
|
|
630
|
+
if (message.eventPayload.oneofKind === "connectionQualityChanged")
|
|
631
|
+
ConnectionQualityChanged.internalBinaryWrite(message.eventPayload.connectionQualityChanged, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
632
|
+
/* stream.video.sfu.event.AudioLevelChanged audio_level_changed = 4; */
|
|
633
|
+
if (message.eventPayload.oneofKind === "audioLevelChanged")
|
|
634
|
+
AudioLevelChanged.internalBinaryWrite(message.eventPayload.audioLevelChanged, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
635
|
+
/* stream.video.sfu.models.ICETrickle ice_trickle = 5; */
|
|
636
|
+
if (message.eventPayload.oneofKind === "iceTrickle")
|
|
637
|
+
ICETrickle$.internalBinaryWrite(message.eventPayload.iceTrickle, writer.tag(5, WireType.LengthDelimited).fork(), options).join();
|
|
638
|
+
/* stream.video.sfu.event.ChangePublishQuality change_publish_quality = 6; */
|
|
639
|
+
if (message.eventPayload.oneofKind === "changePublishQuality")
|
|
640
|
+
ChangePublishQuality.internalBinaryWrite(message.eventPayload.changePublishQuality, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
641
|
+
/* stream.video.sfu.event.ParticipantJoined participant_joined = 10; */
|
|
642
|
+
if (message.eventPayload.oneofKind === "participantJoined")
|
|
643
|
+
ParticipantJoined.internalBinaryWrite(message.eventPayload.participantJoined, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
644
|
+
/* stream.video.sfu.event.ParticipantLeft participant_left = 11; */
|
|
645
|
+
if (message.eventPayload.oneofKind === "participantLeft")
|
|
646
|
+
ParticipantLeft.internalBinaryWrite(message.eventPayload.participantLeft, writer.tag(11, WireType.LengthDelimited).fork(), options).join();
|
|
647
|
+
/* stream.video.sfu.event.DominantSpeakerChanged dominant_speaker_changed = 12; */
|
|
648
|
+
if (message.eventPayload.oneofKind === "dominantSpeakerChanged")
|
|
649
|
+
DominantSpeakerChanged.internalBinaryWrite(message.eventPayload.dominantSpeakerChanged, writer.tag(12, WireType.LengthDelimited).fork(), options).join();
|
|
650
|
+
/* stream.video.sfu.event.JoinResponse join_response = 13; */
|
|
651
|
+
if (message.eventPayload.oneofKind === "joinResponse")
|
|
652
|
+
JoinResponse.internalBinaryWrite(message.eventPayload.joinResponse, writer.tag(13, WireType.LengthDelimited).fork(), options).join();
|
|
653
|
+
/* stream.video.sfu.event.HealthCheckResponse health_check_response = 14; */
|
|
654
|
+
if (message.eventPayload.oneofKind === "healthCheckResponse")
|
|
655
|
+
HealthCheckResponse.internalBinaryWrite(message.eventPayload.healthCheckResponse, writer.tag(14, WireType.LengthDelimited).fork(), options).join();
|
|
656
|
+
/* stream.video.sfu.event.TrackPublished track_published = 16; */
|
|
657
|
+
if (message.eventPayload.oneofKind === "trackPublished")
|
|
658
|
+
TrackPublished.internalBinaryWrite(message.eventPayload.trackPublished, writer.tag(16, WireType.LengthDelimited).fork(), options).join();
|
|
659
|
+
/* stream.video.sfu.event.TrackUnpublished track_unpublished = 17; */
|
|
660
|
+
if (message.eventPayload.oneofKind === "trackUnpublished")
|
|
661
|
+
TrackUnpublished.internalBinaryWrite(message.eventPayload.trackUnpublished, writer.tag(17, WireType.LengthDelimited).fork(), options).join();
|
|
662
|
+
/* stream.video.sfu.event.Error error = 18; */
|
|
663
|
+
if (message.eventPayload.oneofKind === "error")
|
|
664
|
+
Error.internalBinaryWrite(message.eventPayload.error, writer.tag(18, WireType.LengthDelimited).fork(), options).join();
|
|
665
|
+
let u = options.writeUnknownFields;
|
|
666
|
+
if (u !== false)
|
|
667
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
668
|
+
return writer;
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
/**
|
|
672
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.SfuEvent
|
|
673
|
+
*/
|
|
674
|
+
export const SfuEvent = new SfuEvent$Type();
|
|
675
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
676
|
+
class Error$Type extends MessageType<Error> {
|
|
677
|
+
constructor() {
|
|
678
|
+
super("stream.video.sfu.event.Error", [
|
|
679
|
+
{ no: 4, name: "error", kind: "message", T: () => Error$ }
|
|
680
|
+
]);
|
|
681
|
+
}
|
|
682
|
+
create(value?: PartialMessage<Error>): Error {
|
|
683
|
+
const message = {};
|
|
684
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
685
|
+
if (value !== undefined)
|
|
686
|
+
reflectionMergePartial<Error>(this, message, value);
|
|
687
|
+
return message;
|
|
688
|
+
}
|
|
689
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Error): Error {
|
|
690
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
691
|
+
while (reader.pos < end) {
|
|
692
|
+
let [fieldNo, wireType] = reader.tag();
|
|
693
|
+
switch (fieldNo) {
|
|
694
|
+
case /* stream.video.sfu.models.Error error */ 4:
|
|
695
|
+
message.error = Error$.internalBinaryRead(reader, reader.uint32(), options, message.error);
|
|
696
|
+
break;
|
|
697
|
+
default:
|
|
698
|
+
let u = options.readUnknownField;
|
|
699
|
+
if (u === "throw")
|
|
700
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
701
|
+
let d = reader.skip(wireType);
|
|
702
|
+
if (u !== false)
|
|
703
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
704
|
+
}
|
|
705
|
+
}
|
|
706
|
+
return message;
|
|
707
|
+
}
|
|
708
|
+
internalBinaryWrite(message: Error, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
709
|
+
/* stream.video.sfu.models.Error error = 4; */
|
|
710
|
+
if (message.error)
|
|
711
|
+
Error$.internalBinaryWrite(message.error, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
712
|
+
let u = options.writeUnknownFields;
|
|
713
|
+
if (u !== false)
|
|
714
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
715
|
+
return writer;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
/**
|
|
719
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.Error
|
|
720
|
+
*/
|
|
721
|
+
export const Error = new Error$Type();
|
|
722
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
723
|
+
class ICETrickle$Type extends MessageType<ICETrickle> {
|
|
724
|
+
constructor() {
|
|
725
|
+
super("stream.video.sfu.event.ICETrickle", [
|
|
726
|
+
{ no: 1, name: "peer_type", kind: "enum", T: () => ["stream.video.sfu.models.PeerType", PeerType, "PEER_TYPE_"] },
|
|
727
|
+
{ no: 2, name: "ice_candidate", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
728
|
+
]);
|
|
729
|
+
}
|
|
730
|
+
create(value?: PartialMessage<ICETrickle>): ICETrickle {
|
|
731
|
+
const message = { peerType: 0, iceCandidate: "" };
|
|
732
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
733
|
+
if (value !== undefined)
|
|
734
|
+
reflectionMergePartial<ICETrickle>(this, message, value);
|
|
735
|
+
return message;
|
|
736
|
+
}
|
|
737
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ICETrickle): ICETrickle {
|
|
738
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
739
|
+
while (reader.pos < end) {
|
|
740
|
+
let [fieldNo, wireType] = reader.tag();
|
|
741
|
+
switch (fieldNo) {
|
|
742
|
+
case /* stream.video.sfu.models.PeerType peer_type */ 1:
|
|
743
|
+
message.peerType = reader.int32();
|
|
744
|
+
break;
|
|
745
|
+
case /* string ice_candidate */ 2:
|
|
746
|
+
message.iceCandidate = reader.string();
|
|
747
|
+
break;
|
|
748
|
+
default:
|
|
749
|
+
let u = options.readUnknownField;
|
|
750
|
+
if (u === "throw")
|
|
751
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
752
|
+
let d = reader.skip(wireType);
|
|
753
|
+
if (u !== false)
|
|
754
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
755
|
+
}
|
|
756
|
+
}
|
|
757
|
+
return message;
|
|
758
|
+
}
|
|
759
|
+
internalBinaryWrite(message: ICETrickle, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
760
|
+
/* stream.video.sfu.models.PeerType peer_type = 1; */
|
|
761
|
+
if (message.peerType !== 0)
|
|
762
|
+
writer.tag(1, WireType.Varint).int32(message.peerType);
|
|
763
|
+
/* string ice_candidate = 2; */
|
|
764
|
+
if (message.iceCandidate !== "")
|
|
765
|
+
writer.tag(2, WireType.LengthDelimited).string(message.iceCandidate);
|
|
766
|
+
let u = options.writeUnknownFields;
|
|
767
|
+
if (u !== false)
|
|
768
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
769
|
+
return writer;
|
|
770
|
+
}
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.ICETrickle
|
|
774
|
+
*/
|
|
775
|
+
export const ICETrickle = new ICETrickle$Type();
|
|
776
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
777
|
+
class SfuRequest$Type extends MessageType<SfuRequest> {
|
|
778
|
+
constructor() {
|
|
779
|
+
super("stream.video.sfu.event.SfuRequest", [
|
|
780
|
+
{ no: 1, name: "join_request", kind: "message", oneof: "requestPayload", T: () => JoinRequest },
|
|
781
|
+
{ no: 2, name: "health_check_request", kind: "message", oneof: "requestPayload", T: () => HealthCheckRequest }
|
|
782
|
+
]);
|
|
783
|
+
}
|
|
784
|
+
create(value?: PartialMessage<SfuRequest>): SfuRequest {
|
|
785
|
+
const message = { requestPayload: { oneofKind: undefined } };
|
|
786
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
787
|
+
if (value !== undefined)
|
|
788
|
+
reflectionMergePartial<SfuRequest>(this, message, value);
|
|
789
|
+
return message;
|
|
790
|
+
}
|
|
791
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SfuRequest): SfuRequest {
|
|
792
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
793
|
+
while (reader.pos < end) {
|
|
794
|
+
let [fieldNo, wireType] = reader.tag();
|
|
795
|
+
switch (fieldNo) {
|
|
796
|
+
case /* stream.video.sfu.event.JoinRequest join_request */ 1:
|
|
797
|
+
message.requestPayload = {
|
|
798
|
+
oneofKind: "joinRequest",
|
|
799
|
+
joinRequest: JoinRequest.internalBinaryRead(reader, reader.uint32(), options, (message.requestPayload as any).joinRequest)
|
|
800
|
+
};
|
|
801
|
+
break;
|
|
802
|
+
case /* stream.video.sfu.event.HealthCheckRequest health_check_request */ 2:
|
|
803
|
+
message.requestPayload = {
|
|
804
|
+
oneofKind: "healthCheckRequest",
|
|
805
|
+
healthCheckRequest: HealthCheckRequest.internalBinaryRead(reader, reader.uint32(), options, (message.requestPayload as any).healthCheckRequest)
|
|
806
|
+
};
|
|
807
|
+
break;
|
|
808
|
+
default:
|
|
809
|
+
let u = options.readUnknownField;
|
|
810
|
+
if (u === "throw")
|
|
811
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
812
|
+
let d = reader.skip(wireType);
|
|
813
|
+
if (u !== false)
|
|
814
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
return message;
|
|
818
|
+
}
|
|
819
|
+
internalBinaryWrite(message: SfuRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
820
|
+
/* stream.video.sfu.event.JoinRequest join_request = 1; */
|
|
821
|
+
if (message.requestPayload.oneofKind === "joinRequest")
|
|
822
|
+
JoinRequest.internalBinaryWrite(message.requestPayload.joinRequest, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
823
|
+
/* stream.video.sfu.event.HealthCheckRequest health_check_request = 2; */
|
|
824
|
+
if (message.requestPayload.oneofKind === "healthCheckRequest")
|
|
825
|
+
HealthCheckRequest.internalBinaryWrite(message.requestPayload.healthCheckRequest, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
826
|
+
let u = options.writeUnknownFields;
|
|
827
|
+
if (u !== false)
|
|
828
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
829
|
+
return writer;
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
/**
|
|
833
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.SfuRequest
|
|
834
|
+
*/
|
|
835
|
+
export const SfuRequest = new SfuRequest$Type();
|
|
836
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
837
|
+
class HealthCheckRequest$Type extends MessageType<HealthCheckRequest> {
|
|
838
|
+
constructor() {
|
|
839
|
+
super("stream.video.sfu.event.HealthCheckRequest", []);
|
|
840
|
+
}
|
|
841
|
+
create(value?: PartialMessage<HealthCheckRequest>): HealthCheckRequest {
|
|
842
|
+
const message = {};
|
|
843
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
844
|
+
if (value !== undefined)
|
|
845
|
+
reflectionMergePartial<HealthCheckRequest>(this, message, value);
|
|
846
|
+
return message;
|
|
847
|
+
}
|
|
848
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HealthCheckRequest): HealthCheckRequest {
|
|
849
|
+
return target ?? this.create();
|
|
850
|
+
}
|
|
851
|
+
internalBinaryWrite(message: HealthCheckRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
852
|
+
let u = options.writeUnknownFields;
|
|
853
|
+
if (u !== false)
|
|
854
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
855
|
+
return writer;
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
/**
|
|
859
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.HealthCheckRequest
|
|
860
|
+
*/
|
|
861
|
+
export const HealthCheckRequest = new HealthCheckRequest$Type();
|
|
862
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
863
|
+
class HealthCheckResponse$Type extends MessageType<HealthCheckResponse> {
|
|
864
|
+
constructor() {
|
|
865
|
+
super("stream.video.sfu.event.HealthCheckResponse", []);
|
|
866
|
+
}
|
|
867
|
+
create(value?: PartialMessage<HealthCheckResponse>): HealthCheckResponse {
|
|
868
|
+
const message = {};
|
|
869
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
870
|
+
if (value !== undefined)
|
|
871
|
+
reflectionMergePartial<HealthCheckResponse>(this, message, value);
|
|
872
|
+
return message;
|
|
873
|
+
}
|
|
874
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: HealthCheckResponse): HealthCheckResponse {
|
|
875
|
+
return target ?? this.create();
|
|
876
|
+
}
|
|
877
|
+
internalBinaryWrite(message: HealthCheckResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
878
|
+
let u = options.writeUnknownFields;
|
|
879
|
+
if (u !== false)
|
|
880
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
881
|
+
return writer;
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.HealthCheckResponse
|
|
886
|
+
*/
|
|
887
|
+
export const HealthCheckResponse = new HealthCheckResponse$Type();
|
|
888
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
889
|
+
class TrackPublished$Type extends MessageType<TrackPublished> {
|
|
890
|
+
constructor() {
|
|
891
|
+
super("stream.video.sfu.event.TrackPublished", [
|
|
892
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
893
|
+
{ no: 2, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
894
|
+
{ no: 3, name: "type", kind: "enum", T: () => ["stream.video.sfu.models.TrackType", TrackType, "TRACK_TYPE_"] }
|
|
895
|
+
]);
|
|
896
|
+
}
|
|
897
|
+
create(value?: PartialMessage<TrackPublished>): TrackPublished {
|
|
898
|
+
const message = { userId: "", sessionId: "", type: 0 };
|
|
899
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
900
|
+
if (value !== undefined)
|
|
901
|
+
reflectionMergePartial<TrackPublished>(this, message, value);
|
|
902
|
+
return message;
|
|
903
|
+
}
|
|
904
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackPublished): TrackPublished {
|
|
905
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
906
|
+
while (reader.pos < end) {
|
|
907
|
+
let [fieldNo, wireType] = reader.tag();
|
|
908
|
+
switch (fieldNo) {
|
|
909
|
+
case /* string user_id */ 1:
|
|
910
|
+
message.userId = reader.string();
|
|
911
|
+
break;
|
|
912
|
+
case /* string session_id */ 2:
|
|
913
|
+
message.sessionId = reader.string();
|
|
914
|
+
break;
|
|
915
|
+
case /* stream.video.sfu.models.TrackType type */ 3:
|
|
916
|
+
message.type = reader.int32();
|
|
917
|
+
break;
|
|
918
|
+
default:
|
|
919
|
+
let u = options.readUnknownField;
|
|
920
|
+
if (u === "throw")
|
|
921
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
922
|
+
let d = reader.skip(wireType);
|
|
923
|
+
if (u !== false)
|
|
924
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
return message;
|
|
928
|
+
}
|
|
929
|
+
internalBinaryWrite(message: TrackPublished, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
930
|
+
/* string user_id = 1; */
|
|
931
|
+
if (message.userId !== "")
|
|
932
|
+
writer.tag(1, WireType.LengthDelimited).string(message.userId);
|
|
933
|
+
/* string session_id = 2; */
|
|
934
|
+
if (message.sessionId !== "")
|
|
935
|
+
writer.tag(2, WireType.LengthDelimited).string(message.sessionId);
|
|
936
|
+
/* stream.video.sfu.models.TrackType type = 3; */
|
|
937
|
+
if (message.type !== 0)
|
|
938
|
+
writer.tag(3, WireType.Varint).int32(message.type);
|
|
939
|
+
let u = options.writeUnknownFields;
|
|
940
|
+
if (u !== false)
|
|
941
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
942
|
+
return writer;
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.TrackPublished
|
|
947
|
+
*/
|
|
948
|
+
export const TrackPublished = new TrackPublished$Type();
|
|
949
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
950
|
+
class TrackUnpublished$Type extends MessageType<TrackUnpublished> {
|
|
951
|
+
constructor() {
|
|
952
|
+
super("stream.video.sfu.event.TrackUnpublished", [
|
|
953
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
954
|
+
{ no: 2, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
955
|
+
{ no: 3, name: "type", kind: "enum", T: () => ["stream.video.sfu.models.TrackType", TrackType, "TRACK_TYPE_"] }
|
|
956
|
+
]);
|
|
957
|
+
}
|
|
958
|
+
create(value?: PartialMessage<TrackUnpublished>): TrackUnpublished {
|
|
959
|
+
const message = { userId: "", sessionId: "", type: 0 };
|
|
960
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
961
|
+
if (value !== undefined)
|
|
962
|
+
reflectionMergePartial<TrackUnpublished>(this, message, value);
|
|
963
|
+
return message;
|
|
964
|
+
}
|
|
965
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: TrackUnpublished): TrackUnpublished {
|
|
966
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
967
|
+
while (reader.pos < end) {
|
|
968
|
+
let [fieldNo, wireType] = reader.tag();
|
|
969
|
+
switch (fieldNo) {
|
|
970
|
+
case /* string user_id */ 1:
|
|
971
|
+
message.userId = reader.string();
|
|
972
|
+
break;
|
|
973
|
+
case /* string session_id */ 2:
|
|
974
|
+
message.sessionId = reader.string();
|
|
975
|
+
break;
|
|
976
|
+
case /* stream.video.sfu.models.TrackType type */ 3:
|
|
977
|
+
message.type = reader.int32();
|
|
978
|
+
break;
|
|
979
|
+
default:
|
|
980
|
+
let u = options.readUnknownField;
|
|
981
|
+
if (u === "throw")
|
|
982
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
983
|
+
let d = reader.skip(wireType);
|
|
984
|
+
if (u !== false)
|
|
985
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
return message;
|
|
989
|
+
}
|
|
990
|
+
internalBinaryWrite(message: TrackUnpublished, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
991
|
+
/* string user_id = 1; */
|
|
992
|
+
if (message.userId !== "")
|
|
993
|
+
writer.tag(1, WireType.LengthDelimited).string(message.userId);
|
|
994
|
+
/* string session_id = 2; */
|
|
995
|
+
if (message.sessionId !== "")
|
|
996
|
+
writer.tag(2, WireType.LengthDelimited).string(message.sessionId);
|
|
997
|
+
/* stream.video.sfu.models.TrackType type = 3; */
|
|
998
|
+
if (message.type !== 0)
|
|
999
|
+
writer.tag(3, WireType.Varint).int32(message.type);
|
|
1000
|
+
let u = options.writeUnknownFields;
|
|
1001
|
+
if (u !== false)
|
|
1002
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1003
|
+
return writer;
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
/**
|
|
1007
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.TrackUnpublished
|
|
1008
|
+
*/
|
|
1009
|
+
export const TrackUnpublished = new TrackUnpublished$Type();
|
|
1010
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1011
|
+
class JoinRequest$Type extends MessageType<JoinRequest> {
|
|
1012
|
+
constructor() {
|
|
1013
|
+
super("stream.video.sfu.event.JoinRequest", [
|
|
1014
|
+
{ no: 1, name: "token", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1015
|
+
{ no: 2, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1016
|
+
{ no: 3, name: "subscriber_sdp", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1017
|
+
]);
|
|
1018
|
+
}
|
|
1019
|
+
create(value?: PartialMessage<JoinRequest>): JoinRequest {
|
|
1020
|
+
const message = { token: "", sessionId: "", subscriberSdp: "" };
|
|
1021
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1022
|
+
if (value !== undefined)
|
|
1023
|
+
reflectionMergePartial<JoinRequest>(this, message, value);
|
|
1024
|
+
return message;
|
|
1025
|
+
}
|
|
1026
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: JoinRequest): JoinRequest {
|
|
1027
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1028
|
+
while (reader.pos < end) {
|
|
1029
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1030
|
+
switch (fieldNo) {
|
|
1031
|
+
case /* string token */ 1:
|
|
1032
|
+
message.token = reader.string();
|
|
1033
|
+
break;
|
|
1034
|
+
case /* string session_id */ 2:
|
|
1035
|
+
message.sessionId = reader.string();
|
|
1036
|
+
break;
|
|
1037
|
+
case /* string subscriber_sdp */ 3:
|
|
1038
|
+
message.subscriberSdp = reader.string();
|
|
1039
|
+
break;
|
|
1040
|
+
default:
|
|
1041
|
+
let u = options.readUnknownField;
|
|
1042
|
+
if (u === "throw")
|
|
1043
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1044
|
+
let d = reader.skip(wireType);
|
|
1045
|
+
if (u !== false)
|
|
1046
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
return message;
|
|
1050
|
+
}
|
|
1051
|
+
internalBinaryWrite(message: JoinRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1052
|
+
/* string token = 1; */
|
|
1053
|
+
if (message.token !== "")
|
|
1054
|
+
writer.tag(1, WireType.LengthDelimited).string(message.token);
|
|
1055
|
+
/* string session_id = 2; */
|
|
1056
|
+
if (message.sessionId !== "")
|
|
1057
|
+
writer.tag(2, WireType.LengthDelimited).string(message.sessionId);
|
|
1058
|
+
/* string subscriber_sdp = 3; */
|
|
1059
|
+
if (message.subscriberSdp !== "")
|
|
1060
|
+
writer.tag(3, WireType.LengthDelimited).string(message.subscriberSdp);
|
|
1061
|
+
let u = options.writeUnknownFields;
|
|
1062
|
+
if (u !== false)
|
|
1063
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1064
|
+
return writer;
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
/**
|
|
1068
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.JoinRequest
|
|
1069
|
+
*/
|
|
1070
|
+
export const JoinRequest = new JoinRequest$Type();
|
|
1071
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1072
|
+
class JoinResponse$Type extends MessageType<JoinResponse> {
|
|
1073
|
+
constructor() {
|
|
1074
|
+
super("stream.video.sfu.event.JoinResponse", [
|
|
1075
|
+
{ no: 1, name: "call_state", kind: "message", T: () => CallState }
|
|
1076
|
+
]);
|
|
1077
|
+
}
|
|
1078
|
+
create(value?: PartialMessage<JoinResponse>): JoinResponse {
|
|
1079
|
+
const message = {};
|
|
1080
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1081
|
+
if (value !== undefined)
|
|
1082
|
+
reflectionMergePartial<JoinResponse>(this, message, value);
|
|
1083
|
+
return message;
|
|
1084
|
+
}
|
|
1085
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: JoinResponse): JoinResponse {
|
|
1086
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1087
|
+
while (reader.pos < end) {
|
|
1088
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1089
|
+
switch (fieldNo) {
|
|
1090
|
+
case /* stream.video.sfu.models.CallState call_state */ 1:
|
|
1091
|
+
message.callState = CallState.internalBinaryRead(reader, reader.uint32(), options, message.callState);
|
|
1092
|
+
break;
|
|
1093
|
+
default:
|
|
1094
|
+
let u = options.readUnknownField;
|
|
1095
|
+
if (u === "throw")
|
|
1096
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1097
|
+
let d = reader.skip(wireType);
|
|
1098
|
+
if (u !== false)
|
|
1099
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
return message;
|
|
1103
|
+
}
|
|
1104
|
+
internalBinaryWrite(message: JoinResponse, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1105
|
+
/* stream.video.sfu.models.CallState call_state = 1; */
|
|
1106
|
+
if (message.callState)
|
|
1107
|
+
CallState.internalBinaryWrite(message.callState, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1108
|
+
let u = options.writeUnknownFields;
|
|
1109
|
+
if (u !== false)
|
|
1110
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1111
|
+
return writer;
|
|
1112
|
+
}
|
|
1113
|
+
}
|
|
1114
|
+
/**
|
|
1115
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.JoinResponse
|
|
1116
|
+
*/
|
|
1117
|
+
export const JoinResponse = new JoinResponse$Type();
|
|
1118
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1119
|
+
class ParticipantJoined$Type extends MessageType<ParticipantJoined> {
|
|
1120
|
+
constructor() {
|
|
1121
|
+
super("stream.video.sfu.event.ParticipantJoined", [
|
|
1122
|
+
{ no: 1, name: "call_cid", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1123
|
+
{ no: 2, name: "participant", kind: "message", T: () => Participant }
|
|
1124
|
+
]);
|
|
1125
|
+
}
|
|
1126
|
+
create(value?: PartialMessage<ParticipantJoined>): ParticipantJoined {
|
|
1127
|
+
const message = { callCid: "" };
|
|
1128
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1129
|
+
if (value !== undefined)
|
|
1130
|
+
reflectionMergePartial<ParticipantJoined>(this, message, value);
|
|
1131
|
+
return message;
|
|
1132
|
+
}
|
|
1133
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ParticipantJoined): ParticipantJoined {
|
|
1134
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1135
|
+
while (reader.pos < end) {
|
|
1136
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1137
|
+
switch (fieldNo) {
|
|
1138
|
+
case /* string call_cid */ 1:
|
|
1139
|
+
message.callCid = reader.string();
|
|
1140
|
+
break;
|
|
1141
|
+
case /* stream.video.sfu.models.Participant participant */ 2:
|
|
1142
|
+
message.participant = Participant.internalBinaryRead(reader, reader.uint32(), options, message.participant);
|
|
1143
|
+
break;
|
|
1144
|
+
default:
|
|
1145
|
+
let u = options.readUnknownField;
|
|
1146
|
+
if (u === "throw")
|
|
1147
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1148
|
+
let d = reader.skip(wireType);
|
|
1149
|
+
if (u !== false)
|
|
1150
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1151
|
+
}
|
|
1152
|
+
}
|
|
1153
|
+
return message;
|
|
1154
|
+
}
|
|
1155
|
+
internalBinaryWrite(message: ParticipantJoined, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1156
|
+
/* string call_cid = 1; */
|
|
1157
|
+
if (message.callCid !== "")
|
|
1158
|
+
writer.tag(1, WireType.LengthDelimited).string(message.callCid);
|
|
1159
|
+
/* stream.video.sfu.models.Participant participant = 2; */
|
|
1160
|
+
if (message.participant)
|
|
1161
|
+
Participant.internalBinaryWrite(message.participant, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
1162
|
+
let u = options.writeUnknownFields;
|
|
1163
|
+
if (u !== false)
|
|
1164
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1165
|
+
return writer;
|
|
1166
|
+
}
|
|
1167
|
+
}
|
|
1168
|
+
/**
|
|
1169
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.ParticipantJoined
|
|
1170
|
+
*/
|
|
1171
|
+
export const ParticipantJoined = new ParticipantJoined$Type();
|
|
1172
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1173
|
+
class ParticipantLeft$Type extends MessageType<ParticipantLeft> {
|
|
1174
|
+
constructor() {
|
|
1175
|
+
super("stream.video.sfu.event.ParticipantLeft", [
|
|
1176
|
+
{ no: 1, name: "call_cid", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1177
|
+
{ no: 2, name: "participant", kind: "message", T: () => Participant }
|
|
1178
|
+
]);
|
|
1179
|
+
}
|
|
1180
|
+
create(value?: PartialMessage<ParticipantLeft>): ParticipantLeft {
|
|
1181
|
+
const message = { callCid: "" };
|
|
1182
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1183
|
+
if (value !== undefined)
|
|
1184
|
+
reflectionMergePartial<ParticipantLeft>(this, message, value);
|
|
1185
|
+
return message;
|
|
1186
|
+
}
|
|
1187
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ParticipantLeft): ParticipantLeft {
|
|
1188
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1189
|
+
while (reader.pos < end) {
|
|
1190
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1191
|
+
switch (fieldNo) {
|
|
1192
|
+
case /* string call_cid */ 1:
|
|
1193
|
+
message.callCid = reader.string();
|
|
1194
|
+
break;
|
|
1195
|
+
case /* stream.video.sfu.models.Participant participant */ 2:
|
|
1196
|
+
message.participant = Participant.internalBinaryRead(reader, reader.uint32(), options, message.participant);
|
|
1197
|
+
break;
|
|
1198
|
+
default:
|
|
1199
|
+
let u = options.readUnknownField;
|
|
1200
|
+
if (u === "throw")
|
|
1201
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1202
|
+
let d = reader.skip(wireType);
|
|
1203
|
+
if (u !== false)
|
|
1204
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
return message;
|
|
1208
|
+
}
|
|
1209
|
+
internalBinaryWrite(message: ParticipantLeft, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1210
|
+
/* string call_cid = 1; */
|
|
1211
|
+
if (message.callCid !== "")
|
|
1212
|
+
writer.tag(1, WireType.LengthDelimited).string(message.callCid);
|
|
1213
|
+
/* stream.video.sfu.models.Participant participant = 2; */
|
|
1214
|
+
if (message.participant)
|
|
1215
|
+
Participant.internalBinaryWrite(message.participant, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
1216
|
+
let u = options.writeUnknownFields;
|
|
1217
|
+
if (u !== false)
|
|
1218
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1219
|
+
return writer;
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
/**
|
|
1223
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.ParticipantLeft
|
|
1224
|
+
*/
|
|
1225
|
+
export const ParticipantLeft = new ParticipantLeft$Type();
|
|
1226
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1227
|
+
class SubscriberOffer$Type extends MessageType<SubscriberOffer> {
|
|
1228
|
+
constructor() {
|
|
1229
|
+
super("stream.video.sfu.event.SubscriberOffer", [
|
|
1230
|
+
{ no: 1, name: "ice_restart", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1231
|
+
{ no: 2, name: "sdp", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1232
|
+
]);
|
|
1233
|
+
}
|
|
1234
|
+
create(value?: PartialMessage<SubscriberOffer>): SubscriberOffer {
|
|
1235
|
+
const message = { iceRestart: false, sdp: "" };
|
|
1236
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1237
|
+
if (value !== undefined)
|
|
1238
|
+
reflectionMergePartial<SubscriberOffer>(this, message, value);
|
|
1239
|
+
return message;
|
|
1240
|
+
}
|
|
1241
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: SubscriberOffer): SubscriberOffer {
|
|
1242
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1243
|
+
while (reader.pos < end) {
|
|
1244
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1245
|
+
switch (fieldNo) {
|
|
1246
|
+
case /* bool ice_restart */ 1:
|
|
1247
|
+
message.iceRestart = reader.bool();
|
|
1248
|
+
break;
|
|
1249
|
+
case /* string sdp */ 2:
|
|
1250
|
+
message.sdp = reader.string();
|
|
1251
|
+
break;
|
|
1252
|
+
default:
|
|
1253
|
+
let u = options.readUnknownField;
|
|
1254
|
+
if (u === "throw")
|
|
1255
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1256
|
+
let d = reader.skip(wireType);
|
|
1257
|
+
if (u !== false)
|
|
1258
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
return message;
|
|
1262
|
+
}
|
|
1263
|
+
internalBinaryWrite(message: SubscriberOffer, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1264
|
+
/* bool ice_restart = 1; */
|
|
1265
|
+
if (message.iceRestart !== false)
|
|
1266
|
+
writer.tag(1, WireType.Varint).bool(message.iceRestart);
|
|
1267
|
+
/* string sdp = 2; */
|
|
1268
|
+
if (message.sdp !== "")
|
|
1269
|
+
writer.tag(2, WireType.LengthDelimited).string(message.sdp);
|
|
1270
|
+
let u = options.writeUnknownFields;
|
|
1271
|
+
if (u !== false)
|
|
1272
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1273
|
+
return writer;
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
/**
|
|
1277
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.SubscriberOffer
|
|
1278
|
+
*/
|
|
1279
|
+
export const SubscriberOffer = new SubscriberOffer$Type();
|
|
1280
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1281
|
+
class PublisherAnswer$Type extends MessageType<PublisherAnswer> {
|
|
1282
|
+
constructor() {
|
|
1283
|
+
super("stream.video.sfu.event.PublisherAnswer", [
|
|
1284
|
+
{ no: 1, name: "sdp", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1285
|
+
]);
|
|
1286
|
+
}
|
|
1287
|
+
create(value?: PartialMessage<PublisherAnswer>): PublisherAnswer {
|
|
1288
|
+
const message = { sdp: "" };
|
|
1289
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1290
|
+
if (value !== undefined)
|
|
1291
|
+
reflectionMergePartial<PublisherAnswer>(this, message, value);
|
|
1292
|
+
return message;
|
|
1293
|
+
}
|
|
1294
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: PublisherAnswer): PublisherAnswer {
|
|
1295
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1296
|
+
while (reader.pos < end) {
|
|
1297
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1298
|
+
switch (fieldNo) {
|
|
1299
|
+
case /* string sdp */ 1:
|
|
1300
|
+
message.sdp = reader.string();
|
|
1301
|
+
break;
|
|
1302
|
+
default:
|
|
1303
|
+
let u = options.readUnknownField;
|
|
1304
|
+
if (u === "throw")
|
|
1305
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1306
|
+
let d = reader.skip(wireType);
|
|
1307
|
+
if (u !== false)
|
|
1308
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
return message;
|
|
1312
|
+
}
|
|
1313
|
+
internalBinaryWrite(message: PublisherAnswer, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1314
|
+
/* string sdp = 1; */
|
|
1315
|
+
if (message.sdp !== "")
|
|
1316
|
+
writer.tag(1, WireType.LengthDelimited).string(message.sdp);
|
|
1317
|
+
let u = options.writeUnknownFields;
|
|
1318
|
+
if (u !== false)
|
|
1319
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1320
|
+
return writer;
|
|
1321
|
+
}
|
|
1322
|
+
}
|
|
1323
|
+
/**
|
|
1324
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.PublisherAnswer
|
|
1325
|
+
*/
|
|
1326
|
+
export const PublisherAnswer = new PublisherAnswer$Type();
|
|
1327
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1328
|
+
class ConnectionQualityChanged$Type extends MessageType<ConnectionQualityChanged> {
|
|
1329
|
+
constructor() {
|
|
1330
|
+
super("stream.video.sfu.event.ConnectionQualityChanged", [
|
|
1331
|
+
{ no: 1, name: "connection_quality_updates", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => ConnectionQualityInfo }
|
|
1332
|
+
]);
|
|
1333
|
+
}
|
|
1334
|
+
create(value?: PartialMessage<ConnectionQualityChanged>): ConnectionQualityChanged {
|
|
1335
|
+
const message = { connectionQualityUpdates: [] };
|
|
1336
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1337
|
+
if (value !== undefined)
|
|
1338
|
+
reflectionMergePartial<ConnectionQualityChanged>(this, message, value);
|
|
1339
|
+
return message;
|
|
1340
|
+
}
|
|
1341
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConnectionQualityChanged): ConnectionQualityChanged {
|
|
1342
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1343
|
+
while (reader.pos < end) {
|
|
1344
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1345
|
+
switch (fieldNo) {
|
|
1346
|
+
case /* repeated stream.video.sfu.event.ConnectionQualityInfo connection_quality_updates */ 1:
|
|
1347
|
+
message.connectionQualityUpdates.push(ConnectionQualityInfo.internalBinaryRead(reader, reader.uint32(), options));
|
|
1348
|
+
break;
|
|
1349
|
+
default:
|
|
1350
|
+
let u = options.readUnknownField;
|
|
1351
|
+
if (u === "throw")
|
|
1352
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1353
|
+
let d = reader.skip(wireType);
|
|
1354
|
+
if (u !== false)
|
|
1355
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1356
|
+
}
|
|
1357
|
+
}
|
|
1358
|
+
return message;
|
|
1359
|
+
}
|
|
1360
|
+
internalBinaryWrite(message: ConnectionQualityChanged, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1361
|
+
/* repeated stream.video.sfu.event.ConnectionQualityInfo connection_quality_updates = 1; */
|
|
1362
|
+
for (let i = 0; i < message.connectionQualityUpdates.length; i++)
|
|
1363
|
+
ConnectionQualityInfo.internalBinaryWrite(message.connectionQualityUpdates[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1364
|
+
let u = options.writeUnknownFields;
|
|
1365
|
+
if (u !== false)
|
|
1366
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1367
|
+
return writer;
|
|
1368
|
+
}
|
|
1369
|
+
}
|
|
1370
|
+
/**
|
|
1371
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.ConnectionQualityChanged
|
|
1372
|
+
*/
|
|
1373
|
+
export const ConnectionQualityChanged = new ConnectionQualityChanged$Type();
|
|
1374
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1375
|
+
class ConnectionQualityInfo$Type extends MessageType<ConnectionQualityInfo> {
|
|
1376
|
+
constructor() {
|
|
1377
|
+
super("stream.video.sfu.event.ConnectionQualityInfo", [
|
|
1378
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1379
|
+
{ no: 2, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1380
|
+
{ no: 3, name: "connection_quality", kind: "enum", T: () => ["stream.video.sfu.models.ConnectionQuality", ConnectionQuality, "CONNECTION_QUALITY_"] }
|
|
1381
|
+
]);
|
|
1382
|
+
}
|
|
1383
|
+
create(value?: PartialMessage<ConnectionQualityInfo>): ConnectionQualityInfo {
|
|
1384
|
+
const message = { userId: "", sessionId: "", connectionQuality: 0 };
|
|
1385
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1386
|
+
if (value !== undefined)
|
|
1387
|
+
reflectionMergePartial<ConnectionQualityInfo>(this, message, value);
|
|
1388
|
+
return message;
|
|
1389
|
+
}
|
|
1390
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ConnectionQualityInfo): ConnectionQualityInfo {
|
|
1391
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1392
|
+
while (reader.pos < end) {
|
|
1393
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1394
|
+
switch (fieldNo) {
|
|
1395
|
+
case /* string user_id */ 1:
|
|
1396
|
+
message.userId = reader.string();
|
|
1397
|
+
break;
|
|
1398
|
+
case /* string session_id */ 2:
|
|
1399
|
+
message.sessionId = reader.string();
|
|
1400
|
+
break;
|
|
1401
|
+
case /* stream.video.sfu.models.ConnectionQuality connection_quality */ 3:
|
|
1402
|
+
message.connectionQuality = reader.int32();
|
|
1403
|
+
break;
|
|
1404
|
+
default:
|
|
1405
|
+
let u = options.readUnknownField;
|
|
1406
|
+
if (u === "throw")
|
|
1407
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1408
|
+
let d = reader.skip(wireType);
|
|
1409
|
+
if (u !== false)
|
|
1410
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1411
|
+
}
|
|
1412
|
+
}
|
|
1413
|
+
return message;
|
|
1414
|
+
}
|
|
1415
|
+
internalBinaryWrite(message: ConnectionQualityInfo, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1416
|
+
/* string user_id = 1; */
|
|
1417
|
+
if (message.userId !== "")
|
|
1418
|
+
writer.tag(1, WireType.LengthDelimited).string(message.userId);
|
|
1419
|
+
/* string session_id = 2; */
|
|
1420
|
+
if (message.sessionId !== "")
|
|
1421
|
+
writer.tag(2, WireType.LengthDelimited).string(message.sessionId);
|
|
1422
|
+
/* stream.video.sfu.models.ConnectionQuality connection_quality = 3; */
|
|
1423
|
+
if (message.connectionQuality !== 0)
|
|
1424
|
+
writer.tag(3, WireType.Varint).int32(message.connectionQuality);
|
|
1425
|
+
let u = options.writeUnknownFields;
|
|
1426
|
+
if (u !== false)
|
|
1427
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1428
|
+
return writer;
|
|
1429
|
+
}
|
|
1430
|
+
}
|
|
1431
|
+
/**
|
|
1432
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.ConnectionQualityInfo
|
|
1433
|
+
*/
|
|
1434
|
+
export const ConnectionQualityInfo = new ConnectionQualityInfo$Type();
|
|
1435
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1436
|
+
class DominantSpeakerChanged$Type extends MessageType<DominantSpeakerChanged> {
|
|
1437
|
+
constructor() {
|
|
1438
|
+
super("stream.video.sfu.event.DominantSpeakerChanged", [
|
|
1439
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1440
|
+
{ no: 2, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ }
|
|
1441
|
+
]);
|
|
1442
|
+
}
|
|
1443
|
+
create(value?: PartialMessage<DominantSpeakerChanged>): DominantSpeakerChanged {
|
|
1444
|
+
const message = { userId: "", sessionId: "" };
|
|
1445
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1446
|
+
if (value !== undefined)
|
|
1447
|
+
reflectionMergePartial<DominantSpeakerChanged>(this, message, value);
|
|
1448
|
+
return message;
|
|
1449
|
+
}
|
|
1450
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: DominantSpeakerChanged): DominantSpeakerChanged {
|
|
1451
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1452
|
+
while (reader.pos < end) {
|
|
1453
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1454
|
+
switch (fieldNo) {
|
|
1455
|
+
case /* string user_id */ 1:
|
|
1456
|
+
message.userId = reader.string();
|
|
1457
|
+
break;
|
|
1458
|
+
case /* string session_id */ 2:
|
|
1459
|
+
message.sessionId = reader.string();
|
|
1460
|
+
break;
|
|
1461
|
+
default:
|
|
1462
|
+
let u = options.readUnknownField;
|
|
1463
|
+
if (u === "throw")
|
|
1464
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1465
|
+
let d = reader.skip(wireType);
|
|
1466
|
+
if (u !== false)
|
|
1467
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1468
|
+
}
|
|
1469
|
+
}
|
|
1470
|
+
return message;
|
|
1471
|
+
}
|
|
1472
|
+
internalBinaryWrite(message: DominantSpeakerChanged, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1473
|
+
/* string user_id = 1; */
|
|
1474
|
+
if (message.userId !== "")
|
|
1475
|
+
writer.tag(1, WireType.LengthDelimited).string(message.userId);
|
|
1476
|
+
/* string session_id = 2; */
|
|
1477
|
+
if (message.sessionId !== "")
|
|
1478
|
+
writer.tag(2, WireType.LengthDelimited).string(message.sessionId);
|
|
1479
|
+
let u = options.writeUnknownFields;
|
|
1480
|
+
if (u !== false)
|
|
1481
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1482
|
+
return writer;
|
|
1483
|
+
}
|
|
1484
|
+
}
|
|
1485
|
+
/**
|
|
1486
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.DominantSpeakerChanged
|
|
1487
|
+
*/
|
|
1488
|
+
export const DominantSpeakerChanged = new DominantSpeakerChanged$Type();
|
|
1489
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1490
|
+
class AudioLevel$Type extends MessageType<AudioLevel> {
|
|
1491
|
+
constructor() {
|
|
1492
|
+
super("stream.video.sfu.event.AudioLevel", [
|
|
1493
|
+
{ no: 1, name: "user_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1494
|
+
{ no: 2, name: "session_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1495
|
+
{ no: 3, name: "level", kind: "scalar", T: 2 /*ScalarType.FLOAT*/ },
|
|
1496
|
+
{ no: 4, name: "is_speaking", kind: "scalar", T: 8 /*ScalarType.BOOL*/ }
|
|
1497
|
+
]);
|
|
1498
|
+
}
|
|
1499
|
+
create(value?: PartialMessage<AudioLevel>): AudioLevel {
|
|
1500
|
+
const message = { userId: "", sessionId: "", level: 0, isSpeaking: false };
|
|
1501
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1502
|
+
if (value !== undefined)
|
|
1503
|
+
reflectionMergePartial<AudioLevel>(this, message, value);
|
|
1504
|
+
return message;
|
|
1505
|
+
}
|
|
1506
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AudioLevel): AudioLevel {
|
|
1507
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1508
|
+
while (reader.pos < end) {
|
|
1509
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1510
|
+
switch (fieldNo) {
|
|
1511
|
+
case /* string user_id */ 1:
|
|
1512
|
+
message.userId = reader.string();
|
|
1513
|
+
break;
|
|
1514
|
+
case /* string session_id */ 2:
|
|
1515
|
+
message.sessionId = reader.string();
|
|
1516
|
+
break;
|
|
1517
|
+
case /* float level */ 3:
|
|
1518
|
+
message.level = reader.float();
|
|
1519
|
+
break;
|
|
1520
|
+
case /* bool is_speaking */ 4:
|
|
1521
|
+
message.isSpeaking = reader.bool();
|
|
1522
|
+
break;
|
|
1523
|
+
default:
|
|
1524
|
+
let u = options.readUnknownField;
|
|
1525
|
+
if (u === "throw")
|
|
1526
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1527
|
+
let d = reader.skip(wireType);
|
|
1528
|
+
if (u !== false)
|
|
1529
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
return message;
|
|
1533
|
+
}
|
|
1534
|
+
internalBinaryWrite(message: AudioLevel, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1535
|
+
/* string user_id = 1; */
|
|
1536
|
+
if (message.userId !== "")
|
|
1537
|
+
writer.tag(1, WireType.LengthDelimited).string(message.userId);
|
|
1538
|
+
/* string session_id = 2; */
|
|
1539
|
+
if (message.sessionId !== "")
|
|
1540
|
+
writer.tag(2, WireType.LengthDelimited).string(message.sessionId);
|
|
1541
|
+
/* float level = 3; */
|
|
1542
|
+
if (message.level !== 0)
|
|
1543
|
+
writer.tag(3, WireType.Bit32).float(message.level);
|
|
1544
|
+
/* bool is_speaking = 4; */
|
|
1545
|
+
if (message.isSpeaking !== false)
|
|
1546
|
+
writer.tag(4, WireType.Varint).bool(message.isSpeaking);
|
|
1547
|
+
let u = options.writeUnknownFields;
|
|
1548
|
+
if (u !== false)
|
|
1549
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1550
|
+
return writer;
|
|
1551
|
+
}
|
|
1552
|
+
}
|
|
1553
|
+
/**
|
|
1554
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.AudioLevel
|
|
1555
|
+
*/
|
|
1556
|
+
export const AudioLevel = new AudioLevel$Type();
|
|
1557
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1558
|
+
class AudioLevelChanged$Type extends MessageType<AudioLevelChanged> {
|
|
1559
|
+
constructor() {
|
|
1560
|
+
super("stream.video.sfu.event.AudioLevelChanged", [
|
|
1561
|
+
{ no: 1, name: "audio_levels", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => AudioLevel }
|
|
1562
|
+
]);
|
|
1563
|
+
}
|
|
1564
|
+
create(value?: PartialMessage<AudioLevelChanged>): AudioLevelChanged {
|
|
1565
|
+
const message = { audioLevels: [] };
|
|
1566
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1567
|
+
if (value !== undefined)
|
|
1568
|
+
reflectionMergePartial<AudioLevelChanged>(this, message, value);
|
|
1569
|
+
return message;
|
|
1570
|
+
}
|
|
1571
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AudioLevelChanged): AudioLevelChanged {
|
|
1572
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1573
|
+
while (reader.pos < end) {
|
|
1574
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1575
|
+
switch (fieldNo) {
|
|
1576
|
+
case /* repeated stream.video.sfu.event.AudioLevel audio_levels */ 1:
|
|
1577
|
+
message.audioLevels.push(AudioLevel.internalBinaryRead(reader, reader.uint32(), options));
|
|
1578
|
+
break;
|
|
1579
|
+
default:
|
|
1580
|
+
let u = options.readUnknownField;
|
|
1581
|
+
if (u === "throw")
|
|
1582
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1583
|
+
let d = reader.skip(wireType);
|
|
1584
|
+
if (u !== false)
|
|
1585
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1586
|
+
}
|
|
1587
|
+
}
|
|
1588
|
+
return message;
|
|
1589
|
+
}
|
|
1590
|
+
internalBinaryWrite(message: AudioLevelChanged, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1591
|
+
/* repeated stream.video.sfu.event.AudioLevel audio_levels = 1; */
|
|
1592
|
+
for (let i = 0; i < message.audioLevels.length; i++)
|
|
1593
|
+
AudioLevel.internalBinaryWrite(message.audioLevels[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1594
|
+
let u = options.writeUnknownFields;
|
|
1595
|
+
if (u !== false)
|
|
1596
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1597
|
+
return writer;
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
/**
|
|
1601
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.AudioLevelChanged
|
|
1602
|
+
*/
|
|
1603
|
+
export const AudioLevelChanged = new AudioLevelChanged$Type();
|
|
1604
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1605
|
+
class AudioMediaRequest$Type extends MessageType<AudioMediaRequest> {
|
|
1606
|
+
constructor() {
|
|
1607
|
+
super("stream.video.sfu.event.AudioMediaRequest", [
|
|
1608
|
+
{ no: 1, name: "channel_count", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
|
1609
|
+
]);
|
|
1610
|
+
}
|
|
1611
|
+
create(value?: PartialMessage<AudioMediaRequest>): AudioMediaRequest {
|
|
1612
|
+
const message = { channelCount: 0 };
|
|
1613
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1614
|
+
if (value !== undefined)
|
|
1615
|
+
reflectionMergePartial<AudioMediaRequest>(this, message, value);
|
|
1616
|
+
return message;
|
|
1617
|
+
}
|
|
1618
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AudioMediaRequest): AudioMediaRequest {
|
|
1619
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1620
|
+
while (reader.pos < end) {
|
|
1621
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1622
|
+
switch (fieldNo) {
|
|
1623
|
+
case /* int32 channel_count */ 1:
|
|
1624
|
+
message.channelCount = reader.int32();
|
|
1625
|
+
break;
|
|
1626
|
+
default:
|
|
1627
|
+
let u = options.readUnknownField;
|
|
1628
|
+
if (u === "throw")
|
|
1629
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1630
|
+
let d = reader.skip(wireType);
|
|
1631
|
+
if (u !== false)
|
|
1632
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
return message;
|
|
1636
|
+
}
|
|
1637
|
+
internalBinaryWrite(message: AudioMediaRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1638
|
+
/* int32 channel_count = 1; */
|
|
1639
|
+
if (message.channelCount !== 0)
|
|
1640
|
+
writer.tag(1, WireType.Varint).int32(message.channelCount);
|
|
1641
|
+
let u = options.writeUnknownFields;
|
|
1642
|
+
if (u !== false)
|
|
1643
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1644
|
+
return writer;
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
/**
|
|
1648
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.AudioMediaRequest
|
|
1649
|
+
*/
|
|
1650
|
+
export const AudioMediaRequest = new AudioMediaRequest$Type();
|
|
1651
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1652
|
+
class AudioSender$Type extends MessageType<AudioSender> {
|
|
1653
|
+
constructor() {
|
|
1654
|
+
super("stream.video.sfu.event.AudioSender", [
|
|
1655
|
+
{ no: 1, name: "media_request", kind: "message", T: () => AudioMediaRequest },
|
|
1656
|
+
{ no: 2, name: "codec", kind: "message", T: () => Codec }
|
|
1657
|
+
]);
|
|
1658
|
+
}
|
|
1659
|
+
create(value?: PartialMessage<AudioSender>): AudioSender {
|
|
1660
|
+
const message = {};
|
|
1661
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1662
|
+
if (value !== undefined)
|
|
1663
|
+
reflectionMergePartial<AudioSender>(this, message, value);
|
|
1664
|
+
return message;
|
|
1665
|
+
}
|
|
1666
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: AudioSender): AudioSender {
|
|
1667
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1668
|
+
while (reader.pos < end) {
|
|
1669
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1670
|
+
switch (fieldNo) {
|
|
1671
|
+
case /* stream.video.sfu.event.AudioMediaRequest media_request */ 1:
|
|
1672
|
+
message.mediaRequest = AudioMediaRequest.internalBinaryRead(reader, reader.uint32(), options, message.mediaRequest);
|
|
1673
|
+
break;
|
|
1674
|
+
case /* stream.video.sfu.models.Codec codec */ 2:
|
|
1675
|
+
message.codec = Codec.internalBinaryRead(reader, reader.uint32(), options, message.codec);
|
|
1676
|
+
break;
|
|
1677
|
+
default:
|
|
1678
|
+
let u = options.readUnknownField;
|
|
1679
|
+
if (u === "throw")
|
|
1680
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1681
|
+
let d = reader.skip(wireType);
|
|
1682
|
+
if (u !== false)
|
|
1683
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
return message;
|
|
1687
|
+
}
|
|
1688
|
+
internalBinaryWrite(message: AudioSender, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1689
|
+
/* stream.video.sfu.event.AudioMediaRequest media_request = 1; */
|
|
1690
|
+
if (message.mediaRequest)
|
|
1691
|
+
AudioMediaRequest.internalBinaryWrite(message.mediaRequest, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1692
|
+
/* stream.video.sfu.models.Codec codec = 2; */
|
|
1693
|
+
if (message.codec)
|
|
1694
|
+
Codec.internalBinaryWrite(message.codec, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
1695
|
+
let u = options.writeUnknownFields;
|
|
1696
|
+
if (u !== false)
|
|
1697
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1698
|
+
return writer;
|
|
1699
|
+
}
|
|
1700
|
+
}
|
|
1701
|
+
/**
|
|
1702
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.AudioSender
|
|
1703
|
+
*/
|
|
1704
|
+
export const AudioSender = new AudioSender$Type();
|
|
1705
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1706
|
+
class VideoMediaRequest$Type extends MessageType<VideoMediaRequest> {
|
|
1707
|
+
constructor() {
|
|
1708
|
+
super("stream.video.sfu.event.VideoMediaRequest", [
|
|
1709
|
+
{ no: 1, name: "ideal_height", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1710
|
+
{ no: 2, name: "ideal_width", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1711
|
+
{ no: 3, name: "ideal_frame_rate", kind: "scalar", T: 5 /*ScalarType.INT32*/ }
|
|
1712
|
+
]);
|
|
1713
|
+
}
|
|
1714
|
+
create(value?: PartialMessage<VideoMediaRequest>): VideoMediaRequest {
|
|
1715
|
+
const message = { idealHeight: 0, idealWidth: 0, idealFrameRate: 0 };
|
|
1716
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1717
|
+
if (value !== undefined)
|
|
1718
|
+
reflectionMergePartial<VideoMediaRequest>(this, message, value);
|
|
1719
|
+
return message;
|
|
1720
|
+
}
|
|
1721
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: VideoMediaRequest): VideoMediaRequest {
|
|
1722
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1723
|
+
while (reader.pos < end) {
|
|
1724
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1725
|
+
switch (fieldNo) {
|
|
1726
|
+
case /* int32 ideal_height */ 1:
|
|
1727
|
+
message.idealHeight = reader.int32();
|
|
1728
|
+
break;
|
|
1729
|
+
case /* int32 ideal_width */ 2:
|
|
1730
|
+
message.idealWidth = reader.int32();
|
|
1731
|
+
break;
|
|
1732
|
+
case /* int32 ideal_frame_rate */ 3:
|
|
1733
|
+
message.idealFrameRate = reader.int32();
|
|
1734
|
+
break;
|
|
1735
|
+
default:
|
|
1736
|
+
let u = options.readUnknownField;
|
|
1737
|
+
if (u === "throw")
|
|
1738
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1739
|
+
let d = reader.skip(wireType);
|
|
1740
|
+
if (u !== false)
|
|
1741
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
return message;
|
|
1745
|
+
}
|
|
1746
|
+
internalBinaryWrite(message: VideoMediaRequest, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1747
|
+
/* int32 ideal_height = 1; */
|
|
1748
|
+
if (message.idealHeight !== 0)
|
|
1749
|
+
writer.tag(1, WireType.Varint).int32(message.idealHeight);
|
|
1750
|
+
/* int32 ideal_width = 2; */
|
|
1751
|
+
if (message.idealWidth !== 0)
|
|
1752
|
+
writer.tag(2, WireType.Varint).int32(message.idealWidth);
|
|
1753
|
+
/* int32 ideal_frame_rate = 3; */
|
|
1754
|
+
if (message.idealFrameRate !== 0)
|
|
1755
|
+
writer.tag(3, WireType.Varint).int32(message.idealFrameRate);
|
|
1756
|
+
let u = options.writeUnknownFields;
|
|
1757
|
+
if (u !== false)
|
|
1758
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1759
|
+
return writer;
|
|
1760
|
+
}
|
|
1761
|
+
}
|
|
1762
|
+
/**
|
|
1763
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.VideoMediaRequest
|
|
1764
|
+
*/
|
|
1765
|
+
export const VideoMediaRequest = new VideoMediaRequest$Type();
|
|
1766
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1767
|
+
class VideoLayerSetting$Type extends MessageType<VideoLayerSetting> {
|
|
1768
|
+
constructor() {
|
|
1769
|
+
super("stream.video.sfu.event.VideoLayerSetting", [
|
|
1770
|
+
{ no: 1, name: "name", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
1771
|
+
{ no: 2, name: "active", kind: "scalar", T: 8 /*ScalarType.BOOL*/ },
|
|
1772
|
+
{ no: 3, name: "max_bitrate", kind: "scalar", T: 5 /*ScalarType.INT32*/ },
|
|
1773
|
+
{ no: 4, name: "scale_resolution_down_by", kind: "scalar", T: 2 /*ScalarType.FLOAT*/ },
|
|
1774
|
+
{ no: 5, name: "priority", kind: "enum", T: () => ["stream.video.sfu.event.VideoLayerSetting.Priority", VideoLayerSetting_Priority, "PRIORITY_"] },
|
|
1775
|
+
{ no: 6, name: "codec", kind: "message", T: () => Codec }
|
|
1776
|
+
]);
|
|
1777
|
+
}
|
|
1778
|
+
create(value?: PartialMessage<VideoLayerSetting>): VideoLayerSetting {
|
|
1779
|
+
const message = { name: "", active: false, maxBitrate: 0, scaleResolutionDownBy: 0, priority: 0 };
|
|
1780
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1781
|
+
if (value !== undefined)
|
|
1782
|
+
reflectionMergePartial<VideoLayerSetting>(this, message, value);
|
|
1783
|
+
return message;
|
|
1784
|
+
}
|
|
1785
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: VideoLayerSetting): VideoLayerSetting {
|
|
1786
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1787
|
+
while (reader.pos < end) {
|
|
1788
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1789
|
+
switch (fieldNo) {
|
|
1790
|
+
case /* string name */ 1:
|
|
1791
|
+
message.name = reader.string();
|
|
1792
|
+
break;
|
|
1793
|
+
case /* bool active */ 2:
|
|
1794
|
+
message.active = reader.bool();
|
|
1795
|
+
break;
|
|
1796
|
+
case /* int32 max_bitrate */ 3:
|
|
1797
|
+
message.maxBitrate = reader.int32();
|
|
1798
|
+
break;
|
|
1799
|
+
case /* float scale_resolution_down_by */ 4:
|
|
1800
|
+
message.scaleResolutionDownBy = reader.float();
|
|
1801
|
+
break;
|
|
1802
|
+
case /* stream.video.sfu.event.VideoLayerSetting.Priority priority */ 5:
|
|
1803
|
+
message.priority = reader.int32();
|
|
1804
|
+
break;
|
|
1805
|
+
case /* stream.video.sfu.models.Codec codec */ 6:
|
|
1806
|
+
message.codec = Codec.internalBinaryRead(reader, reader.uint32(), options, message.codec);
|
|
1807
|
+
break;
|
|
1808
|
+
default:
|
|
1809
|
+
let u = options.readUnknownField;
|
|
1810
|
+
if (u === "throw")
|
|
1811
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1812
|
+
let d = reader.skip(wireType);
|
|
1813
|
+
if (u !== false)
|
|
1814
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
return message;
|
|
1818
|
+
}
|
|
1819
|
+
internalBinaryWrite(message: VideoLayerSetting, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1820
|
+
/* string name = 1; */
|
|
1821
|
+
if (message.name !== "")
|
|
1822
|
+
writer.tag(1, WireType.LengthDelimited).string(message.name);
|
|
1823
|
+
/* bool active = 2; */
|
|
1824
|
+
if (message.active !== false)
|
|
1825
|
+
writer.tag(2, WireType.Varint).bool(message.active);
|
|
1826
|
+
/* int32 max_bitrate = 3; */
|
|
1827
|
+
if (message.maxBitrate !== 0)
|
|
1828
|
+
writer.tag(3, WireType.Varint).int32(message.maxBitrate);
|
|
1829
|
+
/* float scale_resolution_down_by = 4; */
|
|
1830
|
+
if (message.scaleResolutionDownBy !== 0)
|
|
1831
|
+
writer.tag(4, WireType.Bit32).float(message.scaleResolutionDownBy);
|
|
1832
|
+
/* stream.video.sfu.event.VideoLayerSetting.Priority priority = 5; */
|
|
1833
|
+
if (message.priority !== 0)
|
|
1834
|
+
writer.tag(5, WireType.Varint).int32(message.priority);
|
|
1835
|
+
/* stream.video.sfu.models.Codec codec = 6; */
|
|
1836
|
+
if (message.codec)
|
|
1837
|
+
Codec.internalBinaryWrite(message.codec, writer.tag(6, WireType.LengthDelimited).fork(), options).join();
|
|
1838
|
+
let u = options.writeUnknownFields;
|
|
1839
|
+
if (u !== false)
|
|
1840
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1841
|
+
return writer;
|
|
1842
|
+
}
|
|
1843
|
+
}
|
|
1844
|
+
/**
|
|
1845
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.VideoLayerSetting
|
|
1846
|
+
*/
|
|
1847
|
+
export const VideoLayerSetting = new VideoLayerSetting$Type();
|
|
1848
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1849
|
+
class VideoSender$Type extends MessageType<VideoSender> {
|
|
1850
|
+
constructor() {
|
|
1851
|
+
super("stream.video.sfu.event.VideoSender", [
|
|
1852
|
+
{ no: 1, name: "media_request", kind: "message", T: () => VideoMediaRequest },
|
|
1853
|
+
{ no: 2, name: "codec", kind: "message", T: () => Codec },
|
|
1854
|
+
{ no: 3, name: "layers", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => VideoLayerSetting }
|
|
1855
|
+
]);
|
|
1856
|
+
}
|
|
1857
|
+
create(value?: PartialMessage<VideoSender>): VideoSender {
|
|
1858
|
+
const message = { layers: [] };
|
|
1859
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1860
|
+
if (value !== undefined)
|
|
1861
|
+
reflectionMergePartial<VideoSender>(this, message, value);
|
|
1862
|
+
return message;
|
|
1863
|
+
}
|
|
1864
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: VideoSender): VideoSender {
|
|
1865
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1866
|
+
while (reader.pos < end) {
|
|
1867
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1868
|
+
switch (fieldNo) {
|
|
1869
|
+
case /* stream.video.sfu.event.VideoMediaRequest media_request */ 1:
|
|
1870
|
+
message.mediaRequest = VideoMediaRequest.internalBinaryRead(reader, reader.uint32(), options, message.mediaRequest);
|
|
1871
|
+
break;
|
|
1872
|
+
case /* stream.video.sfu.models.Codec codec */ 2:
|
|
1873
|
+
message.codec = Codec.internalBinaryRead(reader, reader.uint32(), options, message.codec);
|
|
1874
|
+
break;
|
|
1875
|
+
case /* repeated stream.video.sfu.event.VideoLayerSetting layers */ 3:
|
|
1876
|
+
message.layers.push(VideoLayerSetting.internalBinaryRead(reader, reader.uint32(), options));
|
|
1877
|
+
break;
|
|
1878
|
+
default:
|
|
1879
|
+
let u = options.readUnknownField;
|
|
1880
|
+
if (u === "throw")
|
|
1881
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1882
|
+
let d = reader.skip(wireType);
|
|
1883
|
+
if (u !== false)
|
|
1884
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1885
|
+
}
|
|
1886
|
+
}
|
|
1887
|
+
return message;
|
|
1888
|
+
}
|
|
1889
|
+
internalBinaryWrite(message: VideoSender, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1890
|
+
/* stream.video.sfu.event.VideoMediaRequest media_request = 1; */
|
|
1891
|
+
if (message.mediaRequest)
|
|
1892
|
+
VideoMediaRequest.internalBinaryWrite(message.mediaRequest, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1893
|
+
/* stream.video.sfu.models.Codec codec = 2; */
|
|
1894
|
+
if (message.codec)
|
|
1895
|
+
Codec.internalBinaryWrite(message.codec, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
1896
|
+
/* repeated stream.video.sfu.event.VideoLayerSetting layers = 3; */
|
|
1897
|
+
for (let i = 0; i < message.layers.length; i++)
|
|
1898
|
+
VideoLayerSetting.internalBinaryWrite(message.layers[i], writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
1899
|
+
let u = options.writeUnknownFields;
|
|
1900
|
+
if (u !== false)
|
|
1901
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1902
|
+
return writer;
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
/**
|
|
1906
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.VideoSender
|
|
1907
|
+
*/
|
|
1908
|
+
export const VideoSender = new VideoSender$Type();
|
|
1909
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
1910
|
+
class ChangePublishQuality$Type extends MessageType<ChangePublishQuality> {
|
|
1911
|
+
constructor() {
|
|
1912
|
+
super("stream.video.sfu.event.ChangePublishQuality", [
|
|
1913
|
+
{ no: 1, name: "audio_senders", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => AudioSender },
|
|
1914
|
+
{ no: 2, name: "video_senders", kind: "message", repeat: 1 /*RepeatType.PACKED*/, T: () => VideoSender }
|
|
1915
|
+
]);
|
|
1916
|
+
}
|
|
1917
|
+
create(value?: PartialMessage<ChangePublishQuality>): ChangePublishQuality {
|
|
1918
|
+
const message = { audioSenders: [], videoSenders: [] };
|
|
1919
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
1920
|
+
if (value !== undefined)
|
|
1921
|
+
reflectionMergePartial<ChangePublishQuality>(this, message, value);
|
|
1922
|
+
return message;
|
|
1923
|
+
}
|
|
1924
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: ChangePublishQuality): ChangePublishQuality {
|
|
1925
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
1926
|
+
while (reader.pos < end) {
|
|
1927
|
+
let [fieldNo, wireType] = reader.tag();
|
|
1928
|
+
switch (fieldNo) {
|
|
1929
|
+
case /* repeated stream.video.sfu.event.AudioSender audio_senders */ 1:
|
|
1930
|
+
message.audioSenders.push(AudioSender.internalBinaryRead(reader, reader.uint32(), options));
|
|
1931
|
+
break;
|
|
1932
|
+
case /* repeated stream.video.sfu.event.VideoSender video_senders */ 2:
|
|
1933
|
+
message.videoSenders.push(VideoSender.internalBinaryRead(reader, reader.uint32(), options));
|
|
1934
|
+
break;
|
|
1935
|
+
default:
|
|
1936
|
+
let u = options.readUnknownField;
|
|
1937
|
+
if (u === "throw")
|
|
1938
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
1939
|
+
let d = reader.skip(wireType);
|
|
1940
|
+
if (u !== false)
|
|
1941
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
return message;
|
|
1945
|
+
}
|
|
1946
|
+
internalBinaryWrite(message: ChangePublishQuality, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter {
|
|
1947
|
+
/* repeated stream.video.sfu.event.AudioSender audio_senders = 1; */
|
|
1948
|
+
for (let i = 0; i < message.audioSenders.length; i++)
|
|
1949
|
+
AudioSender.internalBinaryWrite(message.audioSenders[i], writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
1950
|
+
/* repeated stream.video.sfu.event.VideoSender video_senders = 2; */
|
|
1951
|
+
for (let i = 0; i < message.videoSenders.length; i++)
|
|
1952
|
+
VideoSender.internalBinaryWrite(message.videoSenders[i], writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
1953
|
+
let u = options.writeUnknownFields;
|
|
1954
|
+
if (u !== false)
|
|
1955
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
1956
|
+
return writer;
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
/**
|
|
1960
|
+
* @generated MessageType for protobuf message stream.video.sfu.event.ChangePublishQuality
|
|
1961
|
+
*/
|
|
1962
|
+
export const ChangePublishQuality = new ChangePublishQuality$Type();
|