This message was deleted.
# helpdesk
s
This message was deleted.
r
Hi, I am using the participant.Name as the display name and participant.Identity as an unique id (sdk-go and sdk-js, I suppose is the same in C#)
a
Where do you set
Name
though? I don’t think the C# sdk has this as a property of
Participant
Yea, it is read-only
Currently I am managing a Dictionary locally and sending a data package to the room with details of any name changes
f
You can set
Name
and
Metadata
in the token - https://docs.livekit.io/realtime/concepts/authentication/ Looks like we are missing the documentation about
Name
in there. I will raise an issue about missing documentation. You can also see the
UpdateParticipant
room service API referred in the above documentation. That can be used to update participant metadata/permissions.
a
I am setting the Participant Identity based on the Unity Relay ID in the token as this is required so I can cross-reference between the two technologies to parter up my Netcode Prefab object with the LiveKit Participant. The
DisplayName
can also be set at any time, so, yea, I need to be able to update the participant and set the
name
. Let me look at the
UpdateParticipant
code.
f
You can also update the
Name
using
UpdateParticipant
API here. Again documentation needs update.
Which server side language are you using to generate tokens, update participant metadata? Can point to specific code if you can provide more details.
a
I’m using a Node server. I can add a call to do this on the server using
UpdateParticipant
f
Great, let us know if you face issues. You should be able to use
Name
for just the name and
Metadata
if you have more participant specific meta data.
a
Once a Participant is updated via the API is there a delegate call from the C# library to tell my app that it has been done? I will need to update my UI.
f
Don't know how it looks in C# (cc: @boundless-energy-78552), but there are room events like here which you can listen to - https://docs.livekit.io/client-sdk-js/enums/RoomEvent.html
b
This is not yet implemented in c#. Only the metadata changes are exposed atm
f
Thank you @boundless-energy-78552. @astonishing-zebra-92347 Looks like you will have to use
Metadata
for now.
a
Ok. I can set it in both I guess.
πŸ‘πŸ½ 1
Or I could fork the C# code and update it πŸ˜‰
πŸ™‚ 1
f
Of course, that's why it is open source πŸ™‚ . We also accept PRs (not specifically aware of any restrictions on this repo, but in general we are open to accepting community contributions).
πŸ™Œ 1
a
I assume if I change the name AND the metadata on the server then I can use the metadata change delegate to acquire the name?
f
Yes, that is correct.
a
Quick question: for the
RoomServiceClient
do I add the host as
wss://
or
https://
?
f
https
πŸ‘ 1
a
TO set the name as well it would look like this:
await roomService.updateParticipant(roomName, identity, data, undefined, displayName)
as I am not setting any permissions here
f
yes, that is correct.