Implements source-specific permissions and client-driven metadata updates (#1590)

Closes #1565
This commit is contained in:
David Zhao
2023-04-07 23:47:49 -07:00
committed by GitHub
parent e32eaa451f
commit e03f75d6a1
9 changed files with 147 additions and 109 deletions
+10
View File
@@ -73,6 +73,16 @@ func HandleParticipantSignal(room types.Room, participant types.LocalParticipant
if msg.PingReq.Rtt > 0 {
participant.UpdateSignalingRTT(uint32(msg.PingReq.Rtt))
}
case *livekit.SignalRequest_UpdateMetadata:
if participant.ClaimGrants().Video.GetCanUpdateOwnMetadata() {
if msg.UpdateMetadata.Metadata != "" {
participant.SetMetadata(msg.UpdateMetadata.Metadata)
}
if msg.UpdateMetadata.Name != "" {
participant.SetName(msg.UpdateMetadata.Name)
}
}
}
return nil
}