@volter/twin-livekit 0.1.0
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 +202 -0
- package/README.md +106 -0
- package/dist/src/cli.d.ts +2 -0
- package/dist/src/cli.js +23 -0
- package/dist/src/egress-service-cli.d.ts +2 -0
- package/dist/src/egress-service-cli.js +101 -0
- package/dist/src/index.d.ts +14 -0
- package/dist/src/index.js +53 -0
- package/dist/src/livekit-budget.d.ts +57 -0
- package/dist/src/livekit-budget.js +131 -0
- package/dist/src/livekit-capabilities.d.ts +3 -0
- package/dist/src/livekit-capabilities.js +728 -0
- package/dist/src/livekit-conformance.d.ts +8 -0
- package/dist/src/livekit-conformance.js +13 -0
- package/dist/src/livekit-connector.d.ts +130 -0
- package/dist/src/livekit-connector.js +382 -0
- package/dist/src/livekit-data.d.ts +86 -0
- package/dist/src/livekit-data.js +246 -0
- package/dist/src/livekit-perform-harness.d.ts +5 -0
- package/dist/src/livekit-perform-harness.js +17 -0
- package/dist/src/livekit-server.d.ts +23 -0
- package/dist/src/livekit-server.js +45 -0
- package/dist/src/livekit-service-cli.d.ts +2 -0
- package/dist/src/livekit-service-cli.js +88 -0
- package/dist/src/livekit-token.d.ts +68 -0
- package/dist/src/livekit-token.js +76 -0
- package/dist/src/livekit-twin.d.ts +4 -0
- package/dist/src/livekit-twin.js +1161 -0
- package/dist/src/livekit-types.d.ts +203 -0
- package/dist/src/livekit-types.js +1 -0
- package/dist/src/livekit-webhook.d.ts +26 -0
- package/dist/src/livekit-webhook.js +79 -0
- package/dist/src/redis-service-cli.d.ts +2 -0
- package/dist/src/redis-service-cli.js +35 -0
- package/dist/test-fixtures/livekit-openapi-operations.SOURCE.md +88 -0
- package/dist/test-fixtures/livekit-openapi-operations.json +442 -0
- package/dist/test-fixtures/protobufs/cloud_replay.proto +82 -0
- package/dist/test-fixtures/protobufs/livekit_agent.proto +185 -0
- package/dist/test-fixtures/protobufs/livekit_agent_dispatch.proto +103 -0
- package/dist/test-fixtures/protobufs/livekit_agent_simulation.proto +422 -0
- package/dist/test-fixtures/protobufs/livekit_agent_worker.proto +29 -0
- package/dist/test-fixtures/protobufs/livekit_agentdb.proto +226 -0
- package/dist/test-fixtures/protobufs/livekit_analytics.proto +312 -0
- package/dist/test-fixtures/protobufs/livekit_cloud_agent.proto +376 -0
- package/dist/test-fixtures/protobufs/livekit_connector.proto +41 -0
- package/dist/test-fixtures/protobufs/livekit_connector_twilio.proto +65 -0
- package/dist/test-fixtures/protobufs/livekit_connector_whatsapp.proto +171 -0
- package/dist/test-fixtures/protobufs/livekit_egress.proto +641 -0
- package/dist/test-fixtures/protobufs/livekit_ingress.proto +222 -0
- package/dist/test-fixtures/protobufs/livekit_internal.proto +228 -0
- package/dist/test-fixtures/protobufs/livekit_metrics.proto +103 -0
- package/dist/test-fixtures/protobufs/livekit_models.proto +992 -0
- package/dist/test-fixtures/protobufs/livekit_phone_number.proto +151 -0
- package/dist/test-fixtures/protobufs/livekit_room.proto +312 -0
- package/dist/test-fixtures/protobufs/livekit_rtc.proto +673 -0
- package/dist/test-fixtures/protobufs/livekit_sip.proto +1000 -0
- package/dist/test-fixtures/protobufs/livekit_token_source.proto +49 -0
- package/dist/test-fixtures/protobufs/livekit_webhook.proto +62 -0
- package/package.json +58 -0
- package/src/cli.ts +22 -0
- package/src/egress-service-cli.ts +111 -0
- package/src/index.ts +103 -0
- package/src/livekit-budget.ts +158 -0
- package/src/livekit-capabilities.ts +789 -0
- package/src/livekit-conformance.ts +15 -0
- package/src/livekit-connector.ts +406 -0
- package/src/livekit-data.ts +278 -0
- package/src/livekit-perform-harness.ts +17 -0
- package/src/livekit-server.ts +67 -0
- package/src/livekit-service-cli.ts +93 -0
- package/src/livekit-token.ts +133 -0
- package/src/livekit-twin.ts +1162 -0
- package/src/livekit-types.ts +211 -0
- package/src/livekit-webhook.ts +91 -0
- package/src/redis-service-cli.ts +39 -0
- package/test-fixtures/livekit-openapi-operations.SOURCE.md +88 -0
- package/test-fixtures/livekit-openapi-operations.json +442 -0
- package/test-fixtures/protobufs/cloud_replay.proto +82 -0
- package/test-fixtures/protobufs/livekit_agent.proto +185 -0
- package/test-fixtures/protobufs/livekit_agent_dispatch.proto +103 -0
- package/test-fixtures/protobufs/livekit_agent_simulation.proto +422 -0
- package/test-fixtures/protobufs/livekit_agent_worker.proto +29 -0
- package/test-fixtures/protobufs/livekit_agentdb.proto +226 -0
- package/test-fixtures/protobufs/livekit_analytics.proto +312 -0
- package/test-fixtures/protobufs/livekit_cloud_agent.proto +376 -0
- package/test-fixtures/protobufs/livekit_connector.proto +41 -0
- package/test-fixtures/protobufs/livekit_connector_twilio.proto +65 -0
- package/test-fixtures/protobufs/livekit_connector_whatsapp.proto +171 -0
- package/test-fixtures/protobufs/livekit_egress.proto +641 -0
- package/test-fixtures/protobufs/livekit_ingress.proto +222 -0
- package/test-fixtures/protobufs/livekit_internal.proto +228 -0
- package/test-fixtures/protobufs/livekit_metrics.proto +103 -0
- package/test-fixtures/protobufs/livekit_models.proto +992 -0
- package/test-fixtures/protobufs/livekit_phone_number.proto +151 -0
- package/test-fixtures/protobufs/livekit_room.proto +312 -0
- package/test-fixtures/protobufs/livekit_rtc.proto +673 -0
- package/test-fixtures/protobufs/livekit_sip.proto +1000 -0
- package/test-fixtures/protobufs/livekit_token_source.proto +49 -0
- package/test-fixtures/protobufs/livekit_webhook.proto +62 -0
|
@@ -0,0 +1,673 @@
|
|
|
1
|
+
// Copyright 2023 LiveKit, Inc.
|
|
2
|
+
//
|
|
3
|
+
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
// you may not use this file except in compliance with the License.
|
|
5
|
+
// You may obtain a copy of the License at
|
|
6
|
+
//
|
|
7
|
+
// http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
//
|
|
9
|
+
// Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
// See the License for the specific language governing permissions and
|
|
13
|
+
// limitations under the License.
|
|
14
|
+
|
|
15
|
+
syntax = "proto3";
|
|
16
|
+
|
|
17
|
+
package livekit;
|
|
18
|
+
|
|
19
|
+
import "livekit_models.proto";
|
|
20
|
+
import "logger/options.proto";
|
|
21
|
+
|
|
22
|
+
option csharp_namespace = "LiveKit.Proto";
|
|
23
|
+
option go_package = "github.com/livekit/protocol/livekit";
|
|
24
|
+
option ruby_package = "LiveKit::Proto";
|
|
25
|
+
|
|
26
|
+
message SignalRequest {
|
|
27
|
+
oneof message {
|
|
28
|
+
// participant offer for publisher
|
|
29
|
+
SessionDescription offer = 1;
|
|
30
|
+
// participant answering subscriber offer
|
|
31
|
+
SessionDescription answer = 2;
|
|
32
|
+
TrickleRequest trickle = 3;
|
|
33
|
+
AddTrackRequest add_track = 4;
|
|
34
|
+
// mute the participant's published tracks
|
|
35
|
+
MuteTrackRequest mute = 5;
|
|
36
|
+
// Subscribe or unsubscribe from tracks
|
|
37
|
+
UpdateSubscription subscription = 6;
|
|
38
|
+
// Update settings of subscribed tracks
|
|
39
|
+
UpdateTrackSettings track_setting = 7;
|
|
40
|
+
// Immediately terminate session
|
|
41
|
+
LeaveRequest leave = 8;
|
|
42
|
+
// Update published video layers
|
|
43
|
+
UpdateVideoLayers update_layers = 10 [deprecated = true];
|
|
44
|
+
// Update subscriber permissions
|
|
45
|
+
SubscriptionPermission subscription_permission = 11;
|
|
46
|
+
// sync client's subscribe state to server during reconnect
|
|
47
|
+
SyncState sync_state = 12;
|
|
48
|
+
// Simulate conditions, for client validations
|
|
49
|
+
SimulateScenario simulate = 13;
|
|
50
|
+
// client triggered ping to server
|
|
51
|
+
int64 ping = 14; // deprecated by ping_req (message Ping)
|
|
52
|
+
// update a participant's own metadata, name, or attributes
|
|
53
|
+
// requires canUpdateOwnParticipantMetadata permission
|
|
54
|
+
UpdateParticipantMetadata update_metadata = 15;
|
|
55
|
+
Ping ping_req = 16;
|
|
56
|
+
// Update local audio track settings
|
|
57
|
+
UpdateLocalAudioTrack update_audio_track = 17;
|
|
58
|
+
// Update local video track settings
|
|
59
|
+
UpdateLocalVideoTrack update_video_track = 18;
|
|
60
|
+
// Publish a data track
|
|
61
|
+
PublishDataTrackRequest publish_data_track_request = 19;
|
|
62
|
+
// Unpublish a data track
|
|
63
|
+
UnpublishDataTrackRequest unpublish_data_track_request = 20;
|
|
64
|
+
// Update subscription state for one or more data tracks
|
|
65
|
+
UpdateDataSubscription update_data_subscription = 21;
|
|
66
|
+
// Store a data blob.
|
|
67
|
+
StoreDataBlobRequest store_data_blob_request = 22;
|
|
68
|
+
// Retrieve a stored data blob.
|
|
69
|
+
GetDataBlobRequest get_data_blob_request = 23;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
message SignalResponse {
|
|
74
|
+
oneof message {
|
|
75
|
+
// sent when join is accepted
|
|
76
|
+
JoinResponse join = 1;
|
|
77
|
+
// sent when server answers publisher
|
|
78
|
+
SessionDescription answer = 2;
|
|
79
|
+
// sent when server is sending subscriber an offer
|
|
80
|
+
SessionDescription offer = 3;
|
|
81
|
+
// sent when an ICE candidate is available
|
|
82
|
+
TrickleRequest trickle = 4;
|
|
83
|
+
// sent when participants in the room has changed
|
|
84
|
+
ParticipantUpdate update = 5;
|
|
85
|
+
// sent to the participant when their track has been published
|
|
86
|
+
TrackPublishedResponse track_published = 6;
|
|
87
|
+
// Immediately terminate session
|
|
88
|
+
LeaveRequest leave = 8;
|
|
89
|
+
// server initiated mute
|
|
90
|
+
MuteTrackRequest mute = 9;
|
|
91
|
+
// indicates changes to speaker status, including when they've gone to not speaking
|
|
92
|
+
SpeakersChanged speakers_changed = 10;
|
|
93
|
+
// sent when metadata of the room has changed
|
|
94
|
+
RoomUpdate room_update = 11;
|
|
95
|
+
// when connection quality changed
|
|
96
|
+
ConnectionQualityUpdate connection_quality = 12;
|
|
97
|
+
// when streamed tracks state changed, used to notify when any of the streams were paused due to
|
|
98
|
+
// congestion
|
|
99
|
+
StreamStateUpdate stream_state_update = 13;
|
|
100
|
+
// when max subscribe quality changed, used by dynamic broadcasting to disable unused layers
|
|
101
|
+
SubscribedQualityUpdate subscribed_quality_update = 14;
|
|
102
|
+
// when subscription permission changed
|
|
103
|
+
SubscriptionPermissionUpdate subscription_permission_update = 15;
|
|
104
|
+
// update the token the client was using, to prevent an active client from using an expired token
|
|
105
|
+
string refresh_token = 16;
|
|
106
|
+
// server initiated track unpublish
|
|
107
|
+
TrackUnpublishedResponse track_unpublished = 17;
|
|
108
|
+
// respond to ping
|
|
109
|
+
int64 pong = 18; // deprecated by pong_resp (message Pong)
|
|
110
|
+
// sent when client reconnects
|
|
111
|
+
ReconnectResponse reconnect = 19;
|
|
112
|
+
// respond to Ping
|
|
113
|
+
Pong pong_resp = 20;
|
|
114
|
+
// Subscription response, client should not expect any media from this subscription if it fails
|
|
115
|
+
SubscriptionResponse subscription_response = 21;
|
|
116
|
+
// Response relating to user inititated requests that carry a `request_id`
|
|
117
|
+
RequestResponse request_response = 22;
|
|
118
|
+
// notify to the publisher when a published track has been subscribed for the first time
|
|
119
|
+
TrackSubscribed track_subscribed = 23;
|
|
120
|
+
// notify to the participant when they have been moved to a new room
|
|
121
|
+
RoomMovedResponse room_moved = 24;
|
|
122
|
+
// notify number of required media sections to satisfy subscribed tracks
|
|
123
|
+
MediaSectionsRequirement media_sections_requirement = 25;
|
|
124
|
+
// when audio subscription changes, used to enable simulcasting of audio codecs based on subscriptions
|
|
125
|
+
SubscribedAudioCodecUpdate subscribed_audio_codec_update = 26;
|
|
126
|
+
// Sent in response to `PublishDataTrackRequest`.
|
|
127
|
+
PublishDataTrackResponse publish_data_track_response = 27;
|
|
128
|
+
// Sent in response to `UnpublishDataTrackRequest` or SFU-initiated unpublish.
|
|
129
|
+
UnpublishDataTrackResponse unpublish_data_track_response = 28;
|
|
130
|
+
// Sent to data track subscribers to provide mapping from track SIDs to handles.
|
|
131
|
+
DataTrackSubscriberHandles data_track_subscriber_handles = 29;
|
|
132
|
+
// Sent in response to `StoreDataBlobRequest`.
|
|
133
|
+
StoreDataBlobResponse store_data_blob_response = 30;
|
|
134
|
+
// Sent in response to `GetDataBlobRequest`.
|
|
135
|
+
GetDataBlobResponse get_data_blob_response = 31;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
enum SignalTarget {
|
|
140
|
+
PUBLISHER = 0;
|
|
141
|
+
SUBSCRIBER = 1;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
message SimulcastCodec {
|
|
145
|
+
string codec = 1;
|
|
146
|
+
string cid = 2;
|
|
147
|
+
repeated VideoLayer layers = 4;
|
|
148
|
+
VideoLayer.Mode video_layer_mode = 5;
|
|
149
|
+
|
|
150
|
+
// NEXT-ID: 6
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
message AddTrackRequest {
|
|
154
|
+
// client ID of track, to match it when RTC track is received
|
|
155
|
+
string cid = 1;
|
|
156
|
+
string name = 2;
|
|
157
|
+
TrackType type = 3;
|
|
158
|
+
uint32 width = 4;
|
|
159
|
+
uint32 height = 5;
|
|
160
|
+
// true to add track and initialize to muted
|
|
161
|
+
bool muted = 6;
|
|
162
|
+
// true if DTX (Discontinuous Transmission) is disabled for audio
|
|
163
|
+
bool disable_dtx = 7 [deprecated = true]; // deprecated in favor of audio_features
|
|
164
|
+
TrackSource source = 8;
|
|
165
|
+
repeated VideoLayer layers = 9;
|
|
166
|
+
|
|
167
|
+
repeated SimulcastCodec simulcast_codecs = 10;
|
|
168
|
+
|
|
169
|
+
// server ID of track, publish new codec to exist track
|
|
170
|
+
string sid = 11;
|
|
171
|
+
|
|
172
|
+
bool stereo = 12 [deprecated = true]; // deprecated in favor of audio_features
|
|
173
|
+
// true if RED (Redundant Encoding) is disabled for audio
|
|
174
|
+
bool disable_red = 13;
|
|
175
|
+
|
|
176
|
+
Encryption.Type encryption = 14;
|
|
177
|
+
// which stream the track belongs to, used to group tracks together.
|
|
178
|
+
// if not specified, server will infer it from track source to bundle camera/microphone, screenshare/audio together
|
|
179
|
+
string stream = 15;
|
|
180
|
+
BackupCodecPolicy backup_codec_policy = 16;
|
|
181
|
+
|
|
182
|
+
repeated AudioTrackFeature audio_features = 17;
|
|
183
|
+
|
|
184
|
+
repeated PacketTrailerFeature packet_trailer_features = 18;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
message PublishDataTrackRequest {
|
|
188
|
+
// Client-assigned, 16-bit identifier that will be attached to packets sent by the publisher.
|
|
189
|
+
// This must be non-zero and unique for each data track published by the publisher.
|
|
190
|
+
uint32 pub_handle = 1;
|
|
191
|
+
|
|
192
|
+
// Human-readable identifier (e.g., `geoLocation`, `servoPosition.x`, etc.), unique per publisher.
|
|
193
|
+
// This must be non-empty and no longer than 256 characters.
|
|
194
|
+
string name = 2;
|
|
195
|
+
|
|
196
|
+
// Method used for end-to-end encryption (E2EE) on frame payloads.
|
|
197
|
+
Encryption.Type encryption = 3;
|
|
198
|
+
|
|
199
|
+
// Encoding for frame payloads on this track. If unspecified, the track is untyped.
|
|
200
|
+
optional DataTrackFrameEncoding frame_encoding = 4;
|
|
201
|
+
|
|
202
|
+
// ID of the schema used by frames on this track if the track is typed.
|
|
203
|
+
// If set, the associated schema must be stored with `StoreDataBlobRequest`.
|
|
204
|
+
optional DataTrackSchemaId schema = 5;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
message PublishDataTrackResponse {
|
|
208
|
+
// Information about the published track.
|
|
209
|
+
DataTrackInfo info = 1;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
message UnpublishDataTrackRequest {
|
|
213
|
+
// Publisher handle of the track to unpublish.
|
|
214
|
+
uint32 pub_handle = 1;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
message UnpublishDataTrackResponse {
|
|
218
|
+
// Information about the unpublished track.
|
|
219
|
+
DataTrackInfo info = 1;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
message DataTrackSubscriberHandles {
|
|
223
|
+
message PublishedDataTrack {
|
|
224
|
+
string publisher_identity = 1;
|
|
225
|
+
string publisher_sid = 2;
|
|
226
|
+
string track_sid = 3;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Maps handles from incoming packets to the track SIDs that the packets belong to.
|
|
230
|
+
map<uint32, PublishedDataTrack> sub_handles = 1;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
message TrickleRequest {
|
|
234
|
+
string candidateInit = 1;
|
|
235
|
+
SignalTarget target = 2;
|
|
236
|
+
bool final = 3;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
message MuteTrackRequest {
|
|
240
|
+
string sid = 1;
|
|
241
|
+
bool muted = 2;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
message JoinResponse {
|
|
245
|
+
Room room = 1;
|
|
246
|
+
ParticipantInfo participant = 2;
|
|
247
|
+
repeated ParticipantInfo other_participants = 3;
|
|
248
|
+
// deprecated. use server_info.version instead.
|
|
249
|
+
string server_version = 4;
|
|
250
|
+
repeated ICEServer ice_servers = 5;
|
|
251
|
+
// use subscriber as the primary PeerConnection
|
|
252
|
+
bool subscriber_primary = 6;
|
|
253
|
+
// when the current server isn't available, return alternate url to retry connection
|
|
254
|
+
// when this is set, the other fields will be largely empty
|
|
255
|
+
string alternative_url = 7;
|
|
256
|
+
ClientConfiguration client_configuration = 8;
|
|
257
|
+
// deprecated. use server_info.region instead.
|
|
258
|
+
string server_region = 9;
|
|
259
|
+
int32 ping_timeout = 10;
|
|
260
|
+
int32 ping_interval = 11;
|
|
261
|
+
ServerInfo server_info = 12;
|
|
262
|
+
// Server-Injected-Frame byte trailer, used to identify unencrypted frames when e2ee is enabled
|
|
263
|
+
bytes sif_trailer = 13;
|
|
264
|
+
repeated Codec enabled_publish_codecs = 14;
|
|
265
|
+
// when set, client should attempt to establish publish peer connection when joining room to speed up publishing
|
|
266
|
+
bool fast_publish = 15;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
message ReconnectResponse {
|
|
270
|
+
repeated ICEServer ice_servers = 1;
|
|
271
|
+
ClientConfiguration client_configuration = 2;
|
|
272
|
+
ServerInfo server_info = 3;
|
|
273
|
+
|
|
274
|
+
// last sequence number of reliable message received before resuming
|
|
275
|
+
uint32 last_message_seq = 4;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
message TrackPublishedResponse {
|
|
279
|
+
string cid = 1;
|
|
280
|
+
TrackInfo track = 2;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
message TrackUnpublishedResponse {
|
|
284
|
+
string track_sid = 1;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
message SessionDescription {
|
|
288
|
+
string type = 1; // "answer" | "offer" | "pranswer" | "rollback"
|
|
289
|
+
string sdp = 2;
|
|
290
|
+
uint32 id = 3;
|
|
291
|
+
map<string, string> mid_to_track_id = 4 [(logger.name) = "midToTrackID"];
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
message ParticipantUpdate {
|
|
295
|
+
repeated ParticipantInfo participants = 1;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
message UpdateSubscription {
|
|
299
|
+
repeated string track_sids = 1;
|
|
300
|
+
bool subscribe = 2;
|
|
301
|
+
repeated ParticipantTracks participant_tracks = 3;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
message UpdateDataSubscription {
|
|
305
|
+
message Update {
|
|
306
|
+
string track_sid = 1;
|
|
307
|
+
bool subscribe = 2;
|
|
308
|
+
// Options to apply when initially subscribing or updating an existing subscription.
|
|
309
|
+
// When unsubscribing, this field is ignored.
|
|
310
|
+
DataTrackSubscriptionOptions options = 3;
|
|
311
|
+
}
|
|
312
|
+
repeated Update updates = 1;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
message StoreDataBlobRequest {
|
|
316
|
+
uint32 request_id = 1 [(logger.name) = "requestID"];
|
|
317
|
+
DataBlob blob = 2;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
message StoreDataBlobResponse {
|
|
321
|
+
uint32 request_id = 1 [(logger.name) = "requestID"];
|
|
322
|
+
// Unique key the data blob was stored under.
|
|
323
|
+
DataBlobKey key = 2;
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
message GetDataBlobRequest {
|
|
327
|
+
uint32 request_id = 1 [(logger.name) = "requestID"];
|
|
328
|
+
// Identity of the participant who owns the blob.
|
|
329
|
+
string participant_identity = 2;
|
|
330
|
+
// Unique key of the data blob to retrieve.
|
|
331
|
+
DataBlobKey key = 3;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
message GetDataBlobResponse {
|
|
335
|
+
uint32 request_id = 1 [(logger.name) = "requestID"];
|
|
336
|
+
DataBlob blob = 2;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
message UpdateTrackSettings {
|
|
340
|
+
repeated string track_sids = 1;
|
|
341
|
+
// when true, the track is placed in a paused state, with no new data returned
|
|
342
|
+
bool disabled = 3;
|
|
343
|
+
// deprecated in favor of width & height
|
|
344
|
+
VideoQuality quality = 4;
|
|
345
|
+
// for video, width to receive
|
|
346
|
+
uint32 width = 5;
|
|
347
|
+
// for video, height to receive
|
|
348
|
+
uint32 height = 6;
|
|
349
|
+
uint32 fps = 7;
|
|
350
|
+
// subscription priority. 1 being the highest (0 is unset)
|
|
351
|
+
// when unset, server sill assign priority based on the order of subscription
|
|
352
|
+
// server will use priority in the following ways:
|
|
353
|
+
// 1. when subscribed tracks exceed per-participant subscription limit, server will
|
|
354
|
+
// pause the lowest priority tracks
|
|
355
|
+
// 2. when the network is congested, server will assign available bandwidth to
|
|
356
|
+
// higher priority tracks first. lowest priority tracks can be paused
|
|
357
|
+
uint32 priority = 8;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
message UpdateLocalAudioTrack {
|
|
361
|
+
string track_sid = 1;
|
|
362
|
+
repeated AudioTrackFeature features = 2;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
message UpdateLocalVideoTrack {
|
|
366
|
+
string track_sid = 1;
|
|
367
|
+
uint32 width = 2;
|
|
368
|
+
uint32 height = 3;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
message LeaveRequest {
|
|
372
|
+
// indicates action clients should take on receiving this message
|
|
373
|
+
enum Action {
|
|
374
|
+
DISCONNECT = 0; // should disconnect
|
|
375
|
+
RESUME = 1; // should attempt a resume with `reconnect=1` in join URL
|
|
376
|
+
RECONNECT = 2; // should attempt a reconnect, i. e. no `reconnect=1`
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
// sent when server initiates the disconnect due to server-restart
|
|
380
|
+
// indicates clients should attempt full-reconnect sequence
|
|
381
|
+
// NOTE: `can_reconnect` obsoleted by `action` starting in protocol version 13
|
|
382
|
+
bool can_reconnect = 1;
|
|
383
|
+
DisconnectReason reason = 2;
|
|
384
|
+
Action action = 3;
|
|
385
|
+
RegionSettings regions = 4;
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
// message to indicate published video track dimensions are changing
|
|
389
|
+
message UpdateVideoLayers {
|
|
390
|
+
option deprecated = true;
|
|
391
|
+
string track_sid = 1;
|
|
392
|
+
repeated VideoLayer layers = 2;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
message UpdateParticipantMetadata {
|
|
396
|
+
string metadata = 1 [
|
|
397
|
+
(logger.sensitivity) = SENSITIVITY_PII,
|
|
398
|
+
(logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
|
|
399
|
+
];
|
|
400
|
+
string name = 2 [
|
|
401
|
+
(logger.sensitivity) = SENSITIVITY_PII,
|
|
402
|
+
(logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
|
|
403
|
+
];
|
|
404
|
+
// attributes to update. it only updates attributes that have been set
|
|
405
|
+
// to delete attributes, set the value to an empty string
|
|
406
|
+
map<string, string> attributes = 3 [
|
|
407
|
+
(logger.sensitivity) = SENSITIVITY_PII,
|
|
408
|
+
(logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
|
|
409
|
+
];
|
|
410
|
+
uint32 request_id = 4 [(logger.name) = "requestID"];
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
message ICEServer {
|
|
414
|
+
repeated string urls = 1;
|
|
415
|
+
string username = 2 [
|
|
416
|
+
(logger.sensitivity) = SENSITIVITY_PII
|
|
417
|
+
];
|
|
418
|
+
string credential = 3 [
|
|
419
|
+
(logger.sensitivity) = SENSITIVITY_SECRET
|
|
420
|
+
];
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
message SpeakersChanged {
|
|
424
|
+
repeated SpeakerInfo speakers = 1;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
message RoomUpdate {
|
|
428
|
+
Room room = 1;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
message ConnectionQualityInfo {
|
|
432
|
+
string participant_sid = 1;
|
|
433
|
+
ConnectionQuality quality = 2;
|
|
434
|
+
float score = 3;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
message ConnectionQualityUpdate {
|
|
438
|
+
repeated ConnectionQualityInfo updates = 1;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
enum StreamState {
|
|
442
|
+
ACTIVE = 0;
|
|
443
|
+
PAUSED = 1;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
message StreamStateInfo {
|
|
447
|
+
string participant_sid = 1;
|
|
448
|
+
string track_sid = 2;
|
|
449
|
+
StreamState state = 3;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
message StreamStateUpdate {
|
|
453
|
+
repeated StreamStateInfo stream_states = 1;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
message SubscribedQuality {
|
|
457
|
+
VideoQuality quality = 1;
|
|
458
|
+
bool enabled = 2;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
message SubscribedCodec {
|
|
462
|
+
string codec = 1;
|
|
463
|
+
repeated SubscribedQuality qualities = 2;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
message SubscribedQualityUpdate {
|
|
467
|
+
string track_sid = 1;
|
|
468
|
+
repeated SubscribedQuality subscribed_qualities = 2 [deprecated = true];
|
|
469
|
+
repeated SubscribedCodec subscribed_codecs = 3;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
message SubscribedAudioCodecUpdate {
|
|
473
|
+
string track_sid = 1;
|
|
474
|
+
repeated SubscribedAudioCodec subscribed_audio_codecs = 2;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
message TrackPermission {
|
|
478
|
+
// permission could be granted either by participant sid or identity
|
|
479
|
+
string participant_sid = 1;
|
|
480
|
+
bool all_tracks = 2;
|
|
481
|
+
repeated string track_sids = 3;
|
|
482
|
+
string participant_identity = 4;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
message SubscriptionPermission {
|
|
486
|
+
bool all_participants = 1;
|
|
487
|
+
repeated TrackPermission track_permissions = 2;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
message SubscriptionPermissionUpdate {
|
|
491
|
+
string participant_sid = 1;
|
|
492
|
+
string track_sid = 2;
|
|
493
|
+
bool allowed = 3;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
message RoomMovedResponse {
|
|
497
|
+
// information about the new room
|
|
498
|
+
Room room = 1;
|
|
499
|
+
// new reconnect token that can be used to reconnect to the new room
|
|
500
|
+
string token = 2;
|
|
501
|
+
ParticipantInfo participant = 3;
|
|
502
|
+
repeated ParticipantInfo other_participants = 4;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
message SyncState {
|
|
506
|
+
// last subscribe/publish answer before reconnecting
|
|
507
|
+
// subscribe answer if using dual peer connection
|
|
508
|
+
// publish answer if using single peer connection
|
|
509
|
+
SessionDescription answer = 1;
|
|
510
|
+
UpdateSubscription subscription = 2;
|
|
511
|
+
repeated TrackPublishedResponse publish_tracks = 3;
|
|
512
|
+
repeated DataChannelInfo data_channels = 4;
|
|
513
|
+
// last received server side offer/sent client side offer before reconnecting
|
|
514
|
+
// received server side offer if using dual peer connection
|
|
515
|
+
// sent client side offer if using single peer connection
|
|
516
|
+
SessionDescription offer = 5;
|
|
517
|
+
repeated string track_sids_disabled = 6;
|
|
518
|
+
repeated DataChannelReceiveState datachannel_receive_states = 7;
|
|
519
|
+
repeated PublishDataTrackResponse publish_data_tracks = 8;
|
|
520
|
+
UpdateDataSubscription data_subscription = 9;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
message DataChannelReceiveState {
|
|
524
|
+
string publisher_sid = 1;
|
|
525
|
+
uint32 last_seq = 2;
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
message DataChannelInfo {
|
|
529
|
+
string label = 1;
|
|
530
|
+
uint32 id = 2;
|
|
531
|
+
SignalTarget target = 3;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
enum CandidateProtocol {
|
|
535
|
+
UDP = 0;
|
|
536
|
+
TCP = 1;
|
|
537
|
+
TLS = 2;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
message SimulateScenario {
|
|
541
|
+
oneof scenario {
|
|
542
|
+
// simulate N seconds of speaker activity
|
|
543
|
+
int32 speaker_update = 1;
|
|
544
|
+
// simulate local node failure
|
|
545
|
+
bool node_failure = 2;
|
|
546
|
+
// simulate migration
|
|
547
|
+
bool migration = 3;
|
|
548
|
+
// server to send leave
|
|
549
|
+
bool server_leave = 4;
|
|
550
|
+
// switch candidate protocol to tcp
|
|
551
|
+
CandidateProtocol switch_candidate_protocol = 5;
|
|
552
|
+
// maximum bandwidth for subscribers, in bps
|
|
553
|
+
// when zero, clears artificial bandwidth limit
|
|
554
|
+
int64 subscriber_bandwidth = 6;
|
|
555
|
+
// disconnect signal on resume
|
|
556
|
+
bool disconnect_signal_on_resume = 7;
|
|
557
|
+
// disconnect signal on resume before sending any messages from server
|
|
558
|
+
bool disconnect_signal_on_resume_no_messages = 8;
|
|
559
|
+
// full reconnect leave request
|
|
560
|
+
bool leave_request_full_reconnect = 9;
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
message Ping {
|
|
565
|
+
int64 timestamp = 1;
|
|
566
|
+
// rtt in milliseconds calculated by client
|
|
567
|
+
int64 rtt = 2;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
message Pong {
|
|
571
|
+
// timestamp field of last received ping request
|
|
572
|
+
int64 last_ping_timestamp = 1;
|
|
573
|
+
int64 timestamp = 2;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
message RegionSettings {
|
|
577
|
+
repeated RegionInfo regions = 1;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
message RegionInfo {
|
|
581
|
+
string region = 1;
|
|
582
|
+
string url = 2;
|
|
583
|
+
int64 distance = 3;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
message SubscriptionResponse {
|
|
587
|
+
string track_sid = 1;
|
|
588
|
+
SubscriptionError err = 2;
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
message RequestResponse {
|
|
592
|
+
enum Reason {
|
|
593
|
+
OK = 0;
|
|
594
|
+
NOT_FOUND = 1;
|
|
595
|
+
NOT_ALLOWED = 2;
|
|
596
|
+
LIMIT_EXCEEDED = 3;
|
|
597
|
+
QUEUED = 4;
|
|
598
|
+
UNSUPPORTED_TYPE = 5;
|
|
599
|
+
UNCLASSIFIED_ERROR = 6;
|
|
600
|
+
INVALID_HANDLE = 7;
|
|
601
|
+
INVALID_NAME = 8;
|
|
602
|
+
DUPLICATE_HANDLE = 9;
|
|
603
|
+
DUPLICATE_NAME = 10;
|
|
604
|
+
INVALID_REQUEST = 11;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
uint32 request_id = 1 [(logger.name) = "requestID"];
|
|
608
|
+
Reason reason = 2;
|
|
609
|
+
string message = 3;
|
|
610
|
+
oneof request {
|
|
611
|
+
TrickleRequest trickle = 4;
|
|
612
|
+
AddTrackRequest add_track = 5;
|
|
613
|
+
MuteTrackRequest mute = 6;
|
|
614
|
+
UpdateParticipantMetadata update_metadata = 7;
|
|
615
|
+
UpdateLocalAudioTrack update_audio_track = 8;
|
|
616
|
+
UpdateLocalVideoTrack update_video_track = 9;
|
|
617
|
+
PublishDataTrackRequest publish_data_track = 10;
|
|
618
|
+
UnpublishDataTrackRequest unpublish_data_track = 11;
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
message TrackSubscribed {
|
|
623
|
+
string track_sid = 1;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
message ConnectionSettings {
|
|
627
|
+
bool auto_subscribe = 1;
|
|
628
|
+
bool adaptive_stream = 2;
|
|
629
|
+
optional bool subscriber_allow_pause = 3;
|
|
630
|
+
bool disable_ice_lite = 4;
|
|
631
|
+
optional bool auto_subscribe_data_track = 5;
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
message JoinRequest {
|
|
635
|
+
ClientInfo client_info = 1;
|
|
636
|
+
ConnectionSettings connection_settings = 2;
|
|
637
|
+
|
|
638
|
+
string metadata = 3 [
|
|
639
|
+
(logger.sensitivity) = SENSITIVITY_PII,
|
|
640
|
+
(logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
|
|
641
|
+
]; // if not empty, will overwrite `metadata` in token
|
|
642
|
+
|
|
643
|
+
// will set keys provided via this
|
|
644
|
+
// will overwrite if the same key is in the token
|
|
645
|
+
// will not delete keys from token if there is a key collision and this sets that key to empty value
|
|
646
|
+
map<string, string> participant_attributes = 4 [
|
|
647
|
+
(logger.sensitivity) = SENSITIVITY_PII,
|
|
648
|
+
(logger.redact_format) = "<redacted ({{ .Size }} bytes)>"
|
|
649
|
+
];
|
|
650
|
+
|
|
651
|
+
repeated AddTrackRequest add_track_requests = 5;
|
|
652
|
+
SessionDescription publisher_offer = 6;
|
|
653
|
+
|
|
654
|
+
bool reconnect = 7;
|
|
655
|
+
ReconnectReason reconnect_reason = 8;
|
|
656
|
+
string participant_sid = 9;
|
|
657
|
+
SyncState sync_state = 10;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
message WrappedJoinRequest {
|
|
661
|
+
enum Compression {
|
|
662
|
+
NONE = 0;
|
|
663
|
+
GZIP = 1;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
Compression compression = 1;
|
|
667
|
+
bytes join_request = 2; // marshalled JoinRequest + potentially compressed
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
message MediaSectionsRequirement {
|
|
671
|
+
uint32 num_audios = 1;
|
|
672
|
+
uint32 num_videos = 2;
|
|
673
|
+
}
|