In order to avoid race conditions with WebRTC, where either side could initiate an offer when tracks have changes, we'll always initiate them from the SFU side.
71 lines
1.2 KiB
Protocol Buffer
71 lines
1.2 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package livekit;
|
|
option go_package = "github.com/livekit/livekit-server/proto/livekit";
|
|
|
|
message Node {
|
|
string id = 1;
|
|
string ip = 2;
|
|
uint32 rtc_port = 3;
|
|
NodeStats stats = 4;
|
|
}
|
|
|
|
message NodeStats {
|
|
int32 num_rooms = 1;
|
|
int32 num_clients = 2;
|
|
}
|
|
|
|
// internal type, for serialization with proto
|
|
message Room {
|
|
string sid = 1;
|
|
string name = 2;
|
|
uint32 empty_timeout = 3;
|
|
uint32 max_participants = 4;
|
|
int64 creation_time = 5;
|
|
}
|
|
|
|
message RoomInfo {
|
|
string sid = 1;
|
|
string name = 2;
|
|
string node_ip = 3;
|
|
int64 creation_time = 4;
|
|
}
|
|
|
|
message ParticipantInfo {
|
|
enum State {
|
|
// websocket' connected, but not offered yet
|
|
JOINING = 0;
|
|
// server received client offer
|
|
JOINED = 1;
|
|
// ICE connectivity established
|
|
ACTIVE = 2;
|
|
// WS disconnected
|
|
DISCONNECTED = 3;
|
|
}
|
|
string sid = 1;
|
|
string name = 2;
|
|
State state = 3;
|
|
repeated TrackInfo tracks = 4;
|
|
}
|
|
|
|
enum TrackType {
|
|
AUDIO = 0;
|
|
VIDEO = 1;
|
|
DATA = 2;
|
|
}
|
|
|
|
// describing
|
|
message TrackInfo {
|
|
string sid = 1;
|
|
TrackType type = 2;
|
|
string name = 3;
|
|
bool muted = 4;
|
|
}
|
|
|
|
message DataMessage {
|
|
oneof value {
|
|
string text = 1;
|
|
bytes binary = 2;
|
|
}
|
|
}
|