add support for client capabilities (#4461)

* update protocol version

* only check for client capabiltiy to strip packet trailer
This commit is contained in:
David Chen
2026-04-27 17:58:36 -07:00
committed by GitHub
parent fc47e47866
commit 743d9c8b3a
5 changed files with 31 additions and 5 deletions
+12
View File
@@ -187,6 +187,18 @@ func ParseClientInfo(r *http.Request) *livekit.ClientInfo {
ci.DeviceModel = values.Get("device_model")
ci.Network = values.Get("network")
if capStr := values.Get("capabilities"); capStr != "" {
for _, name := range strings.Split(capStr, ",") {
name = strings.TrimSpace(name)
if name == "" {
continue
}
if v, ok := livekit.ClientInfo_Capability_value[name]; ok {
ci.Capabilities = append(ci.Capabilities, livekit.ClientInfo_Capability(v))
}
}
}
AugmentClientInfo(ci, r)
return ci