onPeerUpdate abstract method

void onPeerUpdate({
  1. required HMSPeer peer,
  2. required HMSPeerUpdate update,
})

This will be called whenever there is an update on an existing peer or a new peer got added/existing peer is removed.

This callback can be used to keep a track of all the peers in the room

  • Parameters:
    • peer: the peer who joined/left or was updated
    • update: the triggered update type. Should be used to perform different UI Actions

Implementation

void onPeerUpdate({required HMSPeer peer, required HMSPeerUpdate update});