mirror of
https://github.com/livekit/livekit.git
synced 2026-04-26 00:12:09 +00:00
85 lines
1.9 KiB
Protocol Buffer
85 lines
1.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package livekit;
|
|
option go_package = "github.com/livekit/livekit-server/proto/livekit";
|
|
|
|
import "model.proto";
|
|
|
|
message SignalRequest {
|
|
oneof message {
|
|
// participant joining initially, and during negotiations
|
|
SessionDescription offer = 1;
|
|
// participant responding to server-issued offers
|
|
SessionDescription answer = 2;
|
|
TrickleRequest trickle = 3;
|
|
AddTrackRequest add_track = 4;
|
|
MuteTrackRequest mute = 5;
|
|
// when client needs to negotiate
|
|
NegotiationRequest negotiate = 7;
|
|
}
|
|
}
|
|
|
|
message SignalResponse {
|
|
oneof message {
|
|
// sent when join is accepted
|
|
JoinResponse join = 1;
|
|
// sent when offer is answered
|
|
SessionDescription answer = 2;
|
|
// sent when server needs to negotiate, always offer
|
|
SessionDescription offer = 3;
|
|
// sent when an ICE candidate is available
|
|
TrickleRequest trickle = 4;
|
|
// sent when participants in the room has changed
|
|
ParticipantUpdate update = 5;
|
|
// sent to the participant when their track has been published
|
|
TrackPublishedResponse track_published = 6;
|
|
// sent to participant when they should initiate negotiation
|
|
NegotiationResponse negotiate = 7;
|
|
}
|
|
}
|
|
|
|
message AddTrackRequest {
|
|
// client ID of track, to match it when RTC track is received
|
|
string cid = 1;
|
|
string name = 2;
|
|
TrackType type = 3;
|
|
}
|
|
|
|
message TrickleRequest {
|
|
string candidateInit = 1;
|
|
}
|
|
|
|
message MuteTrackRequest {
|
|
string sid = 1;
|
|
bool muted = 2;
|
|
}
|
|
|
|
message NegotiationRequest {
|
|
// empty
|
|
}
|
|
|
|
message JoinResponse {
|
|
Room room = 1;
|
|
ParticipantInfo participant = 2;
|
|
repeated ParticipantInfo other_participants = 3;
|
|
}
|
|
|
|
message TrackPublishedResponse {
|
|
string cid = 1;
|
|
TrackInfo track = 2;
|
|
}
|
|
|
|
message NegotiationResponse {
|
|
// empty
|
|
}
|
|
|
|
message SessionDescription {
|
|
string type = 1; // "answer" | "offer" | "pranswer" | "rollback"
|
|
string sdp = 2;
|
|
}
|
|
|
|
|
|
message ParticipantUpdate {
|
|
repeated ParticipantInfo participants = 1;
|
|
}
|