Files
livekit/proto/rtc.proto
T
David Zhao e402d0d0af subscriber control of tracks (unsubscribe/mute/quality), support simulcast (#23)
* subscription control & simulcast RTC APIs

* don't remove tracks for simulcast
2021-02-16 13:52:50 -08:00

120 lines
2.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 {
// initial join exchange, for publisher
SessionDescription offer = 1;
// participant answering publisher offer
SessionDescription answer = 2;
TrickleRequest trickle = 3;
AddTrackRequest add_track = 4;
// mute the participant's own tracks
MuteTrackRequest mute = 5;
// Subscribe or unsubscribe from tracks
UpdateSubscription subscription = 6;
// Update settings of subscribed tracks
UpdateTrackSettings track_setting = 7;
}
}
message SignalResponse {
oneof message {
// sent when join is accepted
JoinResponse join = 1;
// sent when server answers publisher
SessionDescription answer = 2;
// sent when server is sending subscriber an 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;
// list of active speakers
ActiveSpeakerUpdate speaker = 7;
}
}
enum SignalTarget {
PUBLISHER = 0;
SUBSCRIBER = 1;
}
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;
SignalTarget target = 2;
}
message MuteTrackRequest {
string sid = 1;
bool muted = 2;
}
message NegotiationRequest {
// empty
}
message JoinResponse {
Room room = 1;
ParticipantInfo participant = 2;
repeated ParticipantInfo other_participants = 3;
string server_version = 4;
}
message TrackPublishedResponse {
string cid = 1;
TrackInfo track = 2;
}
message SessionDescription {
string type = 1; // "answer" | "offer" | "pranswer" | "rollback"
string sdp = 2;
}
message ParticipantUpdate {
repeated ParticipantInfo participants = 1;
}
message ActiveSpeakerUpdate {
repeated SpeakerInfo speakers = 1;
}
message SpeakerInfo {
string sid = 1;
// audio level, 0-1.0, 1 is loudest
float level = 2;
// true if speaker is currently active
bool active = 3;
}
enum VideoQuality {
LOW = 0;
MEDIUM = 1;
HIGH = 2;
}
message UpdateSubscription {
repeated string track_sids = 1;
bool subscribe = 2;
bool mute = 3;
VideoQuality quality = 4;
}
message UpdateTrackSettings {
repeated string track_sids = 1;
bool mute = 3;
VideoQuality quality = 4;
}