Change User Name

Any peer can change their own name before or after joining a room.

Before joining, the name would have to be specified in HMSConfig that is passed to the join method. This document shows how the name can be changed after joining.

Responding to name changes

Whenever a remote peer's name is changed a callback will be received in on(peer: HMSPeer, update: HMSPeerUpdate) of HMSUpdateListener where the update will be of type HMSPeerUpdate.nameUpdated.

When this callback is received the UI for that peer should be updated as well.

Changing the name

The peer who wants to change their name should call the following method on an HMSSDK instance.

let newName = "Ashwini Shetty" hmsSdk.change(name: newName) { success, error in ... }

Have a suggestion? Recommend changes ->

Was this helpful?

1234