mirror of
https://github.com/livekit/livekit.git
synced 2026-05-12 10:15:02 +00:00
a96069969d
* send active speaker updates with audio level * add test on loudness sorting * use a float to represent audio level
100 lines
2.2 KiB
Protocol Buffer
100 lines
2.2 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;
|
|
// mute a track client is subscribed to
|
|
MuteTrackRequest mute_subscribed = 6;
|
|
}
|
|
}
|
|
|
|
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;
|
|
}
|