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.
72 lines
1.6 KiB
Protocol Buffer
72 lines
1.6 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
|
|
SessionDescription offer = 1;
|
|
// participant responding to server-issued offers
|
|
SessionDescription answer = 2;
|
|
TrickleRequest trickle = 3;
|
|
AddTrackRequest add_track = 4;
|
|
MuteTrackRequest mute = 5;
|
|
RemoveTrackRequest remove_track = 6;
|
|
}
|
|
}
|
|
|
|
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
|
|
TrackInfo track_published = 6;
|
|
}
|
|
}
|
|
|
|
message AddTrackRequest {
|
|
string name = 1;
|
|
TrackType type = 2;
|
|
// client ID of track, to match it when RTC track is received
|
|
string cid = 3;
|
|
}
|
|
|
|
message TrickleRequest {
|
|
string candidateInit = 1;
|
|
}
|
|
|
|
message RemoveTrackRequest {
|
|
string sid = 1;
|
|
}
|
|
|
|
message SessionDescription {
|
|
string type = 1; // "answer" | "offer" | "pranswer" | "rollback"
|
|
string sdp = 2;
|
|
}
|
|
|
|
message JoinResponse {
|
|
RoomInfo room = 1;
|
|
ParticipantInfo participant = 2;
|
|
repeated ParticipantInfo other_participants = 3;
|
|
}
|
|
|
|
message MuteTrackRequest {
|
|
string sid = 1;
|
|
bool muted = 2;
|
|
}
|
|
|
|
message ParticipantUpdate {
|
|
repeated ParticipantInfo participants = 1;
|
|
}
|