support audio level extension & active speaker detection (#20)

* send active speaker updates with audio level

* add test on loudness sorting

* use a float to represent audio level
This commit is contained in:
David Zhao
2021-02-14 14:30:23 -08:00
committed by GitHub
parent 7ddf96b6d4
commit a96069969d
15 changed files with 775 additions and 109 deletions
+14
View File
@@ -34,6 +34,8 @@ message SignalResponse {
ParticipantUpdate update = 5;
// sent to the participant when their track has been published
TrackPublishedResponse track_published = 6;
// list of active speakers
ActiveSpeakerUpdate speaker = 7;
}
}
@@ -83,3 +85,15 @@ message SessionDescription {
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;
}